dtm: (Default)
dtm ([personal profile] dtm) wrote2011-07-18 08:57 pm
Entry tags:

(no subject)

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)
naomikritzer: (Default)

[personal profile] naomikritzer 2011-07-19 01:05 am (UTC)(link)
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.)
naomikritzer: (Default)

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

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

[personal profile] naomikritzer 2011-07-19 02:50 am (UTC)(link)
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.

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

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

Thanks

(Anonymous) 2011-07-31 09:17 am (UTC)(link)
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


ext_84823: (Default)

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