Status

  • Fer 2010-12-22 12:48
    //Comment (boring, funny, first - default value is none)
    public String comment;
  • scnr 2010-12-22 12:58
    //Status (true, false - default value is FileNotFound)
    public boolean status;
  • wheaties 2010-12-22 12:59
    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 2010-12-22 13:05
    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 2010-12-22 13:06
    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 2010-12-22 13:06
    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 2010-12-22 13:12
    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.
  • boog 2010-12-22 13:15
    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.
  • boog 2010-12-22 13:16
    tekHedd:
    The real WTF is that someone will probably post a comment claiming this isn't a WTF.

    Almost, but not quite.
  • The Nerve 2010-12-22 13:25
    Fixed?
    //Status (none, active, finished - default value is none)
    
    public String status;
  • boog 2010-12-22 13:33
    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 2010-12-22 13:34
    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 2010-12-22 13:36
    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 2010-12-22 13:38
    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 2010-12-22 13:45
    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 2010-12-22 13:49
    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 2010-12-22 13:49
    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 2010-12-22 13:52
    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.
  • Quicksilver 2010-12-22 13:52

    True WTF is the CIA W.T.F.
  • Professor Ugoddadee 2010-12-22 13:56
    default value = false means that there IS NO default value!!!
  • Steve 2010-12-22 14:06
    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 2010-12-22 14:10
    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 2010-12-22 14:27
    //Status (none, active, finished - default value is wtf)
    public String status;
  • Jon W 2010-12-22 14:28
    And the fact that the entire J2EE world is basically one big WTF is a defense how, exactly?
  • Mike 2010-12-22 14:31
    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.
  • boog 2010-12-22 14:33
    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?
  • boog 2010-12-22 14:35
    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.
  • boog 2010-12-22 14:38
    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 2010-12-22 14:38
    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.
  • chrismcb 2010-12-22 14:43
    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.
  • boog 2010-12-22 14:56
    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.
  • DescentJS 2010-12-22 15:11
    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 2010-12-22 15:21
    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 2010-12-22 15:30
    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 2010-12-22 15:31
    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."
  • frits 2010-12-22 15:35
    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.
  • pauly 2010-12-22 15:37
    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 <b>you</b> 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... 2010-12-22 15:44
    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>
  • boog 2010-12-22 15:47
    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 2010-12-22 15:50
    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 2010-12-22 15:50
    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 2010-12-22 15:53
    Good Lord, what a bunch of banal replies...
  • Mongy 2010-12-22 15:55
    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 <b>you</b> 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! 2010-12-22 15:57
    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 2010-12-22 16:00
    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 2010-12-22 16:09
    Who hasn't written a comment like this?
  • Hieflenhiemer 2010-12-22 16:11
    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 2010-12-22 16:11
    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"
  • ÃÆâ€â„ 2010-12-22 16:24
    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.
  • Spectre 2010-12-22 16:28

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

  • frits 2010-12-22 16:30
    vulputate:
    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.


    Whereas your mispelling, pal? Or orange you in on the joke?
  • The Corrector 2010-12-22 16:39
    ÃÆâ€â„:
    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 insult the articles and/or pick up bad programming tips.

  • Fer 2010-12-22 16:48
    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 <b>you</b> 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???


    you could submit a WTF clearly identifying your boss/company.
  • Mike 2010-12-22 17:00
    //Status (none, active, finished - default value is false)
    
    public String status;

    If the coder associated Null with False it could explain the comment and the lack of assignment?
  • John Evans 2010-12-22 17:10
    "Status" probably refers to the status of the status. In other words, there's a variable called actualStatus somewhere else in the code that holds the actual status; Status holds the status of the actual status held in actualStatus. If Status is "none", then actualStatus is null or "". If Status is "active", then actualStatus does not have a final value in it. If Status is "finished" then you can safely use the value in actualStatus.

    However, the default value of Status is "false"...which means that actualStatus is false. You can't trust its value. DON'T TRUST IT, MAN!
  • oheso 2010-12-22 17:28
    For me TRWTF is the fact there are no statuses to indicate development and testing. Is this a developmestuction environment?
  • Anon 2010-12-22 17:40
    TRWTF is that the code contains two lines.
  • Matt 2010-12-22 17:59
    Anon:
    TRWTF is that the code contains two lines.


    No you Anon. There is only one line of "code". The other line is a comment.
  • There is rover 2010-12-22 18:07
    their's, askimet
  • A C# Guy 2010-12-22 18:14
    So if this is Java, is it standard to make fields public and lower case?

    In C# we never make fields public- they are always acceesed through properties- I assumed best practice in Java was to use getters and setters. And lower casing a public field is a good way to confuse people used to normal standards.

    As for the status value being a string and uninitialized, this is totally forgivable if you are using an OR mapper that is mapping a value from the database that is stores as text. Otherwise that is an additional WTF.

    It might not seem like much on it's own, but code filled with direct access to public properties that do not use standard casing conventions and favors uninitialzed strings over enumerations would be pretty painful IMO.
  • Maurits 2010-12-22 18:17
    vulputate:
    The troll has earned more comments than the article.


    Sadly, I can infer only that the troll was more interesting than the article.
  • hoodaticus 2010-12-22 18:27
    A C# Guy:
    So if this is Java, is it standard to make fields public and lower case?

    In C# we never make fields public- they are always acceesed through properties- I assumed best practice in Java was to use getters and setters. And lower casing a public field is a good way to confuse people used to normal standards.

    As for the status value being a string and uninitialized, this is totally forgivable if you are using an OR mapper that is mapping a value from the database that is stores as text. Otherwise that is an additional WTF.

    It might not seem like much on it's own, but code filled with direct access to public properties that do not use standard casing conventions and favors uninitialzed strings over enumerations would be pretty painful IMO.
    Do OR mappers work on fields? I thought they tend to map to properties so that the getters and setters can be called....
  • hoodaticus 2010-12-22 18:29
    Maurits:
    vulputate:
    The troll has earned more comments than the article.


    Sadly, I can infer only that the troll was more interesting than the article.
    False dichotomy. We're all trolls, and we all find ourselves more interesting than the artikle.
  • DonQHoti 2010-12-22 18:32
    So when is someone going to go off on "their's"?
  • hoodaticus 2010-12-22 18:42
    A C# Guy:
    It might not seem like much on it's own, but code filled with direct access to public properties that do not use standard casing conventions and favors uninitialzed strings over enumerations would be pretty painful IMO.
    I'd wretch at the ugliness of it all. Also, maintenance of the project would stop until it could be re-written. I don't refactor utter shit; bad code usually indicates bad architecture that will haunt the project even after a full refactoring.
  • A C# Guy 2010-12-22 19:48
    Oops, I meant "Public Fields", but I guess my meaning was taken.

    Regarding OR mapping on fields- you are right, at least as far as nHibernate goes.
    I didn't think about that since i don't generally have fields the OR mapper would be able to access. I just know we have several public status properties in our app that are strings due to OR mapping needs, but we provide enumeration conversion method that developers are encouraged to use in these cases.
  • MarkJ 2010-12-22 20:21
    LANMind:
    Good Lord, what a bunch of banal replies...
    The Lord has very little to do with this enterprise.
  • Kuba 2010-12-22 20:38
    Punkin Pie:
    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.
    Enter a table with a column full of values where false might look like any of the following: "false", "FALSE", "FLSE", "0", "0.0", "no", "-1". Good luck running reports on such "data". Who the fsck writes XSDs or DTDs by hand if it's too hard for them? There's plenty of tools, heck, what about a good craftsman making his/her own tool when in need?
  • Pervert 2010-12-22 20:54
    wheaties:
    I love the longer stories but the short ones leave the rest to your imagination.

    Just like a nice girl in underwear.
  • random_garbage 2010-12-22 20:59
    A C# Guy:
    In C# we never make fields public- they are always acceesed through properties- I assumed best practice in Java was to use getters and setters.
    Never/always? Those are pretty strong terms... While there is a convention of using properties in favour of direct field access, it's not an absolute...

    A C# Guy:
    ... a good way to confuse people used to normal standards.
    Normal standards vary from person to person, and from project to project. Assuming anything more than is established from the project actively being worked on is setting yourself up for confusion and trouble...
  • Pervert 2010-12-22 21:02
    Ouch!:
    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.


    That's the most cunning ling for us to use. Thank you.
  • bgw 2010-12-22 21:33
    +1

    I'll even go get the gun.
  • A C# Guy 2010-12-22 22:18
    random_garbage:
    A C# Guy:
    In C# we never make fields public- they are always acceesed through properties- I assumed best practice in Java was to use getters and setters.
    Never/always? Those are pretty strong terms... While there is a convention of using properties in favour of direct field access, it's not an absolute...
    Never/Always without a good reason. Yes, there are exception cases- but you know that is the convention right? So rather than interpreting my post as being about absolute standards maybe you ought to give me a little credit and assume that I was commenting on the code in question, which we have every reason to believe had no good reason to defy standard conventions.

    And if you showed up using lower cased public fields in my project without good cause, we'd have words. Polite, instructive words because I'm a nice guy and not an internet tough guy, but I'd hope you'd be willing to come along and work with the team rather than against :)

    random_garbage:
    A C# Guy:
    ... a good way to confuse people used to normal standards.
    Normal standards vary from person to person, and from project to project. Assuming anything more than is established from the project actively being worked on is setting yourself up for confusion and trouble...
    I'm sure it's quite a safe assumption in this case being that we are told this is an example of code that does not adhere properly to standards.

    I would never presume to know the standards of a project unless I was working on it, and the first thing I do before I start coding is find out what the standards are. But as I said, when we are told that the coder in question had issues with standards and best practices I think we can assume that the shop in question isn't going with a "hey, let's used lowercase public strings for statuses!" standard. We might assume they have NO standards, in which case a good coder is going to fall back to something fairly prevalent in the industry.
  • Power Troll 2010-12-22 22:19
    A C# Guy:
    So if this is Java, is it standard to make fields public and lower case?

    In C# we never make fields public- they are always acceesed through properties- I assumed best practice in Java was to use getters and setters. And lower casing a public field is a good way to confuse people used to normal standards.

    As for the status value being a string and uninitialized, this is totally forgivable if you are using an OR mapper that is mapping a value from the database that is stores as text. Otherwise that is an additional WTF.

    It might not seem like much on it's own, but code filled with direct access to public properties that do not use standard casing conventions and favors uninitialzed strings over enumerations would be pretty painful IMO.


    Yes, of course.

    Nobody would ever, you know, have multiple constructors which initialize the string before the field can even be accessed. If that ever happened, the JVM executing the code would automatically terminate the current threads, spawn a new thread that sends an email directly to James Gosling with appropriate geolocation information, who would then ride up in a chariot, with Duke as a passenger, and exclaim, "YOU! You are not worthy!!!" The developer(s) in question would then be forced to using Malbolge for the next 50 years.
  • marsh 2010-12-22 22:27
    Mike:

    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.

    No factory?
  • A C# Guy 2010-12-22 22:33
    Power Troll:
    A C# Guy:
    So if this is Java, is it standard to make fields public and lower case?

    In C# we never make fields public- they are always acceesed through properties- I assumed best practice in Java was to use getters and setters. And lower casing a public field is a good way to confuse people used to normal standards.

    As for the status value being a string and uninitialized, this is totally forgivable if you are using an OR mapper that is mapping a value from the database that is stores as text. Otherwise that is an additional WTF.

    It might not seem like much on it's own, but code filled with direct access to public properties that do not use standard casing conventions and favors uninitialzed strings over enumerations would be pretty painful IMO.


    Yes, of course.

    Nobody would ever, you know, have multiple constructors which initialize the string before the field can even be accessed. If that ever happened, the JVM executing the code would automatically terminate the current threads, spawn a new thread that sends an email directly to James Gosling with appropriate geolocation information, who would then ride up in a chariot, with Duke as a passenger, and exclaim, "YOU! You are not worthy!!!" The developer(s) in question would then be forced to using Malbolge for the next 50 years.


    I wasn't taking a swipe at Java. Given (I believe) the absence of property syntax in Java, I did not know if public fields were more accepted in the Java world.

    As for initializing in the constructor- sure. It might be there, it might not be. I assume the worst from context given where this code was posted- but honestly, initialization is the least of the issues here.
  • frits 2010-12-22 23:05
    The beauty of this WTF is that "status" could be completely unused and not even cause a compiler warning, which, of course, would simultaneously diminish and amplify the WTF-ness of this line of code.
  • Matt Westwood 2010-12-23 03:09
    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?


    How easy is it to know that you *need* to hit dicotnary.com?
  • Matt Westwood 2010-12-23 03:11
    Winston Ewert:
    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.



    That's "impugning" btw.
  • Kohlrak 2010-12-23 03:25
    Same here. (Although, i would disagree on how harmless it is if it turns out they use strings for almost everything.)
  • C 2010-12-23 07:45
    public bool status; //default status is 3
  • bjolling 2010-12-23 09:26
    Matt Westwood:
    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?


    How easy is it to know that you *need* to hit dicotnary.com?
    What's a dicotnary?
  • Two 2010-12-23 10:05
    bjolling:
    Matt Westwood:
    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?


    How easy is it to know that you *need* to hit dicotnary.com?
    What's a dicotnary?


    It's where the dicotomies are stored.
  • zdux 2010-12-23 10:09
    Where's the beef?
  • ContraCorners 2010-12-23 10:10
    frits:
    vulputate:
    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.


    Whereas your mispelling, pal? Or orange you in on the joke?
    Will no one mention Boog's mis-use of "their?"
  • Ouch! 2010-12-23 10:37
    ContraCorners:
    Will no one mention Boog's mis-use of "their?"

    I think you just did.
  • Svenson 2010-12-23 10:45
    Punkin Pie:
    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.


    I thought XML was self-documenting...
  • itsmo 2010-12-23 11:03
    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".


    Feck - not again! Let's just cut this dead right now and replace "your" and "you're" with "yor" just for WTF comments...
  • neminem 2010-12-23 11:08
    itsmo:
    Feck - not again! Let's just cut this dead right now and replace "your" and "you're" with "yor" just for WTF comments...

    Can we replace them with "yarr" instead?
  • itsmo 2010-12-23 11:08
    Ouch!:
    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.


    A fish? - does thios go with the Unicorns and Rainbows?
  • itsmo 2010-12-23 11:09
    itsmo:
    Ouch!:
    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.


    A fish? - does thios go with the Unicorns and Rainbows?


    Muphry's law - too true!!
  • itsmo 2010-12-23 11:19
    neminem:
    itsmo:
    Feck - not again! Let's just cut this dead right now and replace "your" and "you're" with "yor" just for WTF comments...

    Can we replace them with "yarr" instead?


    if yarr must
  • airdrik 2010-12-23 11:24
    The status field is used to report the status of the application. When it starts up the status is unset because the application is still initializing. When the application finishes initializing and starts processing then status gets set to active. When the application finishes then the status is set to finish. This way the developers know when they can terminate the application - they can just connect to it with a debugger and monitor the field while the application is running and when it gets set to finish then they kill the application.

    The field is public (on a publicly-accessible singleton) so that any part of the application can read (and set) it so that they know if they need to be initializing, running or shutting down. Then if the developers find that something didn't finish initializing when the application started processing, they can just set status back to null and those parts will detect it and go back to initializing again; or if something didn't process when the application finished, they can set it to active and the application will go back and process what hadn't been processed yet.
    They could even set it to something like "init-K2" to tell the K2 subsystem to reinitialize itself. Can you feel the power? I can!

    That's such an awesome solution. I need to put some of that in the applications we have here, just in case.
  • Machtyn 2010-12-23 11:31
    Where were you?
    We're here.
    You're in your room of yore.
    They're there in their room.
    It's better to have its own thing.

    Is it so hard?
  • frits 2010-12-23 11:41
    Machtyn:
    Where were you?
    We're here.
    You're in your room of yore.
    They're there in their room.
    It's better to have its own thing.

    Is it so hard?


    I here ya, man.
  • ContraCorners 2010-12-23 11:55
    Ouch!:
    ContraCorners:
    Will no one mention Boog's mis-use of "their?"

    I think you just did.
    So I must be no one.
  • Egyptian Slave 2010-12-23 11:59
    This is turning into quite the angry pyramid of trolling, bad spelling and soapboxing. Nothing could make it more angry.

    Sarah Palin writes VB code on an embedded filesystem while on her mommy and daddy's modem, but has to have a happy holiday by printing her code out on placing it on a wooden table which fristly is where she wrote unicorns and rainbows by accident while trying to write a perl script using GOTOs for her inept boss named Bobby Tables that would cut Social Security Benifits from TSA screeners on welfare.
  • fgth 2010-12-23 12:03
    It's one comment and one data definition. Good "code" is sometimes commented. Not that you would know.
  • Egyptian Slave's Master 2010-12-23 12:04
    Two:
    bjolling:
    Matt Westwood:
    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?


    How easy is it to know that you *need* to hit dicotnary.com?
    What's a dicotnary?


    It's where the dicotomies are stored.


    This is turning into quite the angry pyramid of trolling, bad spelling and soapboxing. Nothing could make it more angry.

    Sarah Palin writes VB code on an embedded filesystem while on her mommy and daddy's modem, but has to have a happy holiday by printing her code out on placing it on a wooden table which fristly is where she wrote unicorns and rainbows by accident while trying to write a perl script using GOTOs for her inept boss named Bobby Tables that would cut Social Security Benifits from TSA screeners on welfare.

    Silly slave, can't even quote correctly, he doesn't realize that this is a grown up place.
  • Mayhem 2010-12-23 12:05
    neminem:
    itsmo:
    Feck - not again! Let's just cut this dead right now and replace "your" and "you're" with "yor" just for WTF comments...

    Can we replace them with "yarr" instead?


    Only on September 19.
  • Mayhem 2010-12-23 12:07
    Svenson:
    Punkin Pie:
    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.


    I thought XML was self-documenting...


    With making it up as you go along, its usually more self-destructive

  • C 2010-12-23 12:18
    You can't databind to fields - any C# dev who has spent hours smacking their head against a desk trying to figure that one out generally tends to always use properties (or auto-properties) and stays away from fields, even if there is good reason not to.
  • m 2010-12-23 12:35
    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.


    So the article just highlights a Steelman-8F-fail-WTF of the programming language?
  • Mark Fugate 2010-12-23 13:00
    I can appreciate the "Quality" and "Best Practices" 'issue'. I once had to work with an idiot that repeatedly mixed new, malloc, delete and free interchangibly and justified it by claiming that new ultimately called malloc so free worked fine. Additionally, this enlightened genius would mutex threads with global variables and spin-waits, set freed objects to NULL after freeing them, and many more acts of horror and total ignorance. Now if the above is not enough, this enlightened one became a CTO!
  • Pyrexkidd 2010-12-23 13:21
    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.


    Homonym fail.
    While you're forgiven for using a contraction, you're not forgiven for using the incorrect homonym.

    You said that the category "representative Line" belongs to they (a 3rd person plural pronoun), what you really meant to say is "There is a category called 'representative line' " (also used as a pronoun.)
  • Pyrexkidd 2010-12-23 13:26
    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".


    S#$%!!!

    I can't believe I missed this... Peer Review Fail!!!
  • Santa Claus 2010-12-23 13:27
    What? No new WTF today? I know one website owner who is getting nothing but coal in his stocking.
  • Pyrexkidd 2010-12-23 13:32
    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 <b>you</b> 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???


    use the ] [ quotes.
  • airdrik 2010-12-23 13:34
    Their's a problem with triing to correct peoples comments after they've already posted them - dispite any actual errors they might have. Ounce the comment has been posted it's content cannot be changed (excepting registered users for a limited amount of time after posting, if I understand correctly).
    Therefore we minus well accept that some people don't chose to double-check there spelling and grammer when posting comments and not make ourselves a foul for pointing it out for everyone to see (It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt - Mark Twain).

    At the very least, it keeps the comments clean of meaningless "you said its wrong" comments.

    P.S. If this gets deleted along with all of the bad spelling and grammar comments, good riddance!
  • frits 2010-12-23 13:35
    Santa Claus:
    What? No new WTF today? I know one website owner who is getting nothing but coal in his stocking.


    Airing of Grievances ^^^.
  • владимир 2010-12-23 13:42
    i can haz new wtf?
  • владимир 2010-12-23 13:43
    airdrik:
    Their's a problem with triing to correct peoples comments after they've already posted them - dispite any actual errors they might have. Ounce the comment has been posted it's content cannot be changed (excepting registered users for a limited amount of time after posting, if I understand correctly).
    Therefore we minus well accept that some people don't chose to double-check there spelling and grammer when posting comments and not make ourselves a foul for pointing it out for everyone to see (It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt - Mark Twain).

    At the very least, it keeps the comments clean of meaningless "you said its wrong" comments.

    P.S. If this gets deleted along with all of the bad spelling and grammar comments, good riddance!

    Fuck you troll.
  • Pyrexkidd 2010-12-23 13:43
    Mark Fugate:
    I can appreciate the "Quality" and "Best Practices" 'issue'. I once had to work with an idiot that repeatedly mixed new, malloc, delete and free interchangibly and justified it by claiming that new ultimately called malloc so free worked fine. Additionally, this enlightened genius would mutex threads with global variables and spin-waits, set freed objects to NULL after freeing them, and many more acts of horror and total ignorance. Now if the above is not enough, this enlightened one became a CTO!


    Sounds like the CTO at my company...
  • ContraCorners 2010-12-23 13:53
    airdrik:
    Their's a problem with triing to correct peoples comments after they've already posted them - dispite any actual errors they might have. Ounce the comment has been posted it's content cannot be changed (excepting registered users for a limited amount of time after posting, if I understand correctly).
    Therefore we minus well accept that some people don't chose to double-check there spelling and grammer when posting comments and not make ourselves a foul for pointing it out for everyone to see (It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt - Mark Twain).

    At the very least, it keeps the comments clean of meaningless "you said its wrong" comments.

    P.S. If this gets deleted along with all of the bad spelling and grammar comments, good riddance!
    minus well?
  • frits 2010-12-23 13:55
    ContraCorners:
    airdrik:
    Their's a problem with triing to correct peoples comments after they've already posted them - dispite any actual errors they might have. Ounce the comment has been posted it's content cannot be changed (excepting registered users for a limited amount of time after posting, if I understand correctly).
    Therefore we minus well accept that some people don't chose to double-check there spelling and grammer when posting comments and not make ourselves a foul for pointing it out for everyone to see (It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt - Mark Twain).

    At the very least, it keeps the comments clean of meaningless "you said its wrong" comments.

    P.S. If this gets deleted along with all of the bad spelling and grammar comments, good riddance!
    minus well?


    I'm pretty shore he meant "midas well".
  • Pyrexkidd 2010-12-23 14:12
    airdrik:
    Their's a problem with triing to correct peoples comments after they've already posted them - dispite any actual errors they might have. Ounce the comment has been posted it's content cannot be changed (excepting registered users for a limited amount of time after posting, if I understand correctly).
    Therefore we minus well accept that some people don't chose to double-check there spelling and grammer when posting comments and not make ourselves a foul for pointing it out for everyone to see (It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt - Mark Twain).

    At the very least, it keeps the comments clean of meaningless "you said its wrong" comments.

    P.S. If this gets deleted along with all of the bad spelling and grammar comments, good riddance!


    +1 (When you're arguing with a fool, make sure he isn't doing the same thing.
    Anonymous citation)

    But... I'm bored at work (I mean who takes the time to read all the comments...) and it is my belevedness[sic] that the comments picking each other apart are in jest... I mean really, are youz guyz[sic] that pent up?

    Has anyone seen the preview button?

    BTW: I am a registered forum member, my comments still show up as unregistered and I am unable to edit my comments once posted. although it is entirely possible that PEBCK...

    CAPTCHA: ideo -- someone else who isn't proofreading they're comments because there idiots over their.
  • Ouch! 2010-12-23 14:51
    Pyrexkidd:


    BTW: I am a registered forum member, my comments still show up as unregistered and I am unable to edit my comments once posted. although it is entirely possible that PEBCKcomments because there idiots over their.


    Sign in before you post? That's what I do when I care.
  • josefx 2010-12-23 16:34
    reminds me of the java enum type.


    enum Status {none, active, finished}
    //Status (none, active, finished - default value is null)
    Status status;
  • Polar Bear 2010-12-24 09:14
    frits:
    Santa Claus:
    What? No new WTF today? I know one website owner who is getting nothing but coal in his stocking.


    Airing of Grievances ^^^.


    +1
  • My Name 2010-12-24 13:52
    Where is the Christmas Story so we can bitch on Christmas Day as well?
  • Anaxi 2010-12-24 14:11
    Punkin Pie:
    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 write objects to map to the strings found in the XML ... you later just convert back to XML ...


    Sounds like you don't have much real-world experience (well, not experience with XSLT, anyway)
  • caper 2010-12-26 18:11
    I say bring back Pascal.
  • AnonymousuomynonA 2010-12-27 01:56
    Mark Fugate:
    I can appreciate the "Quality" and "Best Practices" 'issue'. I once had to work with an idiot that repeatedly mixed new, malloc, delete and free interchangibly and justified it by claiming that new ultimately called malloc so free worked fine. Additionally, this enlightened genius would mutex threads with global variables and spin-waits, set freed objects to NULL after freeing them, and many more acts of horror and total ignorance. Now if the above is not enough, this enlightened one became a CTO!


    Eh, that's usually how it goes: promote the idiot to a point where they can do no real damage; usually this means upper management. Sad for the rest of us honest, hard workers: we break our backs, and get to watch everyone else succeed.

    captcha: aliquam - aliquam I gotta be so bitter?
  • Jeremy 2010-12-27 08:59
    airdrik:
    Their's a problem with triing to correct peoples comments after they've already posted them - dispite any actual errors they might have. Ounce the comment has been posted it's content cannot be changed (excepting registered users for a limited amount of time after posting, if I understand correctly).
    Therefore we minus well accept that some people don't chose to double-check there spelling and grammer when posting comments and not make ourselves a foul for pointing it out for everyone to see (It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt - Mark Twain).

    At the very least, it keeps the comments clean of meaningless "you said its wrong" comments.

    P.S. If this gets deleted along with all of the bad spelling and grammar comments, good riddance!


    J dqiqiy cbd'f indetsrtasats akk yjis cuxx andoyt spemmand aid hravvwt. Bidkjten qo peksle"!"

  • Billy Bob Programmer 2010-12-27 10:06
    Funny. I just started working 6 months ago at a logistics company with a very interesting code base. Apps that have been hobbled together over 10 years and seem barely functional. I searched through my codebase for this just to make sure we didn't somehow work together. :)
  • boog 2010-12-27 10:23
    ContraCorners:
    Will no one mention Boog's mis-use of "their?"

    But I didn't mis-use th-

    Ohhh... you meant him.
  • Ebenezer Scrooge 2010-12-27 12:08
    Lazy slackers! Just because it's Christmas doesn't give you the right not to post a Daily WTF. Some of us still have to come into the office, you know!
  • neminem 2010-12-27 12:37
    Ebenezer Scrooge:
    Lazy slackers! Just because it's Christmas doesn't give you the right not to post a Daily WTF. Some of us still have to come into the office, you know!

    It's no longer Christmas, either, so now there's really no excuse.

    If you had to go into the office on Christmas day, or even the Sunday after Christmas, or even really Sundays in general... sucks to be you. But now it's a non-holiday Monday, so how about that WTF?
  • Wyrd 2010-12-27 15:24
    boog:
    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.


    Yeah, exactly. I think that's the company ethos the wtf submitter was trying to convey. :-)

    Really, the more you stare at those lines, the worse it gets. It's kind of like meditating on a figurative candle flame of wtf-ness. I think it might even be T-shirt worthy.

    --
    Furry cows moo and decompress.
  • anonymous 2010-12-27 15:39
    TRWTF:

    no dailywtf for 5 days =(
  • boog 2010-12-27 15:56
    anonymous:
    TRWTF:

    no dailywtf for 5 days =(

    That's because Remy is busy doing unspeakable things with "unicorns."
  • Woops 2010-12-27 17:22
    airdrik:
    Their's a problem with triing to correct peoples comments after they've already posted them - dispite any actual errors they might've. Ounce the comment has been posted it's content cannot be changed (accepting registered users for a limited amount of time after posting, if I understand correctly).
    Therefore we minus well except that some people don't chose too double-check there spelling and grammer when posting comments and not make ourselves a foul fore pointing it out four everyone two see (It is better to keep you're mouth shut and be thawed a fool then to open it and remove all doubt - Mirk "McGyver" Twigglestick III).

    At the very least, it keeps the comments clean of meaningless "you said its wrong" comments.

    P.S. If this gets deleted along with all of the bad spelling and grammar comments, good riddance!


    FTFY. You missed some golden opportunities there.
  • kdsuijoi 2010-12-28 00:33
    D-Bass melodious music to create an elegant and stylish space, seafood杭州广告伞|杭州伞厂 stalls, barbecue stalls, Cantonese-style roast meat lo, West 杭州装潢公司|杭州装潢Point files, dessert stalls, juice drinks are national hotel ... restaurant ... more than 100 dazzling array of sumptuous feast to It! Seafood杭州别墅装修|下沙装修公司 Festival Autumn crabs fresh curtain has been 杭州搬家|杭州下城区搬家公司disclosed, swimming crab, a variety of small Zhoushan seafood, oysters, salmon, prawns, scallops everything, so you enjoy 杭州江干区搬家公司|杭州江干区搬家smooth delicious seafood gluttony
  • jsdojojsdo 2010-12-28 00:34
    In addition, the barbecue is delicious steak, lamb chops, pork, fresh squid interpretation. Tiramisu, 杭州管道疏通|杭州开荒 fruit, fishing, mango cool, refreshing release. Watermelon, Mango, Strawberry, Banana ... ... more杭州地暖公司|杭州地暖|杭州中央空调销售公司 than 100 kinds of Chinese and Western cuisine Enjoy unlimited, more hot drinks, fruit juice
  • Bill 2010-12-28 18:59
    With a rusty nailgun so suffering a slow death from tetnus
  • TST 2010-12-29 06:35
    It's a very politically correct way of defining a datatype.

    String for those who want total freedom.
    Enum for people who want to find order in chaos.
    And finally a shot of boolean to add that special taste.

    -TST
  • persto 2010-12-29 10:35
    caper:
    I say bring back Pascal.

    Oh, yes. Definitely.
    We all miss fixed-length arrays and insane operator precedence.
  • Design Pattern 2011-01-03 13:56
    m:
    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.


    So the article just highlights a http://www.dwheeler.com/steelman/steelman.htm#8 -fail-WTF of the programming language?


    As the programming language in question almost certainly is Java, the answer is no:
    http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html#name%28%29
    http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html#toString%28%29
    http://java.sun.com/developer/technicalArticles/Intl/ResourceBundles/

    UhOh. Akismet WTF, it does not even accept the URLs as simple text. Maybe adding some more blabla helps!

    Akismet needs to be shot!
  • Timo 2011-01-17 07:38
    The Nerve:
    Fixed?
    //Status (none, active, finished - default value is none)
    
    public String status;


    //Status (none, active, finished - default value is <b>gone</b>)
  • shirley 2011-10-27 03:46
    Within my first month, I started counting my days.i agree with your word.From http://longchamplepliagebag.com/
  • shirley 2011-10-27 03:47
    Within my first month, I started counting my days.i agree with your word.From <a href="http://longchamplepliagebag.com/">longchamp bag</a>,<a href="http://longchamplepliagebag.com/">longchamp handbags</a>, <a href="http://longchamplepliagebag.com/">longchamp le pliage</a> message.
  • mara 2011-12-07 09:00
    twice, just to make sure