• (cs) in reply to Nagesh
    Nagesh:
    hoodaticus:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Addendum (2011-02-16 09:45): For the dense, this is satire.

    For the super-dense: this is VB, and VB stores internal strings in Unicode. So you don't even save the space.

    Wouldn't that depend on the version there?

    Yeah, but I don't know anyone using VB3 or below.

  • (cs) in reply to frits
    frits:
    Great Dane:
    Nagesh:
    trtrwtf:
    Nagesh:
    In Hyderabad, it is similar. At newstand, (which also sells clothes), you can buy fresh chicken made while you wait. This is great delicacy, as chickens cannot be frozen with power outages happening. In fact, I am eating chicken pita as I write this in internet cafe.

    The funny thing is, he probably still thinks this is hilarious. I bet he's still laughing at his palak paneer joke. Ten bucks says he's a third-tier DB monkey from Kansas working in a third-tier financial firm New Jersey who hasn't figured out yet that the reason women don't like him is that his sense of "humor" is basically ugly and not very funny - like him - so he sits in bars and drinks too much and makes sexist jokes with his co-workers, also failures in life, then he goes home and consoles himself - if you know what I mean - with some porn, probably something featuring Indian women, to guess from his favorite riffs here.

    Or I could be wrong, I suppose, it's just a guess.

    I am certain he's not from my country. If he sees chicken shop in Hyderabad, he will give up eating chicken.

    You won't see chicken shop in Hyderbad--that's far to risky. You will see plenty of them shopping in Denmark where animals have the same rights as human citizens.
    Technically, the French are human...

    NICE!
  • (cs) in reply to lomendil
    lomendil:
    somedude:

    Each definition needs to be a child node.

    <ReportColumns>
    	<Columns reportID="1">
    		<column>1</column>
    		<column>0</column>
    		<column>1</column>
    		<column>1</column>
    		... and so on
    

    The XML needs to be generated dynamically by the database for each request.

    The classic WTF pattern of relying on XML children ordering!

    Perfect.

    Good catch! Failing to give an ordering attribute to the column elements was indeed a wtf.
  • (cs) in reply to Nagesh
    Nagesh:
    You're also slaughtering the language, not unlike me.
    You write better English than half my redneck-ridden clan, so I wouldn't worry about it. (The other half is probably illiterate).
  • (cs) in reply to hoodaticus
    hoodaticus:
    Nagesh:
    You're also slaughtering the language, not unlike me.
    You write better English than half my redneck-ridden clan, so I wouldn't worry about it. (The other half is probably illiterate).

    I will have to google redneck later. Thx.

  • (cs)

    Can our report generator do grouping? Nope.

    Can our report generator reorder columns? Nope.

    Can our report generator do summing? Nope.

    Can our report generator add a column to a report with trival ease? Nope, Nope, Nope!

    But it's ours (!!!) not some worthless NIH junk.

  • (cs) in reply to Nagesh
    Nagesh:
    hoodaticus:
    Nagesh:
    You're also slaughtering the language, not unlike me.
    You write better English than half my redneck-ridden clan, so I wouldn't worry about it. (The other half is probably illiterate).

    I will have to google redneck later. Thx.

    There also this other word used predominantly in the English language, a very important one to google: goatse

  • Sock Monkey (unregistered) in reply to HellKarnassus
    HellKarnassus:
    Nagesh:
    hoodaticus:
    Nagesh:
    You're also slaughtering the language, not unlike me.
    You write better English than half my redneck-ridden clan, so I wouldn't worry about it. (The other half is probably illiterate).

    I will have to google redneck later. Thx.

    There also this other word used predominantly in the English language, a very important one to google: goatse

    There's a line that you do not cross. Not even on the internets.

  • (cs) in reply to Sock Monkey
    Originally used in reference to poor, white farmers, redneck is a historically derogatory slang term to refer to working class Southerners in the United States.[1] It is similar in meaning to "cracker" (especially regarding Georgia and Florida), "hillbilly" (especially regarding Appalachia and the Ozarks)[2] and "white trash".[3][4] The most common American usage, referring to the poor rural white Southerner, is probably derived from individuals having a red neck caused by staining of their skin. A result of a mixture of sweat and the dust of red clay dirt common in the southern states. A citation from 1893 provides a definition as "poorer inhabitants of the rural districts...men who work in the field, as a matter of course, generally have their skin stained red and burnt by the sun, and especially is this true of the back of their necks".[5] In recent decades the term expanded its meaning to mean bigoted, loutish, and opposed to modern ways, and has often been used to attack Southern conservatives and segregationists. At the same time, many members of the U.S. Southern community have set out to reclaim the word, using it as a self-identifier, and the term has also been claimed by individuals outside of the United States.

    This is what I found out.

  • Herbert (unregistered)

    If it's ok with everyone, I'll comment on the article...

    Where are the break statements?

  • darkmage0707077 (unregistered) in reply to trtrwtf
    trtrwtf:
    frits:
    Great Dane:
    Nagesh:
    trtrwtf:
    Nagesh:
    In Hyderabad, it is similar. At newstand, (which also sells clothes), you can buy fresh chicken made while you wait. This is great delicacy, as chickens cannot be frozen with power outages happening. In fact, I am eating chicken pita as I write this in internet cafe.

    The funny thing is, he probably still thinks this is hilarious. I bet he's still laughing at his palak paneer joke. Ten bucks says he's a third-tier DB monkey from Kansas working in a third-tier financial firm New Jersey who hasn't figured out yet that the reason women don't like him is that his sense of "humor" is basically ugly and not very funny - like him - so he sits in bars and drinks too much and makes sexist jokes with his co-workers, also failures in life, then he goes home and consoles himself - if you know what I mean - with some porn, probably something featuring Indian women, to guess from his favorite riffs here.

    Or I could be wrong, I suppose, it's just a guess.

    I am certain he's not from my country. If he sees chicken shop in Hyderabad, he will give up eating chicken.

    You won't see chicken shop in Hyderbad--that's far to risky. You will see plenty of them shopping in Denmark where animals have the same rights as human citizens.
    Technically, the French are human...

    Zing!

    Zing? More like: neerRROW-BOOM

  • Abso (unregistered) in reply to Herbert
    Herbert:
    If it's ok with everyone, I'll comment on the article...

    Where are the break statements?

    Oh, right, the article.

    I am happily ignorant about Visual Basic, but the internet seems to indicate that case statements in VB don't fall through.

  • (cs) in reply to lomendil
    lomendil:
    The classic WTF pattern of relying on XML children ordering!

    Perfect.

    If the schema says its a sequence, or if there's no schema, then the ordering is defined and reliable. Really. Go on, look it up for yourself…

  • ÃÆâ€℠(unregistered) in reply to Sock Monkey
    Sock Monkey:
    HellKarnassus:
    Nagesh:
    hoodaticus:
    Nagesh:
    You're also slaughtering the language, not unlike me.
    You write better English than half my redneck-ridden clan, so I wouldn't worry about it. (The other half is probably illiterate).

    I will have to google redneck later. Thx.

    There also this other word used predominantly in the English language, a very important one to google: goatse

    There's a line that you do not cross. Not even on the internets.
    You must not have a lot of experience with Nagesh. I wouldn't be surprised if that is the norm in Hyderabad.

  • (cs) in reply to Nagesh
    Nagesh:
    Originally used in reference to poor, white farmers, redneck is a historically derogatory slang term to refer to working class Southerners in the United States.[1] It is similar in meaning to "cracker" (especially regarding Georgia and Florida), "hillbilly" (especially regarding Appalachia and the Ozarks)[2] and "white trash".[3][4] The most common American usage, referring to the poor rural white Southerner, is probably derived from individuals having a red neck caused by staining of their skin. A result of a mixture of sweat and the dust of red clay dirt common in the southern states. A citation from 1893 provides a definition as "poorer inhabitants of the rural districts...men who work in the field, as a matter of course, generally have their skin stained red and burnt by the sun, and especially is this true of the back of their necks".[5] In recent decades the term expanded its meaning to mean bigoted, loutish, and opposed to modern ways, and has often been used to attack Southern conservatives and segregationists. At the same time, many members of the U.S. Southern community have set out to reclaim the word, using it as a self-identifier, and the term has also been claimed by individuals outside of the United States.

    This is what I found out.

    Well... at least they're native English speakers...

    But trust me... you're way ahead of them.

    If you want an amusing experience, look at pictures of rednecks. This will get you started.

    But I do like rednecks. They're the reason no one will ever invade the United States. Japan was going to do a land invasion, before they found out about millions of rednecks and their rifles (the Founding Fathers of the USA called them: the Militia).

    Rednecks in the southeastern U.S. purchase about 10 billion rounds of ammunition a year, and they bought up another 8 billion in the months after Obama was elected. Favorite pastime: killing things with their guns.

  • anon (unregistered) in reply to by
    by:
    Aha! Your no writer! Someone with a legitimate command of the English (not British!) language would never use a noun that could be confused as a verb at that grammatical position in the sentence.

    Own up to this.

    Someone with a "legitimate command of the English (not British!) language" would the word You're in the sentence "Your no writer!".

  • Gary Olson (unregistered)

    Place your nose close to the screen and move away slowly. Eventually an image will appear of Paris Hilton; or the code will actually make sense.

  • Pr0gramm3r (unregistered)

    TRWTF is that the original programmer only had 32 cases. Before this new guy even thinks about fixing up a column he should make sure that all cases (2^66) are handled.

  • Jimbo (unregistered) in reply to Ken B.
    Ken B.:
    Donald:
    Bosses ask us to "just add a button" ... but it's NEVER that simple is it?
    I've learned over the years that the shorter the description, the harder it is to implement.

    Take, for example, the simple two-word request "ODBC support".

    Date

  • Magu (unregistered) in reply to frits
    frits:
    Today on "The Daily What the Freud" sockpuppets analyze each other.

    ...or themselves. After all, who can tell?

    Wow, reading Quickly, I saw "The Daily What the Feud"...

  • Vangoer (unregistered) in reply to by
    by:
    trtrwtf:
    Abso:
    I'm sure that's part of the reason women don't like him, but the other part is that he's completely oblivious to what other people think of his sense of humour (or anything else he does). He only responds to what people say if it gives him an opening to say what he wanted to say anyways. Holding a conversation with fake Nagesh would be about as exciting as talking to your TV, except without the ability to change the channel.

    Good point. Maybe I was a little too simplistic in my caricature. Perhaps his failings as a human being have more dimensions than I originally suppose.

    Aha! Your no writer! Someone with a legitimate command of the English (not British!) language would never use a noun that could be confused as a verb at that grammatical position in the sentence.

    Own up to this.

    Addendum (2011-02-16 14:08): Fred was right! Unregistered users can modify their own comments!

    Someone with any knowledge of the English language should know when to use "your" and when to use "you're" too...

    (I wonder what an illegitimate command of the English language might be like....F**K)

  • <><><> (unregistered)

    TRWTF is using a case statement that takes a integer number to return an array of bits. The code would be much easier to maintain and read if you just passed a bigint to indicate which columns you wanted.

    for(i=0;i<128;i++) arrColumnsToShow[i] = bigintReportID & 2^i;

    Done.

  • Gibbon1 (unregistered) in reply to boog

    Yeah I wonder about that, I think I'll take a reasonably well organized program written by a weirdo than a big ball mud. Second thought is maybe the author had plans to put that data into a config file or database but never got around to it.

    CAPTCHA: could be worse

  • Sylver (unregistered) in reply to frits
    frits:
    ... Technically, the French are human...
    Oh Zing! What wit! You will be a killer when you get into third grade.
  • Anon Too (unregistered)

    Sometimes you just look at something and the only rational response is .... Jesus Christ! WTF????!

    This is one of those times.

  • Stevie D (unregistered) in reply to assi
    assi:
    Boss and "just/simple" in one sentence?

    -> Problem!

    Not at all. "My boss is just a bit simple" See? Perfectly plausible! (It's not true, he adds hurriedly, just in case she reads this)

  • pjt33 (unregistered) in reply to Ibi-Wan Kentobi
    Ibi-Wan Kentobi:
    The Nerve:
    An obvious solution would be to create an array with all 36893488147419103232 possible permutations of the columns displayed and a map that maps from the report number to its index in the array. If you want to add a column, recompute the data index and retrieve that string (prepending it first with a '-').

    Come to think of it... ditch the array: if you've calculated your index as described (without the negative) I do believe it'll already be a bit-packed of The Fine WTF's strings!

    That's a very big "if" which IMO shows a lack of imagination. Your version might be maintainable, and that's clearly not the intention.

  • borat (unregistered)

    I like-a pull-a string from her posi'.

  • (cs) in reply to Jimbo
    Jimbo:
    Ken B.:
    Donald:
    Bosses ask us to "just add a button" ... but it's NEVER that simple is it?
    I've learned over the years that the shorter the description, the harder it is to implement.

    Take, for example, the simple two-word request "ODBC support".

    Date
    Cart. That guy who has a website designed by his nephew, with pictures of his products, all in static HTML. And he asks you to make an online shop, you know, just add the cart. Sometimes with helpful hints, like "you know, when you hover with the mouse it says <<add to cart>>. It's simple, and I'll buy you a beer."

  • (cs) in reply to Sylver
    Sylver:
    frits:
    ... Technically, the French are human...
    Oh Zing! What wit! You will be a killer when you get into third grade.

    Aren't you the guy who thinks aircraft carriers fly?

    I'm going to go ahead and not take advice on wit from you.

  • Flee Boldly (unregistered)

    As we used to say in our family "no jury would convict"

  • (cs) in reply to hoodaticus
    hoodaticus:
    Nagesh:
    Originally used in reference to poor, white farmers, redneck is a historically derogatory slang term to refer to working class Southerners in the United States.[1] It is similar in meaning to "cracker" (especially regarding Georgia and Florida), "hillbilly" (especially regarding Appalachia and the Ozarks)[2] and "white trash".[3][4] The most common American usage, referring to the poor rural white Southerner, is probably derived from individuals having a red neck caused by staining of their skin. A result of a mixture of sweat and the dust of red clay dirt common in the southern states. A citation from 1893 provides a definition as "poorer inhabitants of the rural districts...men who work in the field, as a matter of course, generally have their skin stained red and burnt by the sun, and especially is this true of the back of their necks".[5] In recent decades the term expanded its meaning to mean bigoted, loutish, and opposed to modern ways, and has often been used to attack Southern conservatives and segregationists. At the same time, many members of the U.S. Southern community have set out to reclaim the word, using it as a self-identifier, and the term has also been claimed by individuals outside of the United States.

    This is what I found out.

    Well... at least they're native English speakers...

    But trust me... you're way ahead of them.

    If you want an amusing experience, look at pictures of rednecks. This will get you started.

    But I do like rednecks. They're the reason no one will ever invade the United States. Japan was going to do a land invasion, before they found out about millions of rednecks and their rifles (the Founding Fathers of the USA called them: the Militia).

    Rednecks in the southeastern U.S. purchase about 10 billion rounds of ammunition a year, and they bought up another 8 billion in the months after Obama was elected. Favorite pastime: killing things with their guns.

    That was funny picture, but I don't think it is real. I found some reference to Larry Cable Guy. Will have to see that movie, sometime.

    If they love killing so much, they should go to military force. Why military is called peace keeping force is mystery to me. Everyone knows once military comes in there's no chance for peace to make appearance.

  • (cs) in reply to frits
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Well, if it was properly implemented as a 32-bit integer with a mask for the unused columns then it would actually be a great solution even for an embedded system with no file system....

    Addendum: but the way it was actually implemented was just a miserable pile of [insert random AVGN insults here]

  • (cs) in reply to Nagesh
    Nagesh:
    hoodaticus:
    Nagesh:
    Originally used in reference to poor, white farmers, redneck is a historically derogatory slang term to refer to working class Southerners in the United States.[1] It is similar in meaning to "cracker" (especially regarding Georgia and Florida), "hillbilly" (especially regarding Appalachia and the Ozarks)[2] and "white trash".[3][4] The most common American usage, referring to the poor rural white Southerner, is probably derived from individuals having a red neck caused by staining of their skin. A result of a mixture of sweat and the dust of red clay dirt common in the southern states. A citation from 1893 provides a definition as "poorer inhabitants of the rural districts...men who work in the field, as a matter of course, generally have their skin stained red and burnt by the sun, and especially is this true of the back of their necks".[5] In recent decades the term expanded its meaning to mean bigoted, loutish, and opposed to modern ways, and has often been used to attack Southern conservatives and segregationists. At the same time, many members of the U.S. Southern community have set out to reclaim the word, using it as a self-identifier, and the term has also been claimed by individuals outside of the United States.

    This is what I found out.

    Well... at least they're native English speakers...

    But trust me... you're way ahead of them.

    If you want an amusing experience, look at pictures of rednecks. This will get you started.

    But I do like rednecks. They're the reason no one will ever invade the United States. Japan was going to do a land invasion, before they found out about millions of rednecks and their rifles (the Founding Fathers of the USA called them: the Militia).

    Rednecks in the southeastern U.S. purchase about 10 billion rounds of ammunition a year, and they bought up another 8 billion in the months after Obama was elected. Favorite pastime: killing things with their guns.

    That was funny picture, but I don't think it is real. I found some reference to Larry Cable Guy. Will have to see that movie, sometime.

    If they love killing so much, they should go to military force. Why military is called peace keeping force is mystery to me. Everyone knows once military comes in there's no chance for peace to make appearance.

    That is quite an Indian perspective on the use of military force. On the other hand, the U.S. military has kept peace between North and South Korea, Egypt and Israel, Europe and Russia, and so on and so forth for generations.
  • trtrwtf (unregistered) in reply to Anon Too
    Anon Too:
    Sometimes you just look at something and the only rational response is .... Jesus Christ!

    Okay, it's all good to have the true religion and be washed in the blood of the lamb and and all that, but could you please keep it in your pants?

    (and, may I say... "washed in the blood of the lamb"? Ick!)

  • hiphopopotamous (unregistered)

    Did robots code this per chance? Binary solo....

  • (cs)

    Arrrggh, I am confused when reading this :(

  • (cs) in reply to hoodaticus
    hoodaticus:
    Nagesh:

    That was funny picture, but I don't think it is real. I found some reference to Larry Cable Guy. Will have to see that movie, sometime.

    If they love killing so much, they should go to military force. Why military is called peace keeping force is mystery to me. Everyone knows once military comes in there's no chance for peace to make appearance.

    That is quite an Indian perspective on the use of military force. On the other hand, the U.S. military has kept peace between North and South Korea, Egypt and Israel, Europe and Russia, and so on and so forth for generations.
    Have you heard of Kashmir region in India? Big serious problem caused by our army and Pakistan army trying to maintain peace.
  • trtrwtf (unregistered) in reply to hoodaticus
    hoodaticus:
    That is quite an Indian perspective on the use of military force. On the other hand, the U.S. military has kept peace between North and South Korea, Egypt and Israel, Europe and Russia, and so on and so forth for generations.

    There may be a distinction to be drawn between a perpetual armed stalemate and "peace".

  • Chickens Almighty (unregistered)
    office:

    sigh I'll stab you with a spoon.

  • Anonymously Yours (unregistered)

    This SQL kind of reminds me of something from Lovecraft's A Colour Out Of Space. There are flowers tainted by the alien presence that turn to a color that does not exist anywhere on Earth, and it hurts the eye to look at them because it isn't designed to see that.

  • Anonymously Yours (unregistered)

    Sorry, got distracted while posting. I mean code, not SQL.

  • (cs) in reply to hoodaticus
    hoodaticus:
    belgariontheking:
    You fools. Who writes queries for reports anymore?
    Yeah, my reports are entirely populated by rand(). It's not like anyone's reading them anyway.

    Sheer. Fucking. Genius.

  • Redneck (unregistered) in reply to Nagesh

    I'm willin to betchya its real.

    Find a rural town in Louisiana or Mississippi at least 50 miles from an interstate highway or major city and you will find this guy.

    In all defense, the guy might have been doing repairs inside and moved the toilet outside -- but his family tree probably doesnt branch out...

  • Kevin Kofler (unregistered)

    You think that's unreadable? Then try that:

    unsigned long long flags;
    switch (intReportID) {
      case 1:
        flags = 18158513697624817863ull
        break;
    
      ...snip...
    
      default:  //no report
        flags = 0ull;
    end select
    
    bool *p = arrColumnsToShow;
    // Column 0 is not used for some stupid reason
    *(p++) = false;
    for (int i=0; i<64; i++) {
      *(p++) = !!(flags & (1ull<<i));
    }
    // The last 2 columns are always shown at the same time and we're out of flags.
    *p = p[-1];</pre>
    

    ;-p

  • Kevin Kofler (unregistered)

    Oops, imagine a:

    #define end }
    #define select /**/

    in front of that. ;-)

  • Anonymous (unregistered)

    See TRWTF is that they used strings when they should have used arrays, because if they used arrays, they could have at least used verbose symbol names.

    ...wait, that is a real wtf, and it would partially fix the problem. My bad.

  • tory burch shoes (unregistered)

    Over the centuries tory burch handbags have gone through many adaptations and tory burch coroline satche silver fashions, but the word handbag was only coined in the 1900s. The start of the twentieth century also heralded the type of tory burch sale we would recognise today - with tory burch shoes getting increasingly smaller and the introduction of tory burch fasteners, inner compartments and locks http://www.handbags4fashion.com/.

Leave a comment on “Adding a Column”

Log In or post as a guest

Replying to comment #:

« Return to Article