The short version: Learn to use the TRIM() command in whatever programming language you’re using, so you remove spaces that some poor soul accidentally includes in a data they enter via web form.
The TRIM() command
Every programming language has some version of the TRIM() command. TRIM() removes leading and trailing spaces from any alphanumeric string. So, if you type ‘ blah blah blah ‘, TRIM(‘ blah blah blah ‘) ends up being ‘blah blah blah’.
Use that any time you’re processing data from a web form. It’s good defensive design. And, as it turns out, it costs a whopping $.75 to do it.
That’s the whole lesson. You’re done.
If you want to read the long version, with narration and cost-benefit analysis, though, here you go:
I love Wells Fargo Bank
I love Wells Fargo Bank. In Bizarro world I do, anyway. Actually, I hate them with a passion normally reserved for cat- and puppy-beaters. That’s a long story with which I shall not bore you.
But now and then you can learn something from them, like how not to create a usable web site.
My story begins
Today, I logged on to their web site to pay off my company’s line of credit. It’s a monthly ritual that now strikes fear in my heart, since you never know when you’ll pay off said line only to have some demon at the bank say Oh, you paid it off? That’s great! As a thank you, we’re going to reduce your available credit by 75%. You’re welcome.
But I digress.
I logged in. Their ‘Accounts’ screen shows you balances on credit cards, lines of credit, etc.. If you go to the ‘Transfer’ screen to pay them off, they don’t show those balances. So you have to either memorize them, or copy-and-paste.
No, that’s not the usability snafu I’m writing about here – it’s just the groundwork.
So, I copied the balance, went to the Transfer screen and pasted the balance. Then I clicked ‘Transfer’, and got this dire warning:
I looked at my number. Hmmm. It has a dollar sign, so I deleted it and clicked Transfer again.
Same mysterious error.
I double-checked that I was paying off the right amount, which required that I go back to the accounts screen, then start the transfer over again. I was indeed.
At this point, I start to wonder the amount is ‘invalid’ because it pays the line off in full, and Wells Fargo would like a little interest, thank you very much.
Finally, I realize that my copy-and-paste had included a space at the end. So instead of $999.99 I had pasted in $999.99_ where the ‘_’ is a space.
I deleted the space, and it worked.
I wonder how many calls Wells Fargo has received because some poor bugger left a space in a transfer amount?
Let’s do a little math, shall we?
If they get, say, 10,000 people per day using online banking (probably a small number) and of those people, 5% do balance transfers, that’s 500 transfers per day.
If 1% of those people include a space at the end of their transfer amount, because they copy-and-paste, that’s 5 frustrated customer every day.
If those customers call the bank for help (assuming they can reach someone), and they take an average of 10 minutes per call, that’s 50 minutes per day for some customer support person. Having talked to Wells Fargo support, I know they use some pretty cool people, actually – once they drive you crazy they let you talk to a human being – and they’re paying US wages, so figure $27,000/year at the low end.
Total cost of crappy defensive design? $10/day, roughly, or $3600/year.
Total time required to add a TRIM() command in whatever programming language Wells Fargo uses? 60 seconds, if you type really slow.
Assuming Wells Fargo is using highly paid developers who get $90,000/year to drive me insane, total cost of using TRIM() is $.75.
I could have saved you guys $3599.25. You could have used that to, I dunno, get me an anger management counselor after you tried to turf my company. But cash works.
I’ll take my payment in non-sequential pennies, please.