- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
First post! [6]
Admin
I particularly like that each and every if test will get executed.....
Admin
This makes baby jesus cry.
And why all the switching between char and ascii values as integers going on?
Admin
Wow, great post, relevant AND funny.
Suggestion for next version of code:
etc...
version 2:
Admin
Maybe someone should tell this genius that "code reusability" and "copy & paste" are different things....
Admin
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.
Admin
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.
Admin
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)
Admin
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
Admin
(hyperventilating) ... must... tear my eyes away...
Admin
The horror. The horror.
Admin
My eyes!!!! The goggles - they do NOTHING!!!
Admin
It isn't just this massive list of mutually exclusive conditions, consider that someone actually wrote 95 different LetFooBar() functions also.
Admin
I doubt that is true. Probably, one procedure was written 95 times. Drool-cut-and-paste rules.
Sincerely,
Gene Wirchenko
Admin
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
Admin
I`d have hoped you were kidding..
Admin
This is museum quality!
Admin
Admin
I was thinking along the same lines. Why not just use a switch statement if they're chars?
Admin
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!
Admin
:-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
Admin
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.
Admin
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");
Admin
Excuse me while i go kill myself for seeing this travesty.
Admin
Why even cut-and-paste? Each of the LetFooBar functions is actually #define macro that calls the same function with an extra parameter.
Admin
That way, the function will have a very consistent execution time !?
Hey, it's O(1), without even resorting to 'caching'!
Admin
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.
Admin
Should be:
if( isTrue(thisGuyIsStupid) ) if( isTrue(amIRight) ) fufilledMyIfQuotaForThisPost();
[:P][:D][pi]
Admin
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
Admin
My imagination isn't working well. Please post one of the implementations. What is the point of all this?
Admin
Doh!
if( isTrue( rockIsHeavy) && isTrue( isTrue( isTrue( isTrue( isTrue( isTrue( ...... isTrue( thisIsGettingOld ) .... ))))))) hitProgrammerWithRock( isTrue( true ) );
Admin
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!
Admin
And that last post was in response to this. I sure do love preview buttons.
Admin
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
Admin
I personally prefer the for-switch paradigm myself. I was dazed for days by that one.
Admin
Oh, you mean pronouncable like "SQL?"
Admin
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.
Admin
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 ....
Admin
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.
Admin
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
Admin
[|-)]
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?[:^)]
Admin
I think you are the "hoax-whore" type[:D]
Admin
Admin
You first. Use your classification system, the one that seems to be missing anything not critical of others.
Sincerely,
Gene Wirchenko
Admin
Let me guess, you are an F) with a sprinkle of B).
(yes, I know this makes me a C)
Admin
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
Admin
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.
Admin
I think I will be rich if I start selling Sarcasm Detectors here. Anybody wants to join me on this business?
Admin
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.
Admin
What about the people who explain why it's not a WTF? I didn't see that category. Basically a pretty good list, though.