dtm: (Default)
[personal profile] dtm
Hey, you, are you making a website that accepts credit card numbers? Or phone numbers, or any kind of long number or code that your annoying users want to enter with spaces and dashes? Are you about to add a message that says something like "no spaces or hyphens"? STOP. Just stop, right now. If you've already done that, go and fix it. NOW

There is no excuse for doing that. If you find yourself in the position of writing code to pull some data out of a web form and can't at the same time strip the spaces and hyphens your users put in there so that they'd type the stupid sixteen digits correctly, then you need to find another line of work. Or at least ask on stackoverflow.com if your framework makes massaging input like that stupidly difficult.

Are you a website owner who pays people to make forms that take credit card numbers or phone numbers, and have they given you a form with the text "no spaces or hyphens"? Send it back. Demand that they fix it, and if it's going to cost significantly more than any other change would, find someone else to do it.

Integrating with a third-party site to take the credit card information? Demand that they let your customers enter the numbers they need to with as many spaces and hyphens as they want. (And if they won't, find another site to integrate with)

Oh, and also: A pulldown menu for US states? That's just wrong too.

This message brought to you by an encounter with www.aa.com, who should be able to afford a better website.

Edited to add: If you're at a loss as to how to do this and are groaning about digging into your db code, at the very least implement step 1 on this page, which will ease the pain of the vast majority of your users. (That page describes some simple javascript you can add to such fields so that users can enter them however they want, but the form still has only numbers when it's submitted)

Date: 2011-07-19 01:05 am (UTC)
From: [identity profile] naomikritzer.livejournal.com
Pulldown menus of states make me STABBY. Because I live in Minnesota, which is the M state below Maine, Maryland, Massachusetts, and Michigan. And yet EVERYONE SEEMS TO USE THEM.

Although today I filled out a paper form -- which was sent from St. Paul, which as you may know, is next door to Minneapolis and also close to several other cities with long-ish names including Bloomington, Vadnais Heights, Little Canada, and Inver Grove Heights. And yet the line for your city was maybe an inch long, and then right next to it was a line for state that was ALSO an inch long. I only need two letters for my state! My city requires 11! Do people think about these things for two seconds?!??? (When I'm filling out forms in Minneapolis I usually write "Mpls" in the city blank but there is a certain rivalry and I would be a little bit worried that the St. Paulite processing the form would pretend she had no idea what "Mpls" was.)

Date: 2011-07-19 11:58 am (UTC)
From: [identity profile] cheshirecatco.livejournal.com
Hm. What platform are you on? In my Macs, when I type "M" and "N" fairly rapidly, I get to MN on the list.

Date: 2011-07-19 01:06 am (UTC)
From: [identity profile] naomikritzer.livejournal.com
Hey, I've been meaning to ask -- just how excited were the Google+ people when this xkcd strip ran?

Date: 2011-07-19 02:47 am (UTC)
From: [identity profile] naomikritzer.livejournal.com
Right, but everyone uses Google Search and Google Maps already. Google+ was so new I was still ignoring it completely!

Date: 2011-07-19 02:50 am (UTC)
From: [identity profile] naomikritzer.livejournal.com
Also, the others are jokes about Google whereas the Google+ strip was basically a free ad for Google+ run specifically to the core group of people most likely to be early adopters of a new social networking site.

Date: 2011-07-19 11:57 am (UTC)
From: [identity profile] cheshirecatco.livejournal.com
This has been bugging me for quite a while, too. Seriously, everyone: cleaning up easily-handled formatting is what computers *do*.

Thanks

Date: 2011-07-31 09:17 am (UTC)
From: (Anonymous)
Just spent a lesson talking to my high-school students how the user is always right and you job as a programmer is accept Human input. also I have just your code in a exmple it am giving my students on shuffling a list. I hope this is ok.

I have included attribution see below
ps. unable to authenticate to blog so @jamesmaitland will find me


Date: 2011-07-31 07:04 pm (UTC)
ext_84823: (Default)
From: [identity profile] flit.livejournal.com
Brad can wax *very sarcastic* about this topic.

May 2017

S M T W T F S
 123456
78910111213
14151617181920
212223242526 27
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 24th, 2017 12:50 pm
Powered by Dreamwidth Studios