Welcome to maybe my most trivial, and also most-filled with geekery, blog post yet!
And, quick background: The Daily WTF is a website which daily posts "Curious Perversions in Information Technology." Usually it's code snippets written by someone who obviously didn't know what they were doing. On today's front page, I found this one, this one, and especially this one to be particularly humorous. Also, you should know I'm not big on foul-mouth'd-ness, so in various of my favorite acronyms, like RTFM [1], I choose to use "fine" for the "F" instead of any alternatives.
Anyhow, one of the WTF posts left me thinking What the fine?! but not because the programmer wrote something stupid; rather it's because I have no idea what justified it making The Daily WTF.
It was this one.
Aside from misspelling "ternary operator", this guy does accurately point out that this situation would be better dealt with with a ternary operator; but the code itself really isn't all that awful. And nearly all the rest of the comments were wrong, trite, or stupid.
Most bewildering to me was the fact the original poster had to "use a pen and paper to work out exactly what conditions the setDirty(true) call was made." You can't mentally track of an if, a nested-if, and an if-else all at once, but you deem yourself worth of identifying code to post on The Daily WTF? *Sigh*.
Maybe I'm expecting too much. I don't read The Daily WTF all that often, but I can remember time when posts all deserved to be posted. Maybe after 682 posts they've just run out of material.
Tuesday, December 05, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment