Live data from Hacker News

Falsehoods programmers believe about addresses

mjt.me.uk

31–40 of 150 posts

Re: Falsehoods programmers believe about addresses

#31

Is it common to believe that post codes don't start with zero? All of New England (ME, MA, NH, CT, RI, VT) have zero starting post codes. Plus apparently a part of New Jersey. Map here: http://en.wikipedia.org/wiki/ZIP_code Also, since it brought up naval vessels, here's the addresses of all US Navy ships: http://www.navy.mil/navydata/ships/lists/ship-fpo.asp Anyways, the post office does a wonderful job delivering m…

> Is it common to believe that post codes don't start with zero?

It may be less of an explicit belief and more of a case of "This looks like a number! Let's store it as a number!" which wipes out leading zeros.

Re: Falsehoods programmers believe about addresses

#32

Is it common to believe that post codes don't start with zero? All of New England (ME, MA, NH, CT, RI, VT) have zero starting post codes. Plus apparently a part of New Jersey. Map here: http://en.wikipedia.org/wiki/ZIP_code Also, since it brought up naval vessels, here's the addresses of all US Navy ships: http://www.navy.mil/navydata/ships/lists/ship-fpo.asp Anyways, the post office does a wonderful job delivering m…

> Is it common to believe that post codes don't start with zero? It may be less of an explicit belief and more of a case of "This looks like a number! Let's store it as a number!" which wipes out leading zeros.

Gotcha! I understand now.

Re: Falsehoods programmers believe about addresses

#33

I read this article a long time ago and I took it seriously. So instead of asking for address, postal/zip code, city, state/province, I just put up a big text area labeled "Full address" so that people have complete freedom about what to fill in. 80% of the users ended up only filling in their street address, not their postal/zip code, city and state/province, even though they're from countries where (most?) addresse…

At least it helps if you don't block on empty fields then - I keep getting annoyed when sites demand I enter "state/province" for international shipping when my country doesn't have that concept.

Or demand that I enter 6-digit postal code when we only use 4. Or not being able to handle non-ASCII chars. And things like that - helping people is fine and useful, but blocking a user because you set up assumptions valid only for your locality is a huge annoyance.

Re: Falsehoods programmers believe about addresses

#34

I read this article a long time ago and I took it seriously. So instead of asking for address, postal/zip code, city, state/province, I just put up a big text area labeled "Full address" so that people have complete freedom about what to fill in. 80% of the users ended up only filling in their street address, not their postal/zip code, city and state/province, even though they're from countries where (most?) addresse…

Did you try pre-filling the address field with an example address (John Doe, 123 Example Avenue, Hobbiton 1234) to make it clear what is required? (Although it seems like placeholder text only works with textarea fields since HTML5...)

Re: Falsehoods programmers believe about addresses

#35
"An address will exist in the country's postal service's database"

This is the one that I've run afoul of -- not because I live in a brand-new building, or a houseboat, or 30 miles from anywhere on an unnamed road; it's just that there is no door-to-door delivery for houses within a 2-block radius of the local post office, so we have a PO box.

The trouble happens when a business that needs my street address uses the USPS database for address verification. One example is online stores that don't ship to PO boxes. Some of these sites have a form with a sort of "Are you sure" prompt when my street address isn't recognized; others just refuse to accept it.

Even worse was when the local company that picked up my trash was bought by one of the larger regional "waste management" operations, and all the drivers' routes were re-planned for "efficiency" (evidently using software that hit some USPS database); the upshot was that everyone on my street had their address removed from the pickup routes.

Re: Falsehoods programmers believe about addresses

#36
post #28

Developers can't know everything there is to know in the world. Developers aren't suppose to know specific stuff like this. Some parts of modern society are easy to digitalize, other (often historical) parts aren't. I think it's up to entrepeneurs to find ways to solve these problems, and create a better world by doing that. Don't blame/shame developers for stuff like this. It's not even remotely fair. When you're tr…

Well, after reading this article and other variations on the theme that's one less set of mistakes to make.

Even if developers are not demigods they shouldn't be above learning.

Entrepreneurs have very little chance of fixing this, it's mostly a local government thing and since it isn't actually broken I highly doubt that something will change. So 'deal with it' is the appropriate response.

Re: Falsehoods programmers believe about addresses

#37
post #17

Earlier quoted context omitted.

free text with no validation is the only acceptable answer. Unfortunately, it's not an acceptable answer in practice. In my experience, users aren't clear what to do when presented with a free-form, multi-line text box in which they can enter their address. This results in frequent missing data – users aren't aware they need to include a postal code, or county, or country… This is probably because users are generally…

Of course I'm not saying single multiline textbox for every app out there. That would be crazy. :-) But I'm always surprised how many sites ask for information that will never be used for anything, and assume things like the lenght or characters valid in zip codes or phone numbers. I heard these days on "There is no such thing as a fish" podcast there is a country somewhere where the post office locates places by dir…

So, what's the proper way to deal with this then?

Ask a series of questions and adapt the follow up to the questions depending on the answer given.

Starting out with 'select your country' and then expand from there, the more you know the more you can narrow down the remainder of the input.

That would be a nice little widget to be able to throw onto a form 'world accurate address input fields'.

And for some localities it will indeed display a freeform text field, but for localities where there is more structure it could supply that structure and make certain bits mandatory.

Re: Falsehoods programmers believe about addresses

#38

"An address will exist in the country's postal service's database" This is the one that I've run afoul of -- not because I live in a brand-new building, or a houseboat, or 30 miles from anywhere on an unnamed road; it's just that there is no door-to-door delivery for houses within a 2-block radius of the local post office, so we have a PO box. The trouble happens when a business that needs my street address uses the…

I have this problem too, but just because the UK postcode database that a lot of sites use is wrong. There's not even a way to report it.

It means I can basically never pass a credit check at this address.

Re: Falsehoods programmers believe about addresses

#39

Is it common to believe that post codes don't start with zero? All of New England (ME, MA, NH, CT, RI, VT) have zero starting post codes. Plus apparently a part of New Jersey. Map here: http://en.wikipedia.org/wiki/ZIP_code Also, since it brought up naval vessels, here's the addresses of all US Navy ships: http://www.navy.mil/navydata/ships/lists/ship-fpo.asp Anyways, the post office does a wonderful job delivering m…

> Is it common to believe that post codes don't start with zero? It may be less of an explicit belief and more of a case of "This looks like a number! Let's store it as a number!" which wipes out leading zeros.

Which also won't work with post codes that are not numeric. The UK has those, for example.

Re: Falsehoods programmers believe about addresses

#40

I read this article a long time ago and I took it seriously. So instead of asking for address, postal/zip code, city, state/province, I just put up a big text area labeled "Full address" so that people have complete freedom about what to fill in. 80% of the users ended up only filling in their street address, not their postal/zip code, city and state/province, even though they're from countries where (most?) addresse…

This is where most of the "falsehoods programmers believe" articles fall flat.

The thing to do is not try to design a single form that accommodates every possible address or name or whatever. The thing to do is examine your use case, design a form that works for, say, 99.9% or more of the people you want it to reach, and then if you really want to get the last 0.1% have someone who can do customer service and has access to a freeform text box into which they -- not the end user -- will enter the information.

Because when you get right down to it, the freeform text box is the only thing that accepts 100% of valid addresses (or valid names, or whatever). But it also necessarily accepts a ton of invalid ones, too, and so it causes more trouble for the common cases than it saves in the uncommon ones.

Post reply on HN