• Fer (unregistered)

    //Comment (boring, funny, first - default value is none) public String comment;

  • scnr (unregistered)

    //Status (true, false - default value is FileNotFound) public boolean status;

  • wheaties (unregistered)

    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.

  • Pyrexkidd (unregistered) in reply to scnr
    scnr:
    //Status (true, false - default value is FileNotFound) public boolean status;

    [code] //Status (true, false, maybe - default value is FileNotFound) public Boolean statis; [/code0

    FTFY

  • Bael (unregistered) in reply to Pyrexkidd
    Pyrexkidd:
    scnr:
    //Status (true, false - default value is FileNotFound) public boolean status;

    [code] //Status (true, false, maybe - default value is FileNotFound) public Boolean statis; [/code0

    FTFY

    At least the peer review process is working well...

  • Pyrexkidd (unregistered) in reply to Pyrexkidd
    Pyrexkidd:
    scnr:
    //Status (true, false - default value is FileNotFound) public boolean status;
    //Status (true, false, maybe - default value is FileNotFound)
    public Boolean statis;
    

    FTFY

    FTFM

    CATPCHA: conventio -- this article. as in this article is very conventio.

  • tekHedd (unregistered)

    The real WTF is that someone will probably post a comment claiming this isn't a WTF.

    Captcha: eros - finally a captcha I can endorse wholeheartedly.

  • (cs)

    Okay, so he made the status a string. Probably not the best option; I'd have used an enum or something. Also, it being a string with (I'd expect) a finite range of possible values, making it public probably isn't a good choice either. Words like "best practice" and "quality" certainly don't come to mind here. But I suppose it'll work, as long as no one abuses the unneeded flexibility of a public string.

    I can appreciate that the comment lists the range of possible values for status (probably the only "best practice" shown), although my prior observations leave me doubtful of the comment's accuracy. So at this point, unless I'm missing something obvious I'd almost say that it's "not really a WTF".

    Except then I examine the following bit:

    default value is false
    Someone please find this code's author and shoot him.
  • (cs) in reply to tekHedd
    tekHedd:
    The real WTF is that someone will probably post a comment claiming this isn't a WTF.
    Almost, but not quite.
  • The Nerve (unregistered)

    Fixed?

    //Status (none, active, finished - default value is none)
    public String status;
  • (cs) in reply to The Nerve
    The Nerve:
    Fixed?
    //Status (none, active, finished - default value is none)
    public String status;
    Better:
    //Status (none, active, finished - default value is none)
    public String status = "none";
    Certainly not fixed.
  • Punkin Pie (unregistered) in reply to boog
    boog:
    so he made the status a string. Probably not the best option
    Sounds like you don't have much real-world experience (well, not experience with J2EE, anyway). When you graduate, you may find that 1) there are many things that are configured using XML, and 2) developers hate writing XSDs (or DTDs either for the pedantic). When you write objects to map to the strings found in the XML produced by outside vendors, there is literally no way to determine beforehand what string values will be. Furthermore, it may not even be necessary to know, since you later just convert back to XML and send or simply persist to the database.
  • Punkin Pie (unregistered) in reply to boog
    boog:
    The Nerve:
    Fixed?
    //Status (none, active, finished - default value is none)
    public String status;
    Better:
    //Status (none, active, finished - default value is none)
    public String status = "none";
    Certainly not fixed.
    FYI, that's a terrible way to do initializations if you anticipate the class being extended in the future.
  • boog (unregistered) in reply to wheaties
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.
  • Matt (unregistered)

    var comment:String = new String(); comment = "this post sucked"; trace("Alex, come on.");

    Yes, I know my post is as lame as the article, but I'm not very inspired. But this "article" wasn't either.

    No redacted reference to what this "large logistics company" was. (Fedex? UPS?) Or even the slightest reference to what part of the code that logic applied to. Even if it was a general function, a little more back store would make it more entertaining reading.

    I guess it's the whole "Representative Line" theme. But in my likely to be flamed opinion, this line represents nothing to me.

    Captcha: refoveo Red rover, red rover, come oveo and gimme a better wtf.

  • Polar Bear (unregistered) in reply to boog
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

  • Winston Ewert (unregistered) in reply to Punkin Pie

    There may well be cases where a string is the best status, I'd say that in most cases its a poor choice. I prefer my types to indicate something useful. Certainly, thats no basis for impuning someone's real world experience.

  • Matt (unregistered)

    Did I mention I hated this article? Maybe it's the Christmas anti spirit.

    Deck the forums with balls of stupid, fa la la la la.

    Noel, noel, no elohel.

    The First no elohel, the Angels didn't say Was to certain poor posters in fields as they say In fields where they lay keeping their posts up to date On a cold Wednesday day that was so deep. elohel, elohel, elohel, elohel Born is the King of Weak Posting!

    Captcha: tation Temptation to be more abbreviated.

  • (cs)

    True WTF is the CIA W.T.F.

  • Professor Ugoddadee (unregistered)

    default value = false means that there IS NO default value!!!

  • Steve (unregistered) in reply to boog
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing there's a category called "Representative Line," you're not forgiven for failing to read that fact stated explicitly in the story.

    FTFY

  • oy (unregistered) in reply to Professor Ugoddadee
    Professor Ugoddadee:
    default value = false means that there IS NO default value!!!

    As many have alluded to with the "default value = none" comments, I hope.

    Seriously though, if this was the worst WTF that could be found in the entire codebase... then you must be one whiny and weak programmer. Especially considering that with zero context, 50% of the commenters here have been able to come up with a logical and well-fitting explanation for the comment+code line.

    That's not to say that those 2 lines aren't poor, lazy, or both... just that they're really weak for a "representative" wtf.

  • rfoxmich (unregistered)

    //Status (none, active, finished - default value is wtf) public String status;

  • Jon W (unregistered) in reply to Punkin Pie

    And the fact that the entire J2EE world is basically one big WTF is a defense how, exactly?

  • Mike (unregistered) in reply to The Nerve
    The Nerve:
    Fixed?
    //Status (none, active, finished - default value is none)
    public String status;

    Almost:

    //Result (none, active, finished - default value is false)
    public String status = (true ? bool.Parse("true").toString() : bool.Parse("false").toString());

    There we go. Very enterprisey.

  • (cs) in reply to Punkin Pie
    Punkin Pie:
    Sounds like you don't have much real-world experience (well, not experience with J2EE, anyway). When you graduate, blah blah condescension blah...
    Wow, such seemingly-uncalled-for disdain over a tongue-in-cheek comment. I must have really hit a nerve.

    Perhaps this was your code?

  • (cs) in reply to Punkin Pie
    Punkin Pie:
    FYI, that's a terrible way to do initializations if you anticipate the class being extended in the future.
    Oh really? Terrible, you say? That extreme is it?

    Do explain.

  • (cs) in reply to Winston Ewert
    Winston Ewert:
    Certainly, thats no basis for impuning someone's real world experience.
    Unfortunately, it seems that most people just can't resist the opportunity.
  • Me (unregistered) in reply to boog
    boog:
    ... But I suppose it'll work, as long as no one abuses the unneeded flexibility of a public string....
    Hahahahahaha! Funniest comment I've read in a long time.
  • (cs) in reply to boog
    boog:
    Okay, so he made the status a string. Probably not the best option; I'd have used an enum or something.

    Well we don't know what the string is used for, perhaps it is the value that is being displayed to the user. A string seems slightly better than an enum in that case.

    TRWTF is the story. The code base is apparently a heaping mass of dung, and the representative line is a comment that isn't quite accurate? Seriously? Is the problem a lot of comments that are wrong, or that it uses a lot of public variables?

    Man if this is the worst the code has to offer, AND it sums it all up, then the code is probably pretty nice.

  • (cs) in reply to chrismcb
    chrismcb:
    Well we don't know what the string is used for, perhaps it is the value that is being displayed to the user. A string seems slightly better than an enum in that case.
    Now you know why I used the qualifier "probably".

    Honestly though, you're right; it's hard to say what the best option would have been without seeing the code in context.

  • (cs) in reply to boog
    boog:
    chrismcb:
    Well we don't know what the string is used for, perhaps it is the value that is being displayed to the user. A string seems slightly better than an enum in that case.
    Now you know why I used the qualifier "probably".

    Honestly though, you're right; it's hard to say what the best option would have been without seeing the code in context.

    Even if it's being displayed to the user, you shouldn't have the string be public.

  • Punkin Pie (unregistered) in reply to DescentJS
    DescentJS:
    boog:
    chrismcb:
    Well we don't know what the string is used for, perhaps it is the value that is being displayed to the user. A string seems slightly better than an enum in that case.
    Now you know why I used the qualifier "probably".

    Honestly though, you're right; it's hard to say what the best option would have been without seeing the code in context.

    Even if it's being displayed to the user, you shouldn't have the string be public.
    The String has to be public to be accessed using Reflection (legally). Yet another indication that this is the right datatype.

  • Billy Milano (unregistered) in reply to Punkin Pie
    Punkin Pie:
    DescentJS:
    boog:
    chrismcb:
    Well we don't know what the string is used for, perhaps it is the value that is being displayed to the user. A string seems slightly better than an enum in that case.
    Now you know why I used the qualifier "probably".

    Honestly though, you're right; it's hard to say what the best option would have been without seeing the code in context.

    Even if it's being displayed to the user, you shouldn't have the string be public.
    The String has to be public to be accessed using Reflection (legally). Yet another indication that this is the right datatype.

    Dun Duh Dun Duh Dun Duh YOU'RE DUMB!

  • Grammer Nazi (unregistered) in reply to Polar Bear
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    And you're not forgiven for your incorrect use of the word "you."

  • (cs) in reply to Grammer Nazi
    Grammer Nazi:
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    And you're not forgiven for your incorrect use of the word "you."

    I think you got you're your's mixed up their, buddy.

  • (cs) in reply to Polar Bear
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    Muphrey's Law... Every fuck time! It almost never fails.

    PS: How can I make something bold in this forum???

  • Uh... (unregistered) in reply to Grammer Nazi
    Grammer Nazi:
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    And you're not forgiven for your incorrect use of the word "you."
    And you're not forgiven for mispelling "Grammar". </pedantic>

  • (cs) in reply to Punkin Pie
    Punkin Pie:
    DescentJS:
    Even if it's being displayed to the user, you shouldn't have the string be public.
    The String has to be public to be accessed using Reflection (legally). Yet another indication that this is the right datatype.
    Right, because reflection is always an indicator of "good software design", and is apparently relevant when simply displaying a value to the user (as suggested in this example context). Maybe you're just trolling now?
  • Mongy (unregistered) in reply to Matt
    Matt:
    Did I mention I hated this article? Maybe it's the Christmas anti spirit.

    Deck the forums with balls of stupid, fa la la la la.

    Noel, noel, no elohel.

    The First no elohel, the Angels didn't say Was to certain poor posters in fields as they say In fields where they lay keeping their posts up to date On a cold Wednesday day that was so deep. elohel, elohel, elohel, elohel Born is the King of Weak Posting!

    Captcha: tation Temptation to be more abbreviated.

    This is the real WTF...

  • vulputate (unregistered) in reply to frits
    frits:
    Grammer Nazi:
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    And you're not forgiven for your incorrect use of the word "you."

    I think you got you're your's mixed up their, buddy.

    Easiest way to troll on this forum is using "your" in place of "you're." The troll has earned more comments than the article.
  • LANMind (unregistered)

    Good Lord, what a bunch of banal replies...

  • Mongy (unregistered) in reply to pauly
    pauly:
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    Muphrey's Law... Every fuck time! It almost never fails.

    PS: How can I make something bold in this forum???

    Standard BBCOde...Square braces [] bold not bold

  • Ouch! (unregistered) in reply to pauly
    pauly:
    PS: How can I make something bold in this forum???
    By using the appropriate BBCode, there's a ling directly above the edit box.
  • More Grandma Nazis (unregistered) in reply to Uh...
    Uh...:
    Grammer Nazi:
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    And you're not forgiven for your incorrect use of the word "you."
    And you're not forgiven for mispelling "Grammar". </pedantic>

    I have to assume the mistake was deliberate....

    misspelling (mis prefixed to spelling)

    The wiggly red line underneath tells you that it's spelt (spelled, apparently) wrong

  • frits (unregistered)

    Who hasn't written a comment like this?

  • Hieflenhiemer (unregistered) in reply to More Grandma Nazis
    More Grandma Nazis:
    Uh...:
    Grammer Nazi:
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    And you're not forgiven for your incorrect use of the word "you."
    And you're not forgiven for misspelling "Grammar". </pedantic>

    I have to assume the mistake was deliberate....

    mispelling (mis prefixed to spelling)

    The wiggly red line underneath tells you that it's spelt (spelled, apparently) wrong

    Man, you're stupid. How hard is it to hit dictionary.com?

  • Matt (unregistered) in reply to Mike
    Mike:
    The Nerve:
    Fixed?
    //Status (none, active, finished - default value is none)
    public String status;

    Almost:

    //Result (none, active, finished - default value is false)
    public String status = (true ? bool.Parse("true").toString() : bool.Parse("false").toString());

    There we go. Very enterprisey.

    +1 for "enterprisey"

  • ÃÆâ€â„ (unregistered) in reply to Hieflenhiemer
    Hieflenhiemer:
    More Grandma Nazis:
    Uh...:
    Grammer Nazi:
    Polar Bear:
    boog:
    wheaties:
    That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.
    Reading comprehension fail. While you might be forgiven for not realizing their's a category called "Representative Line," your not forgiven for failing to read that fact stated implicitly in the story.

    And you're not forgiven for you incorrect use of the word "your".

    Captcha: Ingenium...perhaps your use of the word was "ingenium".

    And you're not forgiven for your incorrect use of the word "you."
    And you're not forgiven for misspelling "Grammar". </pedantic>

    I have to assume the mistake was deliberate....

    mispelling (mis prefixed to spelling)

    The wiggly red line underneath tells you that it's spelt (spelled, apparently) wrong

    Man, you're stupid. How hard is it to hit dictionary.com?
    They only know TDWTF. This is where they satisfy their urge to correct other people and/or pick up little boys.

  • (cs)
    //Blowjob (none, active, finished - default value is false)
    public String blowjob;
    

Leave a comment on “Status”

Log In or post as a guest

Replying to comment #:

« Return to Article