You Suck (On web apps that mismanage text)
weblog.raganwald.com
weblog.raganwald.com
And don't get me started on how profanity filters consider my last name profane. Years ago I had a Hotmail account registered to the name Ivana C. Teens-Give-Head because they wouldn't accept John Graham-Cumming.
edit: Notifo telling me this will be fixed shortly.
And I'd be delighted to live in a Wodehouse novel.
Her full legal name (in first-middle-middle-middle-last-last-last-last form) no longer fits into any database known to man, nor even on her driver's license, and is a consistent source of amusement.
I could talk your ear off with how many ways I've broken systems in Japan, but one of my Asian American friends takes the cake. Her name is not Kim Kim, but it could be. Apparently some systems check to make sure you don't enter your first name twice...
Fake: Yes. I can't tell you how many times I've booked an air ticket only to get to the airport and find out they killed my ticket because it goes into the system and the program tosses a ticket that says "fake" on it. Twice I've gone to the counter for a KLM flight through Northwest and have been rejected. They say, "You don't have a ticket." I give them a confirmation and after some investigation I learn my ticket has been cancelled because the system deleted it. For a while I couldn't join Facebook because of my last name. During the registration process I was asked for my real name and when I wrote "Fake" it rejected me. Finally a friend working for Facebook took care of me.
http://www.fastcompany.com/blog/adam-penenberg/penenberg-pos...
This includes names, addresses, phone numbers, emails, URLs, CC/account numbers, user names, passwords (maybe tell them that caps-lock is on or any other weird keyboard state if you can).
The comment about developers making work for themselves is also spot on. I answer a lot of programming questions, and the questions are always asked because the programmer has reached the end of a twisty maze of his own creation. Turn around, walk, spin around, and try again. You'll find a better solution.
And oh yeah, I do this all the fucking time. Pick any random github project of mine, and you'll see 8 revisions of the API before I finally pick one that's not retarded. Even then. (Side note: I don't change the API after I release.)
Anyway, best rant ever.
This deserves to be repeated a thousand times.
How many times bad code and bad ideas stick around simply because those that came up with them can't even imagine that they could do without them.
I have run into this many times with people that try Plan 9, 'where is my pet unix "feature"?!?', guess what? It was not a 'feature' and it causes untold pain, and that is why it is not in Plan 9.
Just last week somebody was in the Go mailinglist asking why there is no preprocessor! sigh
'&^(([^:/?#]+):)?(//([^/?#]))?([^?#])(\?([^#]))?(#(.))?&'
The above regular expression is meant to match URI's. Since almost anything can be a URI, the re also matches almost everything.
^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?Despite that evil voice telling you "There is nothing Perl cannot do!" (http://www.bastichlabz.org/bastich/Strips/ba980225.gif), regular expressions alone are not sufficient for real parsing,
Or the inventory you were trying to buy was no longer available. Seats are not all the same price; they are divided into "fare buckets" that are usually lettered. There are very few cheap fares on each flight, more medium fares, and even more full-fares. You should check the code as you are booking; if the fare code changed, they ran out of inventory. If the fare code stayed the same, then they raised the price of that inventory.
Just saying -- it wasn't some conspiracy. Someone just bought them out from under you. Most airlines let you hold a reservation for a few hours, so if this ever hits you again, just hold the reservation, call the web services desk (not the general reservations desk), ask web services to fix your name, and then continue the ticketing process online.
(This is the procedure for AA, anyway. Dunno about other airlines, as I've never used them.)
Personally, I always hold, triple-check my plans, and then buy. So I have never had inventory disappear out from under me, and I have never needed to change a non-changeable fare :)
Even the best coffee is a poor substitute.
C'mon Reg; write a book or something.
You also have the right readership -- the people that will disagree with your post don't even know what a "raganwald" is.
A perfect storm, if you will, for constructive blog comments :)
Not every culture has the concept of a surname. If you need to ask people for their names just do so via one one text field.
Of course it is 9000 and ever since the ZIP code field is a non-validated text field in all applications I have done since :-)
Avenue de la Sallaz 29
1010 Lausanne
Suisse
1010 is the post code, identifying La Sallaz (or a part of it?), in Lausanne. My point? All this stuff is very local and if you want to do it right you should just ask for addresses free-form and if you need to extract information from it then you should use a geocoding library (e.g. http://geocoder.rubyforge.org/) to normalize it for you. 260 Broadway
New York 17
New York
but then the 17, originally a numbering system for big cities, became 100-07, the postcode 10007. (Compare the postcodes around London, EC1/N1/SW1/etc, which were originally just for sorting mail around the central city of England.)Most countries on Earth are not federations; dozens of nations are small enough that dividing into "provinces" would be meaningless; and even larger countries that do have regions may not include their names in mailing addresses.
Considering this and all the other issues related to addresses, I really wonder why we are still trying to store them in separated fields.
Why can't the address just be one big multiline text field where the user types whatever would be needed to receive a postal letter? If we need the data in structured form, we could always write a locale-aware parser that extracts the needed information.
Splitting the address in multiple fields (sometimes even labelled address_line_1, address_line_2 and so on) is probably a relic from the times where databases had nothing but CHAR (with a maximum length of 100 or something) and where applications were created for the local market only.
I would need to do some a/b testing, but I really doubt that it'll be easier for a user to fill out the traditional
Street 1: _______________ Street 2: _______________ ZIP: _____ City: _____________
form instead of just one big text field labelled "Postal Address" - personally, I'd probably be WAY faster filling out that one.
A recent client demanded the address be broken out into fields, but I at least swayed them into accepting a big-text-box for "international" addresses after showing them a few examples.
1. Reject at data entry even though they make me type it twice and they're going to do a round-trip click-to-verify. Too many to name fail this way.
2. Accept at data entry, convert it to a space (+ on URL means space). Pray that the login routine accepts an email address with a space (it probably won't). Tirerack fails this way.
3. Accept at data entry, then fail to create the account in other internal systems. Allow login using the +, but once logged in, data from internal systems is unavailable, and the portal errors in unusual ways. VMWare fails this way.
Failing using anti-pattern 1 is preferable to pattern 2 (replace with space then fail login) or 3 (accept and allow login but fail to interoperate with other systems internally).
After 45+ emails and calls about anti-pattern 3 over 18 months, VMWare still hasn't successfully delivered a VMWare license to me. By now they're on version 3 (a free upgrade if v2 was bought recently) but still haven't delivered me version 2 or 3. Next email, perhaps I should send them raganwald's article.
// EDIT: Added Tirerack.
Bang paths are valid but aren't going to be routable these days. Different hosts allow different characters in usernames, and have different meta-replacement rules for stuff like periods and pluses.
You don't validate a domain name with a regex, you use a goddamn DNS resolver. Email addresses are a superset of that! Don't use a fucking regex.
However, the idea that websites should use the bank's payment gateway for validation is misguided. Your fee's will be increased (or your account will be suspended) on many payment gateways if you do this.
OTOH, some things seem to be more certain, like rules about check sums. I like the approach suggested by many folks: Use JS to validate on the client, and put up a "Are you really, really sure?" message for things that seem unusual like a single name or a funny character.
Apology? Mwahahaha! What happened was that they sent me an email saying the electronic ticket would follow by email within 24 hours. This was on a Friday for a Monday morning flight at 8:00. When no ticket arrived by Sunday morning, I called them to discover their office was closed. I called again at 5AM on Monday morning and they were still closed, so I waited until their office opened at 8:00.
Wrong move. They charged me for the flight, saying that even though they promised an e-ticket and didn't send it, and even though their offices were closed, I should have shlepped out to the airport where the airline would have resolved my problem. I appealed to Visa but lost.
I have never needed email to fly on an airplane.
I think this started as a response to SPAM bots that used to "RCPT TO:" random strings and save a list of valid address.
Here's an even longer but (IMO) much better article about much the same thing: http://weblog.raganwald.com/2007/09/we-have-lost-control-of-...