Live data from Hacker News

Falsehoods programmers believe about addresses

mjt.me.uk

11–20 of 150 posts

Re: Falsehoods programmers believe about addresses

#11
some usefull links:

- The free and open global address collection : http://openaddresses.io/

------ "OpenAddresses Hits 100 Million" https://www.mapbox.com/blog/openaddresses-100m/

- OpenStreetMap "addr:housenumber" FREQ http://taginfo.openstreetmap.org/keys/addr%3Ahousenumber#val... [ more "14" than "13" ]

- OpenStreetMap "addr:street" FREQ http://taginfo.openstreetmap.org/keys/addr%3Astreet#values

- OpenStreetMap "addr:postcode" FREQ http://taginfo.openstreetmap.org/keys/addr%3Apostcode#values

- Derek Sivers: "Japanese addresses: No street names. Block numbers." http://sivers.org/jadr

- Wikipedia : "Address (geography)" http://en.wikipedia.org/wiki/Address_(geography)

Re: Falsehoods programmers believe about addresses

#12

Earlier quoted context omitted.

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.

I cannot imagine how such a law, dealing with international addresses and all the issues identified in the article could ever be practically applied, but I guess YANAL.

Re: Falsehoods programmers believe about addresses

#16
post #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.

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 conditioned to expect separate text fields for separate tokens in their addresses.

There's a middle ground though – extract the tokens you need (postal code, country) and allow the user to freeform the rest. And don't even think about trying to validate addresses in any real way – you'll fail!

Re: Falsehoods programmers believe about addresses

#17
post #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.

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 directions given by the sender! And that is officially accepted! Crazy world, try validating that. :-)

Re: Falsehoods programmers believe about addresses

#18

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 addre…

I think the consensus is to go with the "big blob of text" approach. You mentioned that postal workers are the only people qualified to parse addresses—let them do it. The validation done on your end shouldn't be much more than asserting that addresses contains non-whitespace characters.

I don't know how well this works in practice, but it's the most "correct" thing to do.

Re: Falsehoods programmers believe about addresses

#19
Patrick has an excellent variation on this theme:

http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...

I live on a road that has two sets of numbers, both identical (but several hundred meters removed from each other) in two different towns but with the same name. Getting mail and packages delivered here is for want of a better word a challenge.

Re: Falsehoods programmers believe about addresses

#20

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 addre…

I think the consensus is to go with the "big blob of text" approach. You mentioned that postal workers are the only people qualified to parse addresses—let them do it. The validation done on your end shouldn't be much more than asserting that addresses contains non-whitespace characters. I don't know how well this works in practice, but it's the most "correct" thing to do.

I can understand not validating fields, but users are hopeless and like guidance. Giving them some structure in address fields helps the user through the system.
Post reply on HN