Log in


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)


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.)
Don't forget the extra M if they've helpfully included the Canadian provinces in the list too.

At least Minnesota stays in the same place in the list whether they sort by state name or by abbreviation. NJ isn't so lucky.

If only so many of these forms weren't developed in CA...
Hm. What platform are you on? In my Macs, when I type "M" and "N" fairly rapidly, I get to MN on the list.
Hey, I've been meaning to ask -- just how excited were the Google+ people when this xkcd strip ran?
Eh. I mean, it got shared around a bit, but...

Oh, right, you don't work for Google. See, this is not the first time a Google product has shown up in xkcd. It's nice and all, and they were stoked that it happened so soon after launch, but I didn't see this get flagged as the natural success signal.

Mostly what I saw them psyched about was the graphs showing traffic spiking up into the stratosphere.
Right, but everyone uses Google Search and Google Maps already. Google+ was so new I was still ignoring it completely!
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.
This has been bugging me for quite a while, too. Seriously, everyone: cleaning up easily-handled formatting is what computers *do*.



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

Re: Thanks

Okay, just know that the code I was pointing to at the end of the rant wasn't mine; it was just something I found while searching.
Brad can wax *very sarcastic* about this topic.

June 2016

Powered by LiveJournal.com