- 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
Maybe you should think before you write, dude. If I was writing a progam to map full names to their abbreivations, I wouldn't just assume that the first x letters were the abbreviation. Who gives a crap if the developer knows the provinces or states or whatever? The programmer's job is to wrte code that works, not to memorize a bunch of trivia.
Your response qualifies as a WTF.
Admin
LOL... you nearly had me there.
Admin
Without looking:
Alabama
Alaska
Arizona
Arkinsas
California
Colorado
Connecticut
Delawere
Florida
Georgia
Hawaii
Idaho
Illinoisl
Indiana
Iowa
Kansas
Kentucky
Louisiana
Maine
Maryland
Massachussets
Michigan
Minnesota
Mississippi
Misouri
Montana
Nebraska
Nevada
New Hampshire
New Jersey
New Mexico
New York
North Carolina
North Dakota
Ohio
Oklahoma
Oregon
Pennsylvania
Rhode Island
South Carolina
South Dakota
Tennessee
Texas
Utah
Vermont
Virginia
Washington
West Virginia
Wisconsin
Wyoming
I repeat, that was from memory. Yes, I know them alphabetically.
Admin
I finally got the joke here.
NO
NO
NO
Admin
Yes. Not knowing something off the top of your head is an EXCELLENT reason to do it-ass backwards. Especially when it's something that's trivial to look up. I've memoried the entire Java API for just this reason.
Admin
Ok, heres another WTF. Or maybe not, but seeing as I am not American I am scratching my head over this. Take a look at that list of abbreviations again. http://www.usps.com/ncsc/lookups/abbr_state.txt . Right down the bottom where it shows "Military State" abbreviations
If I address it AE, where the heck does it end up?
Admin
>I repeat, that was from memory. Yes, I know them alphabetically.
Pity you can't spell them:
Arkinsas
Delawere
Illinoisl
Massachussets
Misouri
;-)
Admin
When did they let Illinoisl in the union?
Admin
Yeah? well what happens with the user puts in the wrong two letter abbreviation as well? Still a WTF.
Admin
Yeah? And what if the user puts in the WRONG two-letter abreviation for the state? Still a WTF, even though the user's abbreviation will usually be more correct...
Admin
@dubwai, sadmac, tiro: you're all missing Getter's point.
He's not saying you should memorize all of that crap. He's not saying that because you can't memorize it you should use a stupid algorithm.
He more seems to be saying that its stupid to blame stupidity on nationality. It's obviously a capability of all humans, as people continue to demonstrate.
Admin
If you provide a zipcode field, you shouldn't even consider what the user types into the state field, since you can and should get the state from the zipcode. Only if the state you get from the zip doesn't match any possible parsing of what the user typed into the state field should you worry about it. At any rate, the state field should never be used as a primary data source when the zip is available. Zipcodes are non ambiguous: 90025 is 90025 and you don't have to dork around trying to figure out if AKLEAKELKElasklKAkE is Alaska, AK, Alabama, Alberta (Canada) or whatever the hell, or vice-versa if NE is Nebraska or New York spelled out but truncated when the user typed Enter and submitted the form by mistake before they were done.
Admin
Haha, you got Illinois wrong!
Actually, that typo pretty much proves you did it from memory. Good job!
Admin
You left out
Al-Anbar
Ninawa
Qandahar
[H]
Admin
No, I got the point. But the argument used in making the point was illogical. It amounted to "you can't name all the states so you can't criticize someone who also doesn't know them for writing a stupid algorithm that has nothing to do with knowing all the states."
While I'm on a tirade, knowing all the states isn't "geographical knowledge" anymore than knowing Einstein's name is knowledge of physics. Knowing where the states are located would be an example of geographic knowledge.
Admin
There is still a 5 digit zip code that tags it to a specific military base, and they route it to the right place*.
*But, since it is the USPS we're talking about here, it could really go anywhere.
Admin
If you address it AE, it ends up back in your mailbox, just like if you address something NY. You need a little more info to get a letter to the right place.
Admin
How would they know where my mail box was though if it only said AE or NY ??
Admin
I was just out of High School in 1988, and in a military school, where I met Heafy.
Heaf allowed he was 29 years of age.
"Heaf," I said, "WTF?" (we really used that TLA in the USN back then), "isn't it a little late to be just starting out in the Navy?"
"I used to sort mail in New Yo'k City," he replied, and I won't try to capture his accent anymore, "and one day, I realized I knew the location of every five-digit zip code in the United States. I knew I had to go."
Admin
Why do you guys always have to be dicks? He was making a JOKE.
Morons.
Admin
Well, if you don't put a return address on it, it probably wouldn't. Or if the carrier picks it up of of your mailbox and sees that you are a moron, he or she will probably just put it back. You see, the 'return' address is your address. The address is where you want the letter to go. The third piece you'll need is a stamp. You should try sending a letter sometime. It's a good life experience.
Admin
Why wouldn't we always have to be dicks?
Admin
I think that was the point...that a foreign programmer wouldn't know that the state abbreviates aren't based upon the first two characters any more than a U.S. employee would know the foreign abbreviations. However, you'd think either programmer would have the brains to ask, or run the application a few times and realize that they got duplicate abbreviations for completely different states.
I think the dig aimeed at foreigners is because we have so many progamming jobs going to india and other forienn firms by American companies, and not so much the reverse. US Companies are now only starting to realize that when they do this, something gets "lost in translation" as the above WTF illustrates.
Admin
As an American I, for one, can name all 50 states. Capitals? That is what google is for. This is all beside the point. If I were being paid to produce a function that returns state abbreviations for some random foreign country I would not know them off the top of my head. I would, however, be responsible for finding them out and not just shipping whatever crazy scheme I make up for determining them!
Admin
You got me, although I never heard of Mel Fisher...so maybe he stole it from me.
Admin
Not too impressed with all this bashing foreigners ... I work for an American firm who decided to abreviate all of the English counties to the first 2 letters - thus I apparently live in WI (Wiltshire, south-west of England) [:'(] and it was the first either I or my postman knew of this.... (Perhaps this is where the code came from?!)
Admin
Well, I memorized the zip codes:
00000
00001
00002
...
99999
Does that count?
Admin
Whoa now. I'm not sure if we should take the term WTF so lightly. If somebody puts in an incorrect abbreviation, it at least won't be sent to the wrong state any more often than in would if the programmer had put in an "abbreviation checker." Yeah, he should still put one in, but if i saw code in which that was the only thing wrong, I wouldn't say WTF, I'd say, "oh, he forgot something there." Ok, just wanted to make sure people understand the terribly grave nature of the term.
-Oh, and I liked the second, elaborated post ;)
Admin
Besides, he may well have come up with it. "coming up with something" doesn't mean being the first, it only means that one's brain formulated an idea without having been exposed to it before. God knows some of the WTFs on this site are from people coming up with ways to validate a string that not only fail to be novel but also violate every single programming practice known to man.
Admin
Speaking of WTFs about the forum here... I won't say anything about the WYSIWYMGIYAL <FONT size=1>(what you see is what you might get if you are lucky)</FONT> editor, but what's with the javascript paging system? If you click on the page number at the bottom of a multipage thread, this is what actually gets invoked:
BLOCKED SCRIPT__doPostBack('PostFlatView$_ctl0$Pager$0','')
No wonder this forum is so F'ing slow and riddled with errors that get logged, even though they are unknown most of the time. Must have been written by the author of one of the examples on this forum.
Admin
Welcome to the glory that is ASP.NET
Admin
Damn hell it's not well made, because they oughta have put a drop down list of states instead of asking for a string entry!
Admin
That would be Nuevo Leon (which is my home state, my guess is that it was from Monterrey, my hometown, which is the capitol and biggest city from that state). What makes it specially troublesome is that Nuevo Leon is one of the few states that get abbreviate with two capitalized letters as the states in USA.
We also have Baja California (BC) whose mail would probably end in Canada's British Colombia.
Admin
I sincerely apologize, it was meant as a joke. I have seen WTFs both while I worked in the States and while working in Mexico. In fact I have seen a lot more WTF in Mexico because without the big competition like in the States, people tend to become really lazy programmers. (This site is a great place to learn good programming practices, BTW).
Admin
They start at 01000 and end at 99950. =p (Though 00100-00199 are used for international addresses, 00400-00599 for government purposes, and 00600-00999 for puerto rico.)
Admin
1) Google says: <font color="" size="-1">about 175,000 for fantabulous</font> you're far from the first.
2) Your use of "sic" is incorrect, as it is meant to imply that the error is reproduced from the original (thus), whereas you wrote the original.
Admin
The thing is, I think that most users just entered state properly, like MD or NY. But those select few people made the mistake of typing New York, killing the system. Limiting the text field to two characters would be a help!
Admin
I think the fact that nobody has a sense of humor on here anymore is the biggest WTF. Unless you're being sarcastic, but since we don't have a sarcasm tag on here it's hard to tell.
Admin
Haha, best WTF for long time :) Usually WTFs published here get 80% or more of their results right, but this one truly belongs to its own category.
Admin
I agree.. mostly. They must obviously include the empty statename for us foreigners. I personally put in NB if the state is required, as I live in Noord Brabant, the Netherlands [:P]
Drak
Admin
What's wrong with the USPS? I've recieved credit card junk mail that was addressed to a dorm I had lived in years before. And I never filed a forwarding address. Way to go, USPS!
But, seriously, they do do a good job. Certainly better than most other countries' postal services.
Admin
Please add 'some teachers' as well... :)
Admin
You got that wrong. Some teachers really are this dum (sic) !
Admin
Oh yes- the drop-down list of states. The assumption by dumb US programmers that everyone in the world lives within the convention of having a 2-letter state abbreviation. And a "zip code". And a "city".[:@]
Admin
His use of "sic" is not incorrect. It is true that it is often used for indicating that a reproduced error in a quote is actually reproduced and not introduced, but it is not the only use of the word.
From WordNET:
sic adv : intentionally so written (used after a printed word or phrase)
Admin
They deserved most of their reputation up until the 70's and 80's. After UPS and Fedex showed them up so badly and we got a few new postmaster generals with a clue, they went from doddering wtfs to being the cheapest and fastest for letters and small packages, and about as reliable as the other major shippers.
Free markets really do work wonders sometimes, if slowly. =D
Admin
HA HA HA! You dummy! You forgot England!
-dZ.
Admin
Oh yes -- the assumption by dumb foreigner consumers that every company in the US with a web site must necessarily sell to everywhere else in the world.
-dZ.
Admin
WTF! Zipcode is a redundant "checksum" for the city/state. You should ALWAYS look up the city/state and zip-code in a database annd make sure they match. If they do not match you need to ask : Did you mean Athens, Georgia, or Wittenberg WI?
Be careful though, the post office made a big WTF when assigning zip codes, there are some cities that share zip codes with another. Some big companies get their own zip code, and most big cities have several zip codes.
Remember to handle the same for foriegn countries if you ship to them of course. Most (but not all) have some form of postal code that you need to check, but it might not be 5 digits.
Admin
Then we also need to include parents. Especially the one's that rip teachers a new one for assigning homework, or that get pissy when asked to become involved with their child's edubacation.