• Broonix (unregistered)

       First post! [6]

  • Dave (unregistered)

    I particularly like that each and every if test will get executed.....

  • Yoey (unregistered) in reply to Broonix

    This makes baby jesus cry.

    And why all the switching between char and ascii values as integers going on?

  • (cs) in reply to Broonix
    Anonymous:
       First post! [6]


    Wow, great post, relevant AND funny.


    Suggestion for next version of code:
    <font color="#000099">version 1:
    if</font> (lcrBuffer.CurrentChar == <font color="#990000">'&'</font>)
    LetAmpers(lcrBuffer, lmpAction);
    <font color="#000099"> if</font> (lcrBuffer.CurrentChar == <font color="#990000">'@'</font>)
    etc...

    version 2:
    	lmpAction = (int)lcrBuffer.CurrentChar;
    	usleep(20);

  • Oby Sam Kenoby (unregistered)

    Maybe someone should tell this genius that "code reusability" and "copy & paste" are different things....

  • (cs)

    The most f-ed thing is, there is a separate function for each of the conditions.  My guess is there is a whole WTF library that is quite rich.

    LetAmpers
    LetAt
    LetBackSlash
    LetColon
    etc.

  • (cs)

    I also like how it's not even in ASCII order, or a switch statement, so not only is each case tested for every case, but there's no hope for the compiler to optimize it in the slightest.

  • (cs) in reply to procyon112

    O M G

    (The fact that I've managed to get a post on the first page shows just how speechless the rest of the community is)

  • (cs)
    Alex Papadimoulis:
    RLB o'PCC (or for those not acronym acquainted, Really Long Blocks of Pointless Conversion Code) are pretty common place.

    Please do not strain for acronyms.  It is undignified.  (See the rest of the IT industry for copious examples.)

    95 ifs.  The cases include TAB and CR.  That means two displayable 7-bit ASCII characters got left out.

    Sincerely,


    Gene Wirchenko

  • (cs)

    (hyperventilating) ... must... tear my eyes away...

  • Eric the .5b (unregistered)

    The horror. The horror.

  • fred (unregistered)

    My eyes!!!!  The goggles - they do NOTHING!!!

  • Ongle (unregistered)

    It isn't just this massive list of mutually exclusive conditions, consider that someone actually wrote 95 different LetFooBar() functions also.

  • (cs) in reply to Ongle
    Anonymous:
    It isn't just this massive list of mutually exclusive conditions, consider that someone actually wrote 95 different LetFooBar() functions also.


    I doubt that is true.  Probably, one procedure was written 95 times.  Drool-cut-and-paste rules.

    Sincerely,

    Gene Wirchenko

  • (cs)

    This guy is my new hero.   I've decided that I will never use any class that contains less than 73 if statements.

    In fact, I've decided that I won't do anything without includeing at least 2 if statments.


    if( thisGuyIsStupid ) if( amIRight ) fufilledMyIfQuotaForThisPost();

    pi

  • a0a (unregistered) in reply to Gene Wirchenko
    Gene Wirchenko:
    Anonymous:
    It isn't just this massive list of mutually exclusive conditions, consider that someone actually wrote 95 different LetFooBar() functions also.


    I doubt that is true.  Probably, one procedure was written 95 times.  Drool-cut-and-paste rules.

    Sincerely,

    Gene Wirchenko



    I`d have hoped you were kidding..
  • (cs) in reply to Gene Wirchenko

    This is museum quality!

  • (cs) in reply to Anonymoose
    Anonymoose:

    version 2:
    	lmpAction = (int)lcrBuffer.CurrentChar;
    	usleep(20);
    Where this gets really sick is in these particular lines:
    if (lcrBuffer.CurrentChar == 34)
      LetQuotMarc(lcrBuffer, lmpAction);
    if (lcrBuffer.CurrentChar == 39)
      LetSingleQuotMarc(lcrBuffer, lmpAction);
    Note that the guy clearly knows that you can treat a char as an int, but continues in the pointless code anyway.
  • (cs) in reply to Otto
    Otto:
    Anonymoose:

    version 2:
    	lmpAction = (int)lcrBuffer.CurrentChar;
    usleep(20);
    Where this gets really sick is in these particular lines:
    if (lcrBuffer.CurrentChar == 34)
    LetQuotMarc(lcrBuffer, lmpAction);
    if (lcrBuffer.CurrentChar == 39)
    LetSingleQuotMarc(lcrBuffer, lmpAction);
    Note that the guy clearly knows that you can treat a char as an int, but continues in the pointless code anyway.


    I was thinking along the same lines.  Why not just use a switch statement if they're chars?
  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    Anonymous:
    It isn't just this massive list of mutually exclusive conditions, consider that someone actually wrote 95 different LetFooBar() functions also.


    I doubt that is true.  Probably, one procedure was written 95 times.  Drool-cut-and-paste rules.

    Sincerely,

    Gene Wirchenko



    My guess is that that "developer" has an XML template for the function and runs a script to generate the actual code for all 95 or so. That makes it very easy to add new functions as new ASCII codes are added to the lower 127.

    <charfunc>
      <char>_<char>
      <charname>underscore</charname>
      <funcbody>(brillant stuff goes here)</funcbody>
    </charfunc>

    This goes through a DOM parser that generates brillant code. SO MUCH TIME SAVED!
  • Daniel T (unregistered) in reply to Gene Wirchenko

    :-O
    U

    I must know - what do these Godforsaken Let... functions even do?  After all, he's passing the entire string to each one (and an "action" variable).

    --Daniel T

  • Totoro (unregistered) in reply to Ongle

    It has got to be computer made. While I am now fully convinced there are people out there stupid enough to do this, the chance of finding one with this amount of patience as well is next to none.

  • Oscar Leeper (unregistered)

    Just out of curiosity, has anyone ever seen code to generate this kind of nonsense, a la the following which could be used(roughly) to generate the {shudder} abomination above?

     

    string someArray[][]

    {

       {"&", "Ampers"},

       {"@", "at"},

       ...

       {" ", "Space"}

    };

     

    for(int i =0; i<128; i++)

       outputfile.WriteLine("if (lcrBuffer.CurrentChar=='"+someArray(0, i)+"')\n\tLet"+someArray(1, i)+"(lcrBuffer, lmpAction);\n");

     

  • Barz (unregistered)

    Excuse me while i go kill myself for seeing this travesty.

  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    Anonymous:
    It isn't just this massive list of mutually exclusive conditions, consider that someone actually wrote 95 different LetFooBar() functions also.


    I doubt that is true.  Probably, one procedure was written 95 times.  Drool-cut-and-paste rules.

    Sincerely,

    Gene Wirchenko



    Why even cut-and-paste?  Each of the LetFooBar functions is actually #define macro that calls the same function with an extra parameter.
  • (cs) in reply to procyon112
    procyon112:
    I also like how it's not even in ASCII order, or a switch statement, so not only is each case tested for every case, but there's no hope for the compiler to optimize it in the slightest.


    That way, the function will have a very consistent execution time !?
    Hey, it's O(1), without even resorting to 'caching'!


  • frosty (unregistered) in reply to Barz

    I know this is madness, but is there any chance we could see one of these Let* functions?  I'm really curious how you can expand this to 30 lines.

    I mean, I know my head is hurting from the original post but hey, it's Friday.  My head can shut down in 4 hours.

  • (cs) in reply to iAmNotACantalope

    iAmNotACantalope:
    This guy is my new hero.   I've decided that I will never use any class that contains less than 73 if statements.

    In fact, I've decided that I won't do anything without includeing at least 2 if statments.


    if( thisGuyIsStupid ) if( amIRight ) fufilledMyIfQuotaForThisPost();

    pi

    Should be:

     if( isTrue(thisGuyIsStupid) ) if( isTrue(amIRight) ) fufilledMyIfQuotaForThisPost();

    [:P][:D][pi]

  • (cs) in reply to Barz
    Anonymous:
    Excuse me while i go kill myself for seeing this travesty.


    No one forced you to come this site.  Now, suck in that gut and soldier!

    Ah, the wonders of IT.  Not only do we have horrible code like -- you can fill this in -- but with Google Earth, you can probably find the bridge that the code makes you jump off.

    Sincerely,

    Gene Wirchenko

  • (cs)

    Alex Papadimoulis:
    I'll leave what those RLB o'PCC look like to your imagination ...

    My imagination isn't working well.  Please post one of the implementations.  What is the point of all this?

  • (cs) in reply to cm5400
    cm5400:

    iAmNotACantalope:
    This guy is my new hero.   I've decided that I will never use any class that contains less than 73 if statements.

    In fact, I've decided that I won't do anything without includeing at least 2 if statments.


    if( thisGuyIsStupid ) if( amIRight ) fufilledMyIfQuotaForThisPost();

    pi

    Should be:

     if( isTrue(thisGuyIsStupid) ) if( isTrue(amIRight) ) fufilledMyIfQuotaForThisPost();

    [:P][:D][pi]



    Doh!

    if( isTrue( rockIsHeavy) && isTrue( isTrue( isTrue( isTrue( isTrue( isTrue( ...... isTrue(  thisIsGettingOld  )  .... ))))))) hitProgrammerWithRock( isTrue( true ) );
  • (cs) in reply to Gene Wirchenko

    They'd at least be tolerable if they were pure acronyms (pronouncable) and not just initialisms.  Like, uh, RELOBLOPOCOCO.  That's much more fun to say!

  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    Alex Papadimoulis:
    RLB o'PCC (or for those not acronym acquainted, Really Long Blocks of Pointless Conversion Code) are pretty common place.

    Please do not strain for acronyms.  It is undignified.  (See the rest of the IT industry for copious examples.)

    95 ifs.  The cases include TAB and CR.  That means two displayable 7-bit ASCII characters got left out.

    Sincerely,


    Gene Wirchenko



    And that last post was in response to this.  I sure do love preview buttons.
  • (cs) in reply to dubwai
    dubwai:

    Alex Papadimoulis:
    I'll leave what those RLB o'PCC look like to your imagination ...

    My imagination isn't working well.  Please post one of the implementations.  What is the point of all this?

    It can only be one thing:

    void LetAmpers(String lcrBuf, int * lmpAct)
    {
    if (lcrBuf.Index(0).Char == '&')
        lmpAct[0] = 38;
    if (lcrBuf.Index(1).Char == '&')
        lmpAct[1] = 38;

    ...and so on for a 30 character string.

    --RA

  • (cs) in reply to iAmNotACantalope
    iAmNotACantalope:
    cm5400:

    iAmNotACantalope:
    This guy is my new hero.   I've decided that I will never use any class that contains less than 73 if statements.

    In fact, I've decided that I won't do anything without includeing at least 2 if statments.


    if( thisGuyIsStupid ) if( amIRight ) fufilledMyIfQuotaForThisPost();

    pi

    Should be:

     if( isTrue(thisGuyIsStupid) ) if( isTrue(amIRight) ) fufilledMyIfQuotaForThisPost();

    [:P][:D][pi]



    Doh!

    if( isTrue( rockIsHeavy) && isTrue( isTrue( isTrue( isTrue( isTrue( isTrue( ...... isTrue(  thisIsGettingOld  )  .... ))))))) hitProgrammerWithRock( isTrue( true ) );

    I personally prefer the for-switch paradigm myself. I was dazed for days by that one.

  • (cs) in reply to Meddler
    Meddler:
    They'd at least be tolerable if they were pure acronyms (pronouncable) and not just initialisms.  Like, uh, RELOBLOPOCOCO.  That's much more fun to say!


    Oh, you mean pronouncable like "SQL?"
  • (cs) in reply to frosty
    Anonymous:
    I know this is madness, but is there any chance we could see one of these Let* functions?  I'm really curious how you can expand this to 30 lines.

    I mean, I know my head is hurting from the original post but hey, it's Friday.  My head can shut down in 4 hours.


    Me too. I am really curious to know *how* someone could make these Let* functions be 30 lines long. My imagination isn't working well, too.
  • (cs) in reply to frosty

    Anonymous:
    I know this is madness, but is there any chance we could see one of these Let* functions?  I'm really curious how you can expand this to 30 lines.

    I mean, I know my head is hurting from the original post but hey, it's Friday.  My head can shut down in 4 hours.

    Yeah!  Post some of the Let() functions!  They seem like they might be useful, I could add them to my library ...  maybe they would come in handy for writing a keyboard driver or something ....

  • (cs)

    Which type of post-whore are you?

    There are several basic types of people who post on this board. Can you tell which one you are?

    A) Catch-phraseologist: They take portions of previous posts and make inside joke references to them. The most frequently-seen of these are "brillant" and "IsTrue( )". Newcomers to the site are confused and try to correct these apparent errors, while the seasoned veteran readers don't find it at all amusing. Continued pathetic attempts at humor like this will be met with a stapler to the face.

    B) Uber-geek: These argumentative assholes will write up a dissertation-sized response in which they go into detail about processor architecture and kernel operations, even if the WTF has to do with Javascript. They ignore the true nature of the problem originally posted, and prefer to engage in pointless debates with other uber-geeks. To these people, sex involves a keyboard, and no physical contact.

    C) The one-liner: It's as simple as that, they post one line that gives no further insight or comedic value to what everyone else reads. It could be as simple as "W... T.... F!?!" Thank you for the affirmation that we are, in fact, viewing The Daily WTF. There was no point to your post, my life would have been better without it because I wouldn't have wasted 2 seconds reading your trite submission. Quite a few of these people are "Anonymous" posters because they are afraid that registering an account with their email address will cause satellites to beam communist thoughts into their brain via microwaves.

    D) The optimizer: These geniuses quickly identify that the post of the day has logic flaws, spelling errors, or over-complex methods of performing simple tasks. As a way of showing off their programming skills, they re-write the post of the day to be the fastest and most stable piece of code known to man. If you printed their code out, you could take it to a bank becuase it's made of gold. Figure it out bonehead, the code was posted because it sucks. No one cares if you can write it better. It's especially fun when they "optimize" it in a different programming language, which makes the whole concept even less useful.

    E) The "first" post: They like to be at the top of the list, with the fame and notoriety of having the very first response to every article. These people are also one-liners, because they never have anything else to say except "First!" These people are tard-monkeys, useless members of society who will most likely grow up to be politicians. 'Nuff said.

    F) The whiner: They rarely have anything to contribute to the topic. Instead they complain about how people's conversations are going off on a huge tangent, and they try to find new and creative ways to insult those people like calling them names in different languages, or coming up with overly-descriptive lists of the types of people that piss them off. These people should be shot.

  • (cs) in reply to ehabkost
    ehabkost:
    Anonymous:
    I know this is madness, but is there any chance we could see one of these Let* functions?  I'm really curious how you can expand this to 30 lines.

    I mean, I know my head is hurting from the original post but hey, it's Friday.  My head can shut down in 4 hours.


    Me too. I am really curious to know *how* someone could make these Let* functions be 30 lines long. My imagination isn't working well, too.


    It is a cluelessness, but it is a good cluelessness.  "Some things man was not meant to know." (or however the quote goes.  BTW, whose is it?)

    Sincerely,

    Gene Wirchenko

  • (cs)

    [|-)]

    I mean, sure this is a WTF, but isn't this too common?

    the real question is, why wasn't my submission posted instead of this one?[:^)]

  • (cs) in reply to Manni
    Manni:

    Which type of post-whore are you?

    I think you are the "hoax-whore" type[:D]

  • Kiss me, I'm Polish (unregistered) in reply to Mung Kee
    [image] Now, can anyone tell me why the code here is always with such tiny, unreadable fonts? huh? anyone? anyone?
  • (cs) in reply to Manni
    Manni:
    Which type of post-whore are you?

    There are several basic types of people who post on this board. Can you tell which one you are?


    You first.  Use your classification system, the one that seems to be missing anything not critical of others.

    Sincerely,

    Gene Wirchenko

  • (cs) in reply to Manni
    Manni:

    Which type of post-whore are you?

    There are several basic types of people who post on this board. Can you tell which one you are?

    A) Catch-phraseologist: They take portions of previous posts and make inside joke references to them. The most frequently-seen of these are "brillant" and "IsTrue( )". Newcomers to the site are confused and try to correct these apparent errors, while the seasoned veteran readers don't find it at all amusing. Continued pathetic attempts at humor like this will be met with a stapler to the face.

    B) Uber-geek: These argumentative assholes will write up a dissertation-sized response in which they go into detail about processor architecture and kernel operations, even if the WTF has to do with Javascript. They ignore the true nature of the problem originally posted, and prefer to engage in pointless debates with other uber-geeks. To these people, sex involves a keyboard, and no physical contact.

    C) The one-liner: It's as simple as that, they post one line that gives no further insight or comedic value to what everyone else reads. It could be as simple as "W... T.... F!?!" Thank you for the affirmation that we are, in fact, viewing The Daily WTF. There was no point to your post, my life would have been better without it because I wouldn't have wasted 2 seconds reading your trite submission. Quite a few of these people are "Anonymous" posters because they are afraid that registering an account with their email address will cause satellites to beam communist thoughts into their brain via microwaves.

    D) The optimizer: These geniuses quickly identify that the post of the day has logic flaws, spelling errors, or over-complex methods of performing simple tasks. As a way of showing off their programming skills, they re-write the post of the day to be the fastest and most stable piece of code known to man. If you printed their code out, you could take it to a bank becuase it's made of gold. Figure it out bonehead, the code was posted because it sucks. No one cares if you can write it better. It's especially fun when they "optimize" it in a different programming language, which makes the whole concept even less useful.

    E) The "first" post: They like to be at the top of the list, with the fame and notoriety of having the very first response to every article. These people are also one-liners, because they never have anything else to say except "First!" These people are tard-monkeys, useless members of society who will most likely grow up to be politicians. 'Nuff said.

    F) The whiner: They rarely have anything to contribute to the topic. Instead they complain about how people's conversations are going off on a huge tangent, and they try to find new and creative ways to insult those people like calling them names in different languages, or coming up with overly-descriptive lists of the types of people that piss them off. These people should be shot.



    Let me guess, you are an F) with a sprinkle of B).

    (yes, I know this makes me a C)
  • (cs) in reply to Manni
    Manni:

    There are several basic types of people who post on this board. Can you tell which one you are?

    G) The wiseguy: They are positive that all readers of this site are only waiting for their smartass comment that the real WTF is actually ... (followed by a reference to the least offensive part of the daily WTF). Their comments usually start with "I got it! The WTF is ...". The message board software should be modified to automatically discard their messages and block their accounts.

    Best, Hugo

  • (cs) in reply to Manni
    Manni:

    Which type of post-whore are you?

    Wow, I thought I was a little more obvious. I intended myself to be an F. I apologize if I didn't make any derogatory statements about myself, I thought that the prospect of being shot was enough.

  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    Manni:
    Which type of post-whore are you?

    There are several basic types of people who post on this board. Can you tell which one you are?


    You first.  Use your classification system, the one that seems to be missing anything not critical of others.



    I think I will be rich if I start selling Sarcasm Detectors here. Anybody wants to join me on this business?
  • (cs) in reply to Mung Kee
    Mung Kee:
    Meddler:
    They'd at least be tolerable if they were pure acronyms (pronouncable) and not just initialisms.  Like, uh, RELOBLOPOCOCO.  That's much more fun to say!


    Oh, you mean pronouncable like "SQL?"


    Some still insist on saying each letter instead of using the established pronouncable acronym we all love.  It's interesting how one pronunciation becomes preferable to another. We could be going around saying "I love how easy it is to install my squall in windows."   And sometimes the word doesn't quite fit - around here people say NMEA (a type of GPS signal) as "nee-ma" as if it's NEMA.
  • (cs) in reply to Manni
    Manni:
    Manni:

    Which type of post-whore are you?

    Wow, I thought I was a little more obvious. I intended myself to be an F. I apologize if I didn't make any derogatory statements about myself, I thought that the prospect of being shot was enough.

    What about the people who explain why it's not a WTF?  I didn't see that category.  Basically a pretty good list, though.

Leave a comment on “Not Just Another RLB o'PCC”

Log In or post as a guest

Replying to comment #:

« Return to Article