| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
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.) |
Re: Comments from a Madman
2007-06-22 09:11
•
by
guy
(unregistered)
|
No, if (Jack.WorkQuantity == "All" && Jack.PlayQuantity == "FILE_NOT_FOUND") |
|
// 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. |
I hope this guy's writing ATM software. |
|
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; } |
Love it :-) Captcha: sanitarium, yep that's the current location of this submission's author |
|
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:
|
|
Now THIS is a good WTF front post. I love it! xD
|
Re: Comments from a Madman
2007-06-22 09:30
•
by
Michael
(unregistered)
|
The line is "All work and no play makes Jack a dull boy", so if Jack.PlayQuantity = "Some", then your logic would still make Jack a dull boy. Alternatively, you could have: if (Homer.TVQuantity == "None" && Homer.BeerQuantity == "None) { Homer.action("Something Something");// Go crazy? } |
|
I love this one:
Yeah, I wonder why that is happening! |
This is my favourite. xD Captcha: wigwam... hough chief... |
|
"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 |
|
My personal favorite:
|
|
I loved that one
|
|
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. |
Ok... now he's talking to himself, hearing an imagined response, and answering back... (P.S. In this case, the captcha is eerily appropriate: "alarm"!) |
|
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.
|
|
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 |
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! |
CAPTCHA: bling Be quiet and just bling bling. |
|
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." |
|
Q: How do you know when DailyWorseThanFuck has really, finally, truly jumped the shark?
A: When anime emoticons start showing up in the comments. |
|
I hope this guy writes code for that Vegas balloon billboard you guys put on wtf yesterday!
dan |
|
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 |
|
catch(Exception e) {};// sometimes its best to be quiet
this is where my 100 points go |
|
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. '// set a global reference (global within this project) to the current Service Object '// so that other parts of the app have easy access to it. Yeah Yeah! Global. I know. '// Back off! '// this function spits back a CRLF delimited list of files found in the supplied folder '// that match the supplied filespec (Spec variable). The function returns plain text so that '// it can be run from nearly anywhere, via DCOM, locally, whatever. This way, no type conversion '// or marshalling issues arise. '// The code here is elementary level API calls, and if you don't follow along, please close this file '// now and stay out of my code... ie... DO NOT Check this file out for any reason! '// 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 sub gen's up a BRAlert object (DCOM server) and uses it to dispatch alerts '// most of the code is self-explanitory, noting that instead of using "NEW", it's using "CREATEOBJECT" '// to create the server object. This is because NEW can not create remote DCOM servers. '// A long long time ago, in a galaxy far away, I set up the original BRPHL-SWEEP01 server as a BRAlert server '// and have continued to use it as the production alert dispatcher! '// 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: |
|
Absolutely frigging brilliant.
Sometimes I wish I had such comments when reviewing crappy code. That would at least be less boring. |
|
Looks like he's writing a tomcat application. In which case I can sympathize, that stuff is brutal to work with.
|
|
|
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... |
|
The real WTF is that the guy wrote this stuff into the source code rather than talking about it to his psychoanalyst... ;-)
|
|
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. |
Re: Comments from a Madman
2007-06-22 11:02
•
by
Corporate Cog
(unregistered)
|
Why, oh why isn't that my trademark comment? Best comment ever (I sure hope it's real). |
|
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. |
Re: Comments from a Madman
2007-06-22 11:23
•
by
RON
(unregistered)
|
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. |
|
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 |
The real real wtf is that Java doesn't let you overload operators. AT ALL. |
|
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, |
Re: Comments from a Madman
2007-06-22 12:20
•
by
Godai
(unregistered)
|
|
I'd buy the game just to see said rat.
Mmmmm captcha tacos. |
|
drugs and software don't mix well together
|
Re: Comments from a Madman
2007-06-22 12:28
•
by
A.N.Other
(unregistered)
|
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! |
|
My favorite (from an intern):
|
|
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. |
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?! |
|
Ah, the stream of consciousness style of commenting.
|
Don't mind if I do! |
Re: Comments from a Madman
2007-06-22 12:54
•
by
bonzombiekitty
|
|
From the project I'm currently working.
Also, when you shut down my program it says "You don't love me. Killing myself :( " |
|
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); } |
|
if (Jack.MethQuantity == "Lots" && Jack.PotQuantity == "Lots")
{ Jack.CodeType = CodeType.WTF; } |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |