Live data from Hacker News

Falsehoods programmers believe about addresses

mjt.me.uk

1–10 of 150 posts

Re: Falsehoods programmers believe about addresses

#5
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?) addresses satisfy that format.

We ended up reverting to the previous form where we explicitly asked for postal/zip code etc.

Re: Falsehoods programmers believe about addresses

#7
Of course, they're falsehoods that everyone believes about addresses (except maybe for postal workers), but programmers are the only ones who have to actually think about them.

It would be nice to come up with some sort of conclusion or recommendation. Should addresses just be used as one big blob of text, and never parsed at all? should there be individual per-country libraries for parsing them? should we just address everything by coordinates (which doesn't solve the houseboat problem)? How about a unique identifier for every person on the planet, plus a gps tracking system that guarantees big brother can deliver to you whenever, wherever?

Now that the average piece of post is a prig package that needs signing for, rather than a small letter that can just go through the letterbox, I quite like the idea of centralised pigeon-hole buildings, that have existed in many towns as the only method of delivery, but are now being born everywhere thanks to amazon, etc. That's quite a different problem, though :-)

Re: Falsehoods programmers believe about addresses

#8

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 need it for delivery of something? Was that made very clear to the user? I can't believe so many people, wanting to receive something through the post, would wilfully screw up their address - maybe there's more to your use-case than meets the eye?

Re: Falsehoods programmers believe about addresses

#9

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 need it for delivery of something? Was that made very clear to the user? I can't believe so many people, wanting to receive something through the post, would wilfully screw up their address - maybe there's more to your use-case than meets the eye?

It was a form for signing an agreement. If they don't fill in their full address then the contract may not be legally binding.

Re: Falsehoods programmers believe about addresses

#10
There are so many misconceptions from developers, even more when building apps used worldwide. If you plan to accept data from different countries, free text with no validation is the only acceptable answer.

I remember once we had to remove validation from names because some countries don't even have last names, and others have real names with two or even one characters.

Post reply on HN