• Harry (unregistered)

    Brilliant!

  • Chris (unregistered)

    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.)

  • guy (unregistered) in reply to Chris
    Chris:
    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

    No,

    if (Jack.WorkQuantity == "All" && Jack.PlayQuantity == "FILE_NOT_FOUND")

  • Telimaktar (unregistered)

    // 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.

  • (cs)
    //if we're not getting the database, just return some random numbers instead

    I hope this guy's writing ATM software.

  • (cs) in reply to Chris

    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; }

  • Wildpeaks (unregistered)
    // this check in abstract should not be needed, // but abstract is often too abstrat for me to postive about
    Love it :-)

    Captcha: sanitarium, yep that's the current location of this submission's author

  • W.B. McNamara (unregistered)

    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:

    Then we have the ever-popular “oops” comments. These are particularly enjoyable, as they invariably exist independent of any more detailed examination of the issue (or any indication of whether it was resolved):
    ;;; what the fuck is this crap? looks like I left a sponge in the patient.
  • (cs)

    Now THIS is a good WTF front post. I love it! xD

  • Michael (unregistered) in reply to undefined
    undefined:
    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; }

    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? }

  • (cs)

    I love this one:

    // I don't get this why substracting 1 from the month is giving // 1 YEAR ago. Would appear bad, so watch this gc.add(Calendar.YEAR, -1);

    Yeah, I wonder why that is happening!

  • MoroS (unregistered)
    ... F**K <- Who wrote that??? ...

    This is my favourite. xD

    Captcha: wigwam... hough chief...

  • DOA (unregistered)

    "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

  • (cs)

    My personal favorite:

    // not sure why this needs to be a HashMap - and I wrote the damn thing
  • jimjim (unregistered)

    I loved that one

    //This is a miserable hack I am about to perform.
  • Nick (unregistered)

    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.

  • BlueKnot (unregistered)
    // don't ask.... okay you wanna know.
    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"!)

  • Carrie (unregistered)

    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.

  • (cs)

    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

  • (cs) in reply to Chris
    Chris:
    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.)

    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!

  • easyon (unregistered)
    // sometimes its best to be quiet
    CAPTCHA: bling Be quiet and just bling bling.
  • (cs) in reply to mkb

    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."

  • (cs)

    Q: How do you know when DailyWorseThanFuck has really, finally, truly jumped the shark? A: When anime emoticons start showing up in the comments.

  • dan (unregistered)

    I hope this guy writes code for that Vegas balloon billboard you guys put on wtf yesterday!

    dan

  • SchizoDuckie (unregistered)

    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

  • /b/ (unregistered)

    catch(Exception e) {};// sometimes its best to be quiet

    this is where my 100 points go

  • chornbe (unregistered)

    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:

  • Theo (unregistered)

    Absolutely frigging brilliant. Sometimes I wish I had such comments when reviewing crappy code. That would at least be less boring.

  • Bob Saget (unregistered)

    Looks like he's writing a tomcat application. In which case I can sympathize, that stuff is brutal to work with.

  • marlow4 (unregistered)
        /*¤***********************************************************
         *                                                           *
         *  .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.       *
         *   |                     ______                     |      *
         *   |                  .-"      "-.                  |      *
         *   |                 /            \                 |      *
         *   |     _          |              |          _     |      *
         *   |    ( \         |,  .-.  .-.  ,|         / )    |      *
         *   |     > "=._     | )(__/  \__)( |     _.=" <     |      *
         *   |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |      *
         *   |           "=._"(_     ^^     _)"_.="           |      *
         *   |               "=\__|IIIIII|__/="               |      *
         *   |              _.="| \IIIIII/ |"=._              |      *
         *   |    _     _.="_.="\          /"=._"=._     _    |      *
         *   |   ( \_.="_.="     `--------`     "=._"=._/ )   |      *
         *   |    > _.="                            "=._ <    |      *
         *   |   (_/                                    \_)   |      *
         *   |                                                |      *
         *   '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='      *
         *                                                           *
         *      LASCIATE OGNI SPERANZA, VOI CH'ENTRATE               *
         *************************************************************/
    
  • BigJim (unregistered)

    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...

  • Da' Man (unregistered)

    The real WTF is that the guy wrote this stuff into the source code rather than talking about it to his psychoanalyst... ;-)

  • Corporate Cog (unregistered)

    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.

  • Corporate Cog (unregistered) in reply to marlow4
    marlow4:
    [code] LASCIATE OGNI SPERANZA, VOI CH'ENTRATE

    Why, oh why isn't that my trademark comment? Best comment ever (I sure hope it's real).

  • (cs)

    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.

  • RON (unregistered) in reply to mkb
    mkb:
    Chris:
    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.)

    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!

    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.

  • anonymous coward (unregistered)

    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

  • (cs) in reply to RON
    RON:
    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.

    The real real wtf is that Java doesn't let you overload operators. AT ALL.

  • (cs)

    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,

  • Godai (unregistered) in reply to MikeBeer

    I'd buy the game just to see said rat.

    Mmmmm captcha tacos.

  • bpk (unregistered)

    drugs and software don't mix well together

  • A.N.Other (unregistered) in reply to Nick
    Nick:
    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.

    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!

  • PseudoNoise (unregistered)

    My favorite (from an intern):

    void SomeParser::OnStop ()
    {
      exit(0); // quit gracefully
    }
    
  • (cs)

    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.

  • (cs) in reply to BlueKnot
    BlueKnot:
    // don't ask.... okay you wanna know.
    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"!)

    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?!

  • Shinobu (unregistered)

    Ah, the stream of consciousness style of commenting.

  • (cs) in reply to Michael
    Michael:
    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? }

    Don't mind if I do!

  • (cs) in reply to A.N.Other

    From the project I'm currently working.

    ...
     //OH NOESSSSS!  UI BE DYING!!!
    ...
      //Yeah, yeah, I kinda broke the implied rules for .equals().  
      //Sue me.  You shouldn't ever be using this anyways!  
    ...
      //How the feck did the program get to this line?
    ...
      // Yeah, I shouldn't catch an entire exception.  Leave me alone.
    ...
      //Run this as it's own thread.  YAY! THREADS!!!
    

    Also, when you shut down my program it says "You don't love me. Killing myself :( "

  • Darien H (unregistered)

    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); }

  • (cs)

    if (Jack.MethQuantity == "Lots" && Jack.PotQuantity == "Lots") { Jack.CodeType = CodeType.WTF; }

Leave a comment on “Comments from a Madman”

Log In or post as a guest

Replying to comment #142246:

« Return to Article