- 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
#define if while
Admin
#define define null
Admin
#define define undef
Admin
or even better:
#define po-tay-toe po-ta-toe
Admin
Admin
sounds like you've an eating problem
Admin
Admin
I just wanted to say: 21th!
Admin
I love it. It makes so much sense on so many levels. I will include this in the banking/finance sector software suite I'm working on.
Thanks for a very good idea.
PS: I'm actually serious.
Admin
#undef reality #define reality my_reality
Admin
Admin
TDWTF time appears on my status report as "Researched industry best practices for code design."
Admin
Admin
This cannot possibly be real...
Admin
Maybe this is the least of the issues with this code, but exactly why does he multiply by 1? Maybe I'm missing some type conversion that this forces? I seem to recall being taught in elementary that multiplying by 1 was an identity transformation.
Admin
Maybe it's a good thing that so many people are stupid. Because if someone is both evil and stupid, this tends to make his evil relatively ineffective. Like, if Hitler had not been a brilliant speaker and politician, he would not have become the dictator who plunged the world into war and slaughtered millions of innocent people, but just that annoying guy at the bar who was constantly going on and on about the Jews.
Admin
Thank God for static_assert...
Admin
Why do you put icing on a cake? Just because.
Admin
Admin
Good Lord, my exact thought.
Admin
+1
Not particularly revelatory, but it's sage enough to bear repeating.
Admin
And everyone works at the same time, even people in different timezones.
Admin
Admin
Careful everyone... true evil walks among us...
Admin
This is clearly an example of the f*ckhead pattern.
Admin
Wow - if this is a facade, I'd hate to see a decorator.
Admin
"If user provides input, input is in error."
His version is a little overcomplicated, but I like the concept. Here I've wasted 2/3 of my life trying to determine if user input is bad, and all along I could have just been assuming it's bad and making up a random error.
Admin
I smell a coding contest... who can write the code that does the most to look like it is supposed to do X while not actually performing X.
Admin
My downstairs neighbour is evil AND stupid.
Admin
Admin
Admin
You mean like this?
The Underhanded C Contest has been around for a while now. I suggest you get some /. in you before you lose your geek card!
Admin
I assume you have an 's' in the 4th position of your password... you see, I can't tell because your password just appears as a series of asterisks to me.
Admin
It didn't work for me.
Admin
The same guy must be behind the PAYPlus USA software encountered by J Watson...
http://thedailywtf.com/Articles/Password-Perplexity.aspx
Either that, or it's a common industry pattern.
Admin
Much better!
Admin
I am so implementing a GenerateRandomError() function in my code tomorrow!
Admin
Currently reading 'Eat or be Eaten', and it has solutions for these fucks. Basically, document your requests (in a black book that goes home with you), qualify your promises around whatever they need to deliver, and alert your boss to the nonresponsiveness of said fat fuck (using black book). There is some discussion on how to do this without appearing ineffective, and it comes across as one of the more hands-on guides to surviving office politics.
Admin
being confrontational, like all things, works best when done right. Learn how or suffer the consequences.
Admin
It seems to me jealousy is the root of the problem here. Learn how to be as self-reliant as possible. Build trusting relationships with receptive coworkers, avoid untrustworthy ones, and, above all, learn to let go of anger and hostility. That guy's work ethic should have no power over how you feel. If you disapprove of his behavior and this controls your emotions, he wins-twice.
Admin
I think i am missing the point here. Why not do what Microsoft does? I mean thats way more effective use of developers time... And it's reusable.
Admin
The good part about this code is that it's written in a manner that's straightforward and easy to read/understand. I mean having a function named "GenerateRandomError()" is really self-explanatory. So good job on that part.
TWTF is why would someone want to code something like this that's intentionally broken? Did they have some sort of vendetta? And if they did, what an odd way to go about it. I mean no logic bombs that take out the mainframe, just something that's really annoying.
-- Furry cows moo and decompress.
Admin
I think I have used quite a few applications that this developer has written. At least I am pretty sure the GenerateRandomError method was in all of them.
Admin
I knew fat guy once that was a hard worker. I agree with you that slackers plague you where ever you go and that they suck. I just don't think it's fair to say that short, fat guys with stubby fingers are always slackers.
-- Furry cows moo and decompress.
Admin
So does anyone know if PAYPlus USA chose random letters to complain about? If so, then I believe we may have a winner.
Admin
Admin
He didn't say that, he said the converse: slackers are always short fat guys with stubby fingers.
Admin
And even worse - the Math.random() * 1. What a waste of 4/8 bytes.
Admin
So he should remove it, and take a nibble out of crime?
Admin