|
|
|
| Non-WTF Job: Web Developer at ZoomInfo (Waltham, Massachusetts) |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
I particularly like that each and every if test will get executed.....
|
|
This makes baby jesus cry.
And why all the switching between char and ascii values as integers going on? |
Wow, great post, relevant AND funny. Suggestion for next version of code: version 1: etc... version 2: lmpAction = (int)lcrBuffer.CurrentChar; usleep(20); |
|
Maybe someone should tell this genius that "code reusability" and "copy & paste" are different things....
|
|
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 |
|
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. |
|
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) |
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 |
|
(hyperventilating) ... must... tear my eyes away...
|
|
The horror. The horror.
|
|
My eyes!!!! The goggles - they do NOTHING!!!
|
|
It isn't just this massive list of mutually exclusive conditions, consider that someone actually wrote 95 different LetFooBar() functions also.
|
Re: Not Just Another RLB o'PCC
2005-10-28 14:45
•
by
Gene Wirchenko
|
I doubt that is true. Probably, one procedure was written 95 times. Drool-cut-and-paste rules. Sincerely, Gene Wirchenko |
|
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 |
I`d have hoped you were kidding.. |
|
This is museum quality!
|
Where this gets really sick is in these particular lines: if (lcrBuffer.CurrentChar == 34)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? |
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! |
|
:-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 |
|
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. |
|
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");
|
|
Excuse me while i go kill myself for seeing this travesty. |
Why even cut-and-paste? Each of the LetFooBar functions is actually #define macro that calls the same function with an extra parameter. |
That way, the function will have a very consistent execution time !? Hey, it's O(1), without even resorting to 'caching'! |
|
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. |
Should be: if( isTrue(thisGuyIsStupid) ) if( isTrue(amIRight) ) fufilledMyIfQuotaForThisPost(); [:P][:D][pi] |
Re: Not Just Another RLB o'PCC
2005-10-28 15:19
•
by
Gene Wirchenko
|
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 |
My imagination isn't working well. Please post one of the implementations. What is the point of all this? |
Re: Not Just Another RLB o'PCC
2005-10-28 15:28
•
by
iAmNotACantalope
|
Doh! if( isTrue( rockIsHeavy) && isTrue( isTrue( isTrue( isTrue( isTrue( isTrue( ...... isTrue( thisIsGettingOld ) .... ))))))) hitProgrammerWithRock( isTrue( true ) ); |
|
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! |
And that last post was in response to this. I sure do love preview buttons. |
Re: Not Just Another RLB o'PCC
2005-10-28 16:06
•
by
Rank Amateur
|
It can only be one thing: void LetAmpers(String lcrBuf, int * lmpAct) ...and so on for a 30 character string. --RA |
I personally prefer the for-switch paradigm myself. I was dazed for days by that one. |
Oh, you mean pronouncable like "SQL?" |
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. |
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 .... |
|
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. |
Re: Not Just Another RLB o'PCC
2005-10-28 16:24
•
by
Gene Wirchenko
|
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 |
|
[|-)] 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?[:^)] |
Re: Not Just Another RLB o'PCC
2005-10-28 16:28
•
by
BlackTigerX
|
I think you are the "hoax-whore" type[:D] |
Re: Not Just Another RLB o'PCC
2005-10-28 16:29
•
by
Kiss me, I'm Polish
|
Now, can anyone tell me why the code here is always with such tiny, unreadable fonts? huh? anyone? anyone? |
Re: Not Just Another RLB o'PCC
2005-10-28 16:32
•
by
Gene Wirchenko
|
You first. Use your classification system, the one that seems to be missing anything not critical of others. Sincerely, Gene Wirchenko |
Let me guess, you are an F) with a sprinkle of B). (yes, I know this makes me a C) |
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 |
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. |
I think I will be rich if I start selling Sarcasm Detectors here. Anybody wants to join me on this business? |
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. |
What about the people who explain why it's not a WTF? I didn't see that category. Basically a pretty good list, though. |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |