• (cs) in reply to vulputate
    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 (unregistered) in reply to ÃÆâ€â„
    ÃÆâ€â„:
    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 (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???

    you could submit a WTF clearly identifying your boss/company.

  • Mike (unregistered) in reply to The Nerve
    //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 (unregistered)

    "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 (unregistered)

    For me TRWTF is the fact there are no statuses to indicate development and testing. Is this a developmestuction environment?

  • Anon (unregistered)

    TRWTF is that the code contains two lines.

  • Matt (unregistered) in reply to Anon
    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 (unregistered)

    their's, askimet

  • A C# Guy (unregistered)

    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.

  • (cs) in reply to vulputate
    vulputate:
    The troll has earned more comments than the article.

    Sadly, I can infer only that the troll was more interesting than the article.

  • (cs) in reply to A C# Guy
    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....

  • (cs) in reply to Maurits
    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 (unregistered) in reply to The Corrector

    So when is someone going to go off on "their's"?

  • (cs) in reply to A C# Guy
    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 (unregistered)

    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.

  • (cs) in reply to LANMind
    LANMind:
    Good Lord, what a bunch of banal replies...
    The Lord has very little to do with this enterprise.
  • (cs) in reply to Punkin Pie
    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 (unregistered) in reply to wheaties
    wheaties:
    I love the longer stories but the short ones leave the rest to your imagination.
    Just like a nice girl in underwear.
  • (cs) in reply to A C# Guy
    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 (unregistered) in reply to Ouch!
    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 (unregistered)

    +1

    I'll even go get the gun.

  • A C# Guy (unregistered) in reply to random_garbage
    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.

  • (cs) in reply to A C# Guy
    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 (unregistered) in reply to Mike
    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 (unregistered) in reply to Power Troll
    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.

  • (cs)

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

    How easy is it to know that you need to hit dicotnary.com?

  • Matt Westwood (unregistered) in reply to Winston Ewert
    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 (unregistered) in reply to boog

    Same here. (Although, i would disagree on how harmless it is if it turns out they use strings for almost everything.)

  • C (unregistered)

    public bool status; //default status is 3

  • (cs) in reply to Matt Westwood
    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 (unregistered) in reply to bjolling
    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 (unregistered)

    Where's the beef?

  • (cs) in reply to frits
    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! (unregistered) in reply to ContraCorners
    ContraCorners:
    Will no one mention Boog's mis-use of "their?"
    I think you just did.
  • Svenson (unregistered) in reply to Punkin Pie
    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 (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".

    Feck - not again! Let's just cut this dead right now and replace "your" and "you're" with "yor" just for WTF comments...

  • neminem (unregistered) in reply to itsmo
    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 (unregistered) in reply to Ouch!
    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 (unregistered) in reply to itsmo
    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 (unregistered) in reply to neminem
    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 (unregistered)

    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 (unregistered)

    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 (unregistered) in reply to Machtyn
    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.

  • (cs) in reply to Ouch!
    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 (unregistered) in reply to Two

    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 (unregistered) in reply to Matt

    It's one comment and one data definition. Good "code" is sometimes commented. Not that you would know.

  • Egyptian Slave's Master (unregistered) in reply to Two
    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 (unregistered) in reply to neminem
    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.

Leave a comment on “Status”

Log In or post as a guest

Replying to comment #:

« Return to Article