Apr 27 2008

More post code/ZIP code woes

I was buying the excellent ScreenFlow application from Vara Software yesterday and that old chestnut, the mandatory post code field, came up again. For some reason, whoever coded their purchase forms decided it would be a good idea to ensure that:

  • You must enter a post code, even if you don’t have one.
  • It must not be one character long
  • It must not be too many characters long

What’s too many? I would guess that it’s the maximum length of a British post code or American ZIP code, or some such arbitrary length. Filling this in was a pain – here’s how it played out.

First, I can see the field is mandatory, so, I try entering a hyphen, figuring that it’s the least effort and if anything actually gets posted to me, that’ll look the least silly on the printed address.

Error! you have foolishly attempted to enter one character, this is verboten!

OK. Time to send these people a message. But wait. That is verboten also.

By this stage I am trying to model the mentality of the coder of this form:

Hmmm. What boundary conditions can I imagine that would enable me to validate the text in this mandatory field? Well, I know there should be more than one character, because I can’t conceive of a post code system that uses just one character. And if I set an upper limit to the number of characters in the field, say the length of my local postcode, I’m done. Excellent! What a diligent programmer I am.

Do you know the worst thing? After all this careful validation, he accepts two hyphens.

So, effort was expended in ensuring that only nonsense that falls within rigidly defined parameters is acceptable. AAARRRGGGH! Maybe I just get riled up too easily. But these little details are so easy to get right, there’s just no reason to get them wrong.

2 Responses to “More post code/ZIP code woes”

  1. Des Traynoron 27 Apr 2008 at 11:37 am

    This is why I use 90210 everywhere :)
    I’ve even had packages delivered to Castleknock 90210.

    I can’t wait to see what LukeW has to say about this in his book.

  2. Fabrizioon 29 Apr 2008 at 9:55 pm

    Well at least you can enter hyphens… A lot of italian website put the ZIP code mandatory also for foreign customers and they make sure that only numbers can be entered in the field!

Trackback URI | Comments RSS

Leave a Reply