Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags
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 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.