| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |
|
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 } |
|
#!/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? |
The problem is America has too many states. Australia is easier to maintain. |
That's the RTWTF. Texas' option got an extra space. WHY? |
|
I particularly like the maintainability of this example.
|
|
He should be grateful that they didn't have a drop-down to select the country you live in.
|
|
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.
|
Re: The Utlimate State Selector
2009-09-09 09:12
•
by
eViLegion
(unregistered)
|
|
Because Texas is full of empty space?
|
Because everything's bigger in Texas. |
|
Obviously the WTF is that the coder created an input to select a province, and then filled it with 55 US states.
|
|
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 |
|
The RWTF is Server Guys: didn't they notice that the application contained far too many lines of code?
|
Re: The Utlimate State Selector
2009-09-09 09:16
•
by
Bri
(unregistered)
|
|
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.
|
|
I was sick in my mouth.
|
|
Shouldn't Mr. Zimmer forget about playing with code and get busy running The Men's Wearhouse?
|
|
--
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 |
Re: The Utlimate State Selector
2009-09-09 09:23
•
by
highphilosopher
(unregistered)
|
|
I disagree, this looks like copy-paste disease to me.
|
Re: The Utlimate State Selector
2009-09-09 09:32
•
by
Anon
(unregistered)
|
WTF? Real The What The Fuck? That's TRWTF. |
Re: The Utlimate State Selector
2009-09-09 09:39
•
by
Code Dependent
|
No, look, he put "the" in front of it. It's "Real True WTF". |
Re: The Utlimate State Selector
2009-09-09 09:49
•
by
Wulf
(unregistered)
|
Imagine if this were to go multi-national,LOC bonus anyone? |
|
The real WTF is the 'Utlimate' in the title of this article. A little proof reading before posting perhaps?
|
|
If it's in Perl, I'd do it like:
%statesel = (); $statesel{$state} = " selected='selected'"; $states = "<select name='usr_state'> <option value='AL'$statesel{'AL'}>AL - Alabama</option> <option value='AK'$statesel{'AK'}>AK - Alaska</option> [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!) |
Re: The Utlimate State Selector
2009-09-09 10:01
•
by
freibooter
(unregistered)
|
Really? I think the current title is quite brillant! |
|
Wow, it hurts to read....really really bad.
|
Re: The Utlimate State Selector
2009-09-09 10:04
•
by
Brain
(unregistered)
|
Ultimate properly describes this on this site. I'm looking forward to 5 years from now seeing one even worse and going into a gran mal seizure. |
|
TRWTF is that Arkansas (AK) is listed before Arizona (AZ) every time.
|
Re: The Utlimate State Selector
2009-09-09 10:06
•
by
Rocco
(unregistered)
|
|
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? |
Re: The Utlimate State Selector
2009-09-09 10:07
•
by
Mark Jonson
(unregistered)
|
|
Sorry, made a few errors. AK is Alaska, AR is Arkansas. And TRTRWTF is that AZ was actually listed before AR.
|
Re: The Utlimate State Selector
2009-09-09 10:09
•
by
SR
(unregistered)
|
I think "ultimate" is a great description. "Utlimate" is not so good. |
|
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] |
Re: The Utlimate State Selector
2009-09-09 10:12
•
by
SR
(unregistered)
|
I'm no American but isn't Arizona (AZ) supposed to come before Arkansas (AR)? CAPTCHA: had a really nice pink and green background. |
Apart from Paula Bean, you mean. |
Re: The Utlimate State Selector
2009-09-09 10:16
•
by
Niels
(unregistered)
|
That's the space they need to keep the Bush family in. |
Re: The Utlimate State Selector
2009-09-09 10:16
•
by
Steve Syfuhs
(unregistered)
|
Same in Canada. Code looks similar to another app I've seen... Except we spell our variables with an 'ou' than 'o'. |
Depends on whether you're sorting by state name or state code, silly. (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!) |
|
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" |
Re: The Utlimate State Selector
2009-09-09 10:22
•
by
MadtM
(unregistered)
|
Oh the humanity... |
Re: The Utlimate State Selector
2009-09-09 10:28
•
by
SR
(unregistered)
|
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. |
|
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.
|
|
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. |
|
So North Dakota is no longer a state?
|
|
So North Dakota is no longer a state?
|
Re: The Utlimate State Selector
2009-09-09 10:35
•
by
Anguirel
|
Database? It probably submits via mailto to a group of people who hand edit an Excel spreadsheet stored on a shared drive somewhere. |
Re: The Utlimate State Selector
2009-09-09 10:35
•
by
luis.espinal
|
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. |
Re: The Utlimate State Selector
2009-09-09 10:38
•
by
Code Dependent
|
No, the space we plan to keep Dubya in is the Walls Unit in Huntsville. |
|
A great way to work if you get paid by the line!
|
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). |
|
TRWTF is that Northern Mariana Islands is missing.
And North Dakota. |
|
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
- 5000 loc + 10 loc |
Re: The Utlimate State Selector
2009-09-09 10:49
•
by
SR
(unregistered)
|
Given the effort of updating this trainwreck, they'd stay missing til someone was kind enough to rewrite it |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |