- 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
Brilliant!
Admin
The part of this which I find is the most WTF is this:
if (Jack.WorkQuantity == "All" && Jack.PlayQuantity == "All") { Jack.BoyType = BoyTypes.Dull; }
Shouldn't that be
if (Jack.WorkQuantity == "All" && Jack.PlayQuantity == "No") { Jack.BoyType = BoyTypes.Dull; }
lol, all work and all play makes jack a dull boy (whoops, fixed it - ed.)
Admin
if (Jack.WorkQuantity == "All" && Jack.PlayQuantity == "FILE_NOT_FOUND")
Admin
// just need get the &#$*ing class name of a string array String[] blah = new String[1];
Lol, how I'd love to put that in my comments. Give the next victim a laugh.
Admin
I hope this guy's writing ATM software.
Admin
No, it should be change from/to:
if (Jack.WorkQuantity == "All" && Jack.PlayQuantity == "All") { Jack.BoyType = BoyTypes.Dull; }
if( Jack.WorkQuantity == "All" && !Jack.PlayQuantity == "All"){ Jack.BoyType = BoyTypes.Dull; }
Admin
Captcha: sanitarium, yep that's the current location of this submission's author
Admin
I think I've pointed to it before, but a year or so ago I came across a file of the most interesting comments I'd encountered while "maintaining" a large web-based app.
From the post:
Admin
Now THIS is a good WTF front post. I love it! xD
Admin
Alternatively, you could have:
if (Homer.TVQuantity == "None" && Homer.BeerQuantity == "None) { Homer.action("Something Something");// Go crazy? }
Admin
I love this one:
Yeah, I wonder why that is happening!
Admin
This is my favourite. xD
Captcha: wigwam... hough chief...
Admin
"catch(Exception ex) { System.out.println("CAN'T DO S**T"); };"
Now all we have to do is wait till this shows up on a giant screen somewhere
Admin
My personal favorite:
Admin
I loved that one
Admin
I once added the following comment to some code I wrote...
// If you can understand this code... then I congratulate you. See me for a cookie.
I'm not going to publish the code, as it wouldn't make sense out of context... but let's just say I had Hashtables containing Hashtables containing ArrayLists. I'm not saying it was the smartest idea, but it worked.
Admin
(P.S. In this case, the captcha is eerily appropriate: "alarm"!)
Admin
Gee, the best comment I've ever seen was probably "Keep on truckin'..." on a loop. I feel deprived. This probably isn't a bad thing in this case.
Admin
AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!
Funny thing is, I can almost hear myself thinking those same things. A good night's sleep and a diff before check-in almost always fixes that. And NOT having the 6-pack at lunch
Admin
This is Java, so you should probably be doing if (Jack.WorkQuantity.equals("All") && Jack.PlayQuantity.equals("No"))
Come on, the author of the daily horrible code sample should know better by now!
Admin
Admin
Or at least if (Jack.WorkQuantity.intern() == "All".intern() && Jack.PlayQuantity.intern() == "No".intern())
Plus, the Java conventions would have those be metods called getWorkQuantity and getPlayQuantity. "Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized."
Admin
Q: How do you know when DailyWorseThanFuck has really, finally, truly jumped the shark? A: When anime emoticons start showing up in the comments.
Admin
I hope this guy writes code for that Vegas balloon billboard you guys put on wtf yesterday!
dan
Admin
Something tells me this guy should indeed just go flippin' hamburgers 'cause he just writes damn shitty code that he doesn't even understand himself.
LOL @ vt_mruhlin's ATM comment b.t.w. :D
Admin
catch(Exception e) {};// sometimes its best to be quiet
this is where my 100 points go
Admin
Man, do I feel this guy's pain. Oh my, oh my, oh my.
This prompted me to go look at a few older projects that I remember having some interesting things in them. Found a gem or two:
'// this is a hokey and kludgy module I came up with to encapsulate the logging in the CMLService app. '// I'm not real proud of the mechanics, but the end result is nice. If you need to mess with it, please '// remember to take your medication first. I'm not responsible for your mental state when you're done. '// It has a dependencie on the CLogger class (Pronounced See-Logger, not Clogger - this ain't RotoRooter!)
'// Real simple. Either the file's there, or it ain't! '// as with other modules, this is elementary API code. If you don't follow along, close the file '// and don't mess with it. Just call it from elsewhere, since it's a global (LocateFile()) '// These api calls are simple and easy to use, but changing the delcaration(s) '// can not only break them, but can cause GPFs and all sorts of nasty and hairy things on the system.
'// DELPIAN Globals... Yeah, I know... Back off man.
'// Does this module really need any comments? '// ok, fine. This module contains some, hopefully most, definitely not all, of the global const's used '// thru' the project.
'// This code is ripped from MSDN then slightly modified for my purposes. Ego-centric programmers '// ALWAYS "improve" stolen code to make it "better". '// Like some other modules, if you really want to change this, make sure you're medicated first. '// It's very specific... it validates, and logs in if necessary, to a network share. It works, so '// I wouldn't mess with it if I were you. If you do, be sure to add your name to the list of those '// who modified it :) Like this:
Admin
Absolutely frigging brilliant. Sometimes I wish I had such comments when reviewing crappy code. That would at least be less boring.
Admin
Looks like he's writing a tomcat application. In which case I can sympathize, that stuff is brutal to work with.
Admin
Admin
One of the funniest comments I've actually seen in a production app was where the developer was restoring some data after a rollback
// OK let's do a Streisand and get back to the way we were
I had to explain to my cubemates why I was giggling uncontrollably, wondering if anyone had "outed" the guy...
Admin
The real WTF is that the guy wrote this stuff into the source code rather than talking about it to his psychoanalyst... ;-)
Admin
I write comments like this all the time Here are two that I just came back across in the last couple days:
/// Take that, maintenance programmer! Off by ones rule!
/// Warning!!!!!! Voodoo!!!!!! Black Magic!!!!! /// The [object] embedded in this form is just plain weird [goes on]
It's only because I work on such a bloated, old system. No really, it is.
Admin
Why, oh why isn't that my trademark comment? Best comment ever (I sure hope it's real).
Admin
Commenting like that is strangely therapeutic, and even fun. It makes maintaining my own code interesting. I'm sure if I looked back at some old projects, I'd see comments somewhat like that. Although perhaps not so crazy.. :)
Although to be fair, my code is actually good. His appears to be a big kludge. Although when I did Tomcat dev, mine was a big kludge too, so I don't blame him.
Admin
The REAL WTF is that Java forces people to use annoying syntax when comparing strings.
I seriously don't understand how people can stand that language.
Admin
Can you switch the CAPTCHA to use nonsense text instead of words? Hopefully, that would get people to stop telling everyone what their CAPTCHA phrase was.
Captcha: sanitarium
Admin
The real real wtf is that Java doesn't let you overload operators. AT ALL.
Admin
Here's an enum value I found:
A_DAMN_LITTLE_ITTY_BITTY_RAT_MADE_TO_SATISY_PUBLISHERS_CONTINUITY_WHINING_WHICH_NEVER_WOULD_HAVE_EXISTED_IF_THE_3D_DEPARTMENT_HADNT_RENEDERED_THE_RAT_IN_THE_FIRST_PLACE_WHICH_THEY_HAD_DONE_BECAUSE_THEY_THOUGHT_THEY_WERE_BEING_CUTE_WELL_NOW_BUDDY_WHERE_HAS_THIS_GOTTEN_US_NOW_HUH_JUST_ANOTHER_CONTINUITY_BUG_FOR_A_STUPID_LITTLE_TWO_FRAME_ANIMATION_OF_A_RAT_THAT_HAS_NOTHING_TO_DO_WHATSOEVER_WITH_THE_REST_OF_THE_GAME_IN_ANY_WAY_EXCEPT_TO_ANNOY_PROGRAMMERS_WHO_HAVE_FAR_MORE_IMPORTANT_THINGS_TO_DO_NOW_OKAY = 370,
Admin
I'd buy the game just to see said rat.
Mmmmm captcha tacos.
Admin
drugs and software don't mix well together
Admin
Nothing wrong with hash tables in has tables! I have just written nested hashtables as a complex caching solution and is a quick solution. Not saying always best way though!
Admin
My favorite (from an intern):
Admin
Brings back a memory from many years ago. A client I was working with had hired a "programmer" to write a CP/M BIOS. (Yes, this was well back in the day!) He brought the guy in from out of town and holed him up in a cheap motel with no transportation and very little money. The guy was in well over his head, and was being subjected to continual pressure to produce. The first release was buggy as expected, but whas shipped anyway. Soon complaints began filtering in from customers who had gone into DEBUG and viewed the BIOS code, where they encountered this (edited) text string: Eat s*** and die John! Shortly after that I was given the assignment to create a new BIOS, rated G.
Admin
Look, for gods sake, the captcha is always eerily appropriate: this is an IT site and the captcha is stocked with IT terms! So stop posting your captchas already?!
Admin
Ah, the stream of consciousness style of commenting.
Admin
Don't mind if I do!
Admin
From the project I'm currently working.
Also, when you shut down my program it says "You don't love me. Killing myself :( "
Admin
assert (jack.timeDistrib.get('work') + jack.timeDistrib('play') == jack.timeDistrib.total() : "Total time not divided into work or play"; if(jack.timeDistrib.get('work') == jack.timeDistrib.total()){ jack.setBoy(Boy.Dull); }
Admin
if (Jack.MethQuantity == "Lots" && Jack.PotQuantity == "Lots") { Jack.CodeType = CodeType.WTF; }