Comment On Status

"In late 2009, I started a new job at a large logistics corporation," Nikos writes, "it was on my first day that I learned that 'quality' and 'best practices' can mean vastly different things to different people. Within my first week, I learned that I should probably ask a lot more questions about the system I will be spending 8 hours a day maintaining. Within my first month, I started counting my days." [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Status

2010-12-22 12:48 • by Fer (unregistered)
//Comment (boring, funny, first - default value is none)
public String comment;

Re: Status

2010-12-22 12:58 • by scnr (unregistered)
//Status (true, false - default value is FileNotFound)
public boolean status;

Re: Status

2010-12-22 12:59 • by wheaties (unregistered)
That's got to be the most succinct WTF I've seen in a while. I love the longer stories but the short ones leave the rest to your imagination.

Re: Status

2010-12-22 13:05 • by Pyrexkidd (unregistered)
332759 in reply to 332756
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

Re: Status

2010-12-22 13:06 • by Bael (unregistered)
332760 in reply to 332759
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...

Re: Status

2010-12-22 13:06 • by Pyrexkidd (unregistered)
332761 in reply to 332759
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.

Re: Status

2010-12-22 13:12 • by tekHedd (unregistered)
The real WTF is that someone will probably post a comment claiming this isn't a WTF.

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

Re: Status

2010-12-22 13:15 • by 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.

Re: Status

2010-12-22 13:16 • by boog
332764 in reply to 332762
tekHedd:
The real WTF is that someone will probably post a comment claiming this isn't a WTF.

Almost, but not quite.

Re: Status

2010-12-22 13:25 • by The Nerve (unregistered)
Fixed?
//Status (none, active, finished - default value is none)

public String status;

Re: Status

2010-12-22 13:33 • by boog
332766 in reply to 332765
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.

Re: Status

2010-12-22 13:34 • by Punkin Pie (unregistered)
332767 in reply to 332763
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.

Re: Status

2010-12-22 13:36 • by Punkin Pie (unregistered)
332768 in reply to 332766
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.

Re: Status

2010-12-22 13:38 • by boog (unregistered)
332769 in reply to 332757
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.

Re: Status

2010-12-22 13:45 • by Matt (unregistered)
var comment:String = new String();
comment = "this post sucked";
trace("Alex, come on.");

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

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

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

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

Re: Status

2010-12-22 13:49 • by Polar Bear (unregistered)
332771 in reply to 332769
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".

Re: Status

2010-12-22 13:49 • by Winston Ewert (unregistered)
332772 in reply to 332767
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.

Re: Status

2010-12-22 13:52 • by Matt (unregistered)
Did I mention I hated this article? Maybe it's the Christmas anti spirit.

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

Noel, noel, no elohel.

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

Captcha: tation
Temptation to be more abbreviated.

Re: Status

2010-12-22 13:52 • by Quicksilver

True WTF is the CIA W.T.F.

Re: Status

2010-12-22 13:56 • by Professor Ugoddadee (unregistered)
default value = false means that there IS NO default value!!!

Re: Status

2010-12-22 14:06 • by Steve (unregistered)
332776 in reply to 332769
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

Re: Status

2010-12-22 14:10 • by oy (unregistered)
332777 in reply to 332775
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.

Re: Status

2010-12-22 14:27 • by rfoxmich (unregistered)
//Status (none, active, finished - default value is wtf)
public String status;

Re: Status

2010-12-22 14:28 • by Jon W (unregistered)
332781 in reply to 332767
And the fact that the entire J2EE world is basically one big WTF is a defense how, exactly?

Re: Status

2010-12-22 14:31 • by Mike (unregistered)
332782 in reply to 332765
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.

Re: Status

2010-12-22 14:33 • by boog
332783 in reply to 332767
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?

Re: Status

2010-12-22 14:35 • by boog
332784 in reply to 332768
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.

Re: Status

2010-12-22 14:38 • by boog
332785 in reply to 332772
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.

Re: Status

2010-12-22 14:38 • by Me (unregistered)
332786 in reply to 332763
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.

Re: Status

2010-12-22 14:43 • by chrismcb
332787 in reply to 332763
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.

Re: Status

2010-12-22 14:56 • by boog
332788 in reply to 332787
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.

Re: Status

2010-12-22 15:11 • by DescentJS
332789 in reply to 332788
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.

Re: Status

2010-12-22 15:21 • by Punkin Pie (unregistered)
332790 in reply to 332789
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.

The Ballad of Punkin Pie

2010-12-22 15:30 • by Billy Milano (unregistered)
332791 in reply to 332790
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!

Re: Status

2010-12-22 15:31 • by Grammer Nazi (unregistered)
332792 in reply to 332771
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."

Re: Status

2010-12-22 15:35 • by frits
332794 in reply to 332792
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.

Re: Status

2010-12-22 15:37 • by pauly
332795 in reply to 332771
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???

Re: Status

2010-12-22 15:44 • by Uh... (unregistered)
332798 in reply to 332792
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>

Re: Status

2010-12-22 15:47 • by boog
332799 in reply to 332790
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?

Re: Status

2010-12-22 15:50 • by Mongy (unregistered)
332800 in reply to 332773
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...

Re: Status

2010-12-22 15:50 • by vulputate (unregistered)
332801 in reply to 332794
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.

Re: Status

2010-12-22 15:53 • by LANMind (unregistered)
Good Lord, what a bunch of banal replies...

Re: Status

2010-12-22 15:55 • by Mongy (unregistered)
332804 in reply to 332795
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

Re: Status

2010-12-22 15:57 • by Ouch! (unregistered)
332805 in reply to 332795
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.

Re: Status

2010-12-22 16:00 • by More Grandma Nazis (unregistered)
332806 in reply to 332798
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

Re: Status

2010-12-22 16:09 • by frits (unregistered)
Who hasn't written a comment like this?

Re: Status

2010-12-22 16:11 • by Hieflenhiemer (unregistered)
332808 in reply to 332806
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?

Re: Status

2010-12-22 16:11 • by Matt (unregistered)
332809 in reply to 332782
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"

Re: Status

2010-12-22 16:24 • by ÃÆâ€â„ (unregistered)
332810 in reply to 332808
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.

I want status!

2010-12-22 16:28 • by Spectre

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

« PrevPage 1 | Page 2 | Page 3Next »

Add Comment