- 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
Oh god why
Admin
!clever
Admin
trueandorfalse? WTF #1 is not knowing the ! operator. WTF #2 is not knowing that the logical operation you are doing is called "not". WTF #3 is not handling FILE_NOT_FOUND.
Admin
Why is it called trueandorfalse() ?
Admin
This is one of the best things I've ever seen.
Admin
A real coder would have done:
return xor(_booInpt,1);
Obvious really...
Admin
At least it's well documented, and even has a touch of humor (Scientology wtf?)
Admin
This comment is clever... NOT!
Admin
reminds me of a
if((!shouldContinue) == false) {
// blah....
}
I saw one time. Suddenly the death penalty seems sort of reasonable in extreme situations.
Admin
The fool! He needs another if!
///
Looks like I caught this one just in time! :)
Admin
http://en.wikipedia.org/wiki/Lisa_mcpherson
http://en.wikipedia.org/wiki/Operation_Freakout
http://en.wikipedia.org/wiki/Operation_Snow_White
Be very careful how you decide to engage them.
Admin
I think you mean, "trueandorfalse(clever)".
Admin
LMAO greatest comment ever
Admin
Extra credit to those who actually counted!
Admin
What about FILE_NOT_FOUND?
Admin
This suit is black not.
Admin
TRWTF is Microsoft thinking that using XML for comments was a good idea.
Admin
What if the boolean isn't true or false though?
Admin
Thank goodness someone knows that you have to make sure the computer really gets it. But just to make sure, you should return it again, in case the computer missed the return statement the first time.
:)
Also... 47. Extra credit
Admin
The real WTF is when a decent compiler doesn't turn this method call into a simple ! operation.
Admin
XML is a good idea for EVERYTHING.
Admin
It is great joke. I like. Tjenkoeje.
Admin
trueandorfalse(its) only that the coder trueandorfalse(does) know the basic operands, but he also feels he trueandorfalse(could) be bothered to look for them at the moment.
but he is somehow capable of endless trueandorfalse(wit) in his comments.
Admin
Countdown to Alex being sued, murdered, or falsely discredited for being a sexual deviant:
10:01:59... 10:01:58... 10:01:57... 10:01:56...
Admin
The lawyers at the Church of Scientology have been notified and will sue the pants off of Alex, the original author of this posting, and the original author of the code.
Addendum (2009-10-07 11:21): The lawyers at the Church of Scientology have been notified and will sue the pants off of Alex, the original author of this posting, and the original author of the code. Katie Holmes will represent the church in court and will appoint Tom Cruise as the judge. If you accuse them of bias by attempting to appoint a fellow follower as the judge, they shall sue you a second time.
Admin
I've seen this before unfortunately. Only it's been 1 to 0 and 0 to 1 instead of using the built in boolean of the language.
Admin
Admin
What is the "true of false"? Is there truth in falsehood?
Admin
Admin
Admin
Calm down, don't go all Sci-Fi on him!
Admin
GREATEST. WTF. EVER.
Admin
Admin
You fail on your last use of trueandorfalse.
wit not? not wit? trueandorfalse(does) make sense.
Admin
Like this?
Now, about the halting problem...
Admin
From now on, I'm outsourcing all my development work to the Church of Scientology. I mean, at least they admit their Book was written by a science fiction author.
Admin
if((!notShouldContinue) == false)
Good luck.
Admin
... couldn't resist. CAPTCHA: secundum. !primum
Admin
Fired.
Admin
FRIST
Admin
I'm quite sure there is a very clever post commenting this, I just can't find it right now ...
Admin
That one was intended as a "...endless wit (not!) .." sort of thing.
Admin
Admin
The googles....they do nothing!
Captcha: plaga... like the RE:4&5 plot device.
Admin
Yeah. Only problem is that the compiler won't like this since you use an if instead of an else. So it might get to the end of the function without returning anything. Solution: throw an exception!
Admin
Admin
I have frequently seen code that is clearing trying to initialize a flag that looks like this:
if (flag==true) flag=false;
I've seen this from multiple programmers at different companies, like they must either teach this in school somewhere or it's a common form of mental illness. What, you think that it will take the computer longer to set the flag to false when it's already false then it would to first check if it's true? Actually the reverse is almost certainly the case. Or are you just being careful not to set it to false when it's currently FILE_NOT_FOUND?
Ditto on:
if (amount1!=0) total=total+amount1;
Yeah, we want to save the computer from having to add the two numbers together if one of them is zero. Except, the "if" almost surely takes longer than the plus, so if it's not zero, the "if" is completely superfluous wasted time, and if it is zero, you've still taken longer than just adding it in.
Admin
Well, actually, it DOES do something more than the NOT operator (!) does.
It maps values that are EXACTLY equal to "true" to false, everything else maps to true.
If we assume that the incoming value might have come from an unsafe source, and might contain any random value, then it does do something slightly different than (!)
Not that that makes it any better.
Admin
If it wasnt for the amusing "similar to the church of scientology" text, I would fire this person on the spot.
Admin
LOL! I haven't laughed this hard in a long time.