- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
if ($Post == 'First') { $Post.delete(); } elseif ( $Post == 'Fist!') { $Post.delete(); } elseif { $Post == 'Brillant' ) { ...snip 1,234,877,980,998,234,999,564,090,000 lines of code }
Admin
#!/bin/sh
for char in W T F '!'; do if "$char" == 'W'; then echo 'W' elif "$char" == 'T'; then echo 'T' elif "$char" == 'F'; then echo 'F' elif "$char" == '!'; then echo '!' fi done
CAPTCHA: pecus: pecus bill?
Admin
Admin
Admin
I particularly like the maintainability of this example.
Admin
He should be grateful that they didn't have a drop-down to select the country you live in.
Admin
I don't understand why the bigger problem wasn't fixed at the same time. It would've taken maybe 2 minutes to fix it, after all.
Admin
Because Texas is full of empty space?
Admin
Admin
Obviously the WTF is that the coder created an input to select a province, and then filled it with 55 US states.
Admin
Oh My God!!!
Initially I was thinking that they did some regexp or something after creating that 'select' string and somehow bungled that (not so hard when doing regexps), but then I scrolled down and saw the second if statment (My brain likely glossed over the first one to save my sanity) and then I understood....
Yours Yazeran
Plan: To go to Mars one day with a hammer
Admin
The RWTF is Server Guys: didn't they notice that the application contained far too many lines of code?
Admin
You are incorrectly assuming the state selector was created via copy-paste. It was hand-written. This is the kind of code you get if you pay bonuses based on LOC.
Admin
I was sick in my mouth.
Admin
Shouldn't Mr. Zimmer forget about playing with code and get busy running The Men's Wearhouse?
Admin
-- Re: The Utlimate State Selector 2009-09-09 09:11 • by ounos
<option>TN - Tennessee</option> <option >TX - Texas</option> <option>VI - U.S. Virgin Islands</option> <option>UT - Utah</option>That's the RTWTF. Texas' option got an extra space. WHY?
copy paste programming
copy paste the previous block of options, remove selected="selected" and leave the space that was there without caring too much
Admin
I disagree, this looks like copy-paste disease to me.
Admin
WTF? Real The What The Fuck? That's TRWTF.
Admin
Admin
Imagine if this were to go multi-national,LOC bonus anyone?
Admin
The real WTF is the 'Utlimate' in the title of this article. A little proof reading before posting perhaps?
Admin
If it's in Perl, I'd do it like:
[snip rest of states] </select>";
(note that I use "value" attributes so that the variable gets set to the state code without the descriptive text; more useful for database storage and address printing this way; and I call a state a state instead of a province; damn Canadians!)
Admin
Really? I think the current title is quite brillant!
Admin
Wow, it hurts to read....really really bad.
Admin
Admin
TRWTF is that Arkansas (AK) is listed before Arizona (AZ) every time.
Admin
else if ($province == "AR - Arkansas") { $provinces = "<select name='usr_province'> <option>AL - Alabama</option> <option>AK - Alaska</option> <option selected='selected'>AZ - Arizona</option>
So if I move to Arkansas, should I send my stuff to Arizona?
Admin
Sorry, made a few errors. AK is Alaska, AR is Arkansas. And TRTRWTF is that AZ was actually listed before AR.
Admin
I think "ultimate" is a great description. "Utlimate" is not so good.
Admin
Oh come on, you're bullshitting us!! Aren't you? Please? How do you screw up something so simple so badly? There really is only one explanation: this was an equal opportunities employee on work placement as part of their "CS for the Mentally Handicapped" course. It just has to be.
[Post attempt #3]
Admin
I'm no American but isn't Arizona (AZ) supposed to come before Arkansas (AR)?
CAPTCHA: had a really nice pink and green background.
Admin
Apart from Paula Bean, you mean.
Admin
Admin
Same in Canada. Code looks similar to another app I've seen... Except we spell our variables with an 'ou' than 'o'.
Admin
(BTW, did the author of this code ever stop to look at it and think "there must be a better way"? It's even possible to improve it without using a loop, for goodness' sake!)
Admin
Maybe this code was written by the son or daugther of Paula Bean. He or she should be the right age now to produce this code.
Good title for a horror movie too: "Son of Paula Bean"
Admin
Oh the humanity...
Admin
Exactly. You can argue it either way - hardly a WTF (especially not in that code sample.
I reckon the original coder did, but only after the Emperor of Canada (yesterday's WTF) fired him.
Admin
ZOMG so many WTFs head asplodes with "The Utlimate State Selector", state provinces states alphabetized by the code instead of the name and writting one module of 30,000 lines and taking the week off. I'm anxious now to see the module that takes the return value from the form and converts it into something that is stored in the database.
Admin
This makes my brain hurt in so many ways.
I read the intro paragraph, totally missed the first 'if', read the first state list.... couldn't find the wtf.... reread it... still didn't see it.... scrolled down... and then it hit me.
My jaw literally dropped.
captcha: vulputate. Teehee, that sounds dirty.
Admin
So North Dakota is no longer a state?
Admin
So North Dakota is no longer a state?
Admin
Database? It probably submits via mailto to a group of people who hand edit an Excel spreadsheet stored on a shared drive somewhere.
Admin
I've actually met "code typists" (can't bring myself to call them developers or coders) who are actually incapable of stopping and reflect on the crap they are typing.
I've never seen anything that bad (in number of LOC), but I've seen vulgarities just as viscerally bad that makes you wanna claw your eyes out and curl into a ball under a running shower. And they look at that type of code and they don't think anything about it.
They just don't get it, and I still can't get how the hell they graduate from college, get a job... and stay on that job producing that type of crap.
Admin
Admin
A great way to work if you get paid by the line!
Admin
Why wouldn't you just set use, I dunno, a loop? (I ask because you seem quasiserious and your code's not really bad enough to be funny.) Or if you want good perl...
See? Perl is a pretty language! (assuming you can get past a few $%_s without OMGing too much).
Admin
TRWTF is that Northern Mariana Islands is missing.
And North Dakota.
Admin
It would be funny to see the face of the reviewer of this code when submiting to [cvs|svn|git] and getting the email with the diff
Admin
Given the effort of updating this trainwreck, they'd stay missing til someone was kind enough to rewrite it