Tuesday, April 21st, 2009 09:20 am

You’re ordering auto parts online.  The order form requires a mandatory phone number.  It allows ten digits for the phone number.

You enter your phone number with area code:  xxxxxxxxxx

The scripting on the form automatically reformats the phone number to make it “pretty”, like this:  (xxx) xxx-xxxx

And then it all goes pear-shaped, because NEXT the field length limiting script kicks in and truncates that to ten characters:  (xxx) xxx-

So, you can’t submit your order form without a valid phone number.

And you can’t submit your order form with a valid phone number, because by the time you hit submit, the form has automatically invalidated it.

FAIL.

Tags:
Tuesday, April 21st, 2009 01:24 pm (UTC)
The best part is how NEITHER of these scripts is actually doing anything useful.

Just like the damn "ENTER YOUR CREDIT CARD WITH SPACES NO WAIT DASHES NO NO SPACES AAAGH!" forms. Parse it. With spaces, dashes, whatever, it's all unambiguous. Even a moron coder could write the parser that ignores them.

Oh, wait. Maybe not. (http://www.codinghorror.com/blog/archives/000781.html)
Tuesday, April 21st, 2009 01:30 pm (UTC)
I don't call myself a programmer and don't have a CS degree, and yet I can write a simple program like the one referenced in the article. Have been able to for 25+ years, in fact. This is hard? There are people who call themselves programmers who can't write a simple "for" loop and an if/then/elsif/else construct in the language of their choice?

Man.
Tuesday, April 21st, 2009 02:05 pm (UTC)


From a purely end-user perspective, I've been convinced that the limbo bar for coding is has been set so low progressively that it is now six feet under the sand.

Tuesday, April 21st, 2009 10:45 pm (UTC)
My Ph.D. advisor once remarked that the script kiddies weren't attacking us so much as they were working for us -- that the majority of web developers and the low-ranking programmer schmucks who were doing most of the dirty work were at the technological skill level of script kiddies.

I am still disturbed today when I remember that conversation, and it was four and a half years ago.
Tuesday, April 21st, 2009 01:41 pm (UTC)
Exactly. "It's not broken. You don't need to fix it."


The article you cite is one that actually makes me feel pretty bitter. "199 out of 200 applicants can't solve simple programming problems." I've contributed code to half a dozen open-source programming projects, I have code in two device drivers in the mainline Linux kernel including the aha154x SCSI driver, I've written multiple entire applications single-handed, I've built entire IT infrastructures from scratch, I've done things "experts in the field" told me couldn't be done¹, I know half a dozen different operating systems, but I can't get a fucking job.



[1] Example: I wanted to have a way to whitelist "problem" addresses in Sendmail and pass them through all subsequent address filtering unchallenged. Since the filters I was using were based on how-to code from Claus Aßmann, I asked him the correct way to do it. He told me "You can't do that, it isn't possible in Sendmail." I had it working the day after he told me it couldn't be done.
Tuesday, April 21st, 2009 01:45 pm (UTC)
Then definitely don't read this one: Is Open Source Experience Overrated? (http://www.codinghorror.com/blog/archives/001255.html)

Well, read it. See if you can figure out a plan of attack from it.
Tuesday, April 21st, 2009 01:55 pm (UTC)
Yikes, not only is that parsing full of fail, it isn't even doing anything remotely useful, unless their backend design has separate fields for the area code, exchange number, and 4 digit phone number. If I was designing it, the input field would accept about 20 characters, then the validation script would strip all non-numeric characters, test that the numer was exactly 10 digits, then store those 10 digits. The phone number ie easier to manipulate as a nice clean 10 digit string, and can easily be prettified when it is output.

If I wanted to be really fancy I could even check for common errors when validating the phone number. For example if there were 11 digits I chould check if the first digit is a 1. If so remove it and recheck the validity of the number.
Tuesday, April 21st, 2009 03:24 pm (UTC)
Perhaps it's deliberate - they want to get you on the phone or have you physically walk into a building to buy from them. People who buy online tend to only buy exactly what they came for - phone sales offers the chance (sometimes remote, but still there) of an upsale, and brick-and-mortar buildings are just full of eye-candy for impulse purchases.

Which way would you rather make sales, if you are the business manager?
Tuesday, April 21st, 2009 03:47 pm (UTC)
Certainly not by pissing off the customer before I tried to ask for his business!
Tuesday, April 21st, 2009 04:13 pm (UTC)
Honestly? I'd sooner have people who visit my website actually be able to shop here instead of giving up in disgust and buying from someone else. Web shoppers are fickle. 80% of shopping carts even on sites that WORK are abandoned before placing the order. I'd hazard a guess the number of people who will jump through hoops to try and complete a purchase from a site that doesn't work properly instead of just saying "Fuck this shit" and going somewhere else, unless it's an insanely good price, are maybe 0.1% of intended buyers.


(And frankly, even if it is an insanely good price, if you make the customer jump through hoops to get it, the odds are that customer's not coming back.)
Tuesday, April 21st, 2009 05:20 pm (UTC)
As a very new business system programmer, I remember going round and round with people about zip code storage. I favored a character string, they always favored an integer. (five byte vs. four bytes.) Like the one byte per record was going to kill us. (Often, we were working off of floppies, so that one byte did make a difference.) Then came the zip+four, now we needed two integers for zip code. (Four byte + two byte, vs. ten byte string.) Finally, I had a customer that did business in Canada. Sweet justification!

Some web coder probably ran into this great parser for phone numbers, or worse, decided to write a really great one, without thinking that the DBA was only going to allow ten bytes. Worse, if parts of the web site are sourced from different outside vendors. I can just see some IT guy trying to get this straightened out, if he even knows it is happening. The indirection likely involves overseas contacts. But they are saving money.
Tuesday, April 21st, 2009 05:38 pm (UTC)
And somewhere, someone is sighing and looking off at the computer in their back office, sadly wondering why nobody ever orders parts from their web site.
Tuesday, April 21st, 2009 05:47 pm (UTC)
Well, I got their contact email form to work at least (on the second try)....
Wednesday, April 22nd, 2009 05:53 am (UTC)
Utter stupidity. Rank imbecility. Far too fucking common.