Live data from Hacker News

Falsehoods programmers believe about addresses

mjt.me.uk

131–140 of 150 posts

Re: Falsehoods programmers believe about addresses

#131

An observation: My street address is XXXX Martin Luther King Jr Way, Apt XXX The number of organizations that accept the address, but chop off the apartment number when they send mail because it is too long is ridiculous. Even better, it tends to be government departments. For example, the IRS does this. Martin Luther King Jr Way has to be one of the most common street names in the US. Many orgs can't even get the si…

Pro-tip: no one will ever, ever misdeliver a package addressed to {house#} MLK #{Apt#}. I've lived on an MLK. If you live on Lakeshore Drive in Chicago, LSD works just as well. Where MLK is concerned, he has an official holiday, Americans know what those three letters mean.

MLK Jr. for extra clarity?

Re: Falsehoods programmers believe about addresses

#133
post #119

Earlier quoted context omitted.

The worst is when you store it as a string, having learned from others' mistakes, but then upon exporting to CSV... Excel kindly strips the leading 0 and you get a bug report that your software is screwing up the ZIP codes! Took a bit of searching before finding this: https://www.webdigi.co.uk/blog/2010/handling-leading-zero-in...

Excel is the bane of my existence. I give a lot of speeches about how to preserve data precision. However It seems to be largley in vain, as there is often a lot of back and forth when handling data between different groups, even programmers don't seem immune from screwing up a csv file with excel.

Oh god office workers love putting everything in Excel. Even when it makes no sense...

Re: Falsehoods programmers believe about addresses

#134

Earlier quoted context omitted.

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

"Punt and let customer support handle it" is a pretty lazy solution, in my view. Additionally, what a developer might think of as a "99.9%" solution is more often than not a 99% solution, or a 90% solution. With enough customers, dealing with everyone who can't use your slapped-together form will be more expensive than doing it right. Software doesn't become great by assuming someone else will handle the edge cases a…

Great software is that which solves your business problem.

If not "punt to a human", what's the solution? We've already seen that giving users a free-form text box is a cure worse than the disease. Do you analyze every country's address scheme and make a dynamic form that covers all the cases? (worse IMO - it's not going to cover all the cases, and it's going to be even more infuriating for users when it goes wrong. See the Jersey example in another comment) Some wizard solution that I can't think of? Saying this approach is "lazy" is all well and good, but do you have a positive proposal?

Re: Falsehoods programmers believe about addresses

#135

Earlier quoted context omitted.

Except, in this scenario, it's relatively easy to come up with a good 99.9% solution: Seven text fields will cover greater than 99.9% of users: Name Address Line 1 Address Line 2 City State Country Postal Code So much of that article discussed stuff that was irrelevant - Live in Singapore? Great, just fill in Singapore, Singapore, Singapore. I've done that on many, many sites and it's always worked fine. Don't have a…

My country unfortunately doesn't fit that scenario. Here in the UAE there is no residential postal delivery, so if you want to receive letters you have them sent to a PO Box. Most people usually use their office's, but I have my own. That means you can reach me with simply: PO Box XXXX Dubai UAE For sending parcels to be delivered by a courier you can include a physical address, however most streets here don't have n…

So what would fix this for you? Same 7 fields, but longer?

Re: Falsehoods programmers believe about addresses

#136
My mainland European address saves me a fortune in online shopping - payment and delivery both usually fail.

My two neighbours and I share a driveway but we have our own gates and house numbers. The street is unnamed and unnumbered like the other roads in the immediate area.

There are at least two valid postcodes for the property, which is a few minutes walk from a major administrative boundary. Postal deliveries might turn up once in four to six weeks.

When I put this info into card validators, then tell them that my bank is in a different country to the one I'm ordering from, they generally barf.

Re: Falsehoods programmers believe about addresses

#137
post #111

Earlier quoted context omitted.

Are these seven fields all required? Because I don't have an "Address Line 2".

I have never seen anywhere require "Address Line 2." It's only used as a specifier to the address when there are multiple units at the address (office buildings, apartments, and the like).

I bought something last week that required it. I entered a dot.

Re: Falsehoods programmers believe about addresses

#138
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…

I'm in Italy and, years ago, it happened to me to sens postcards with directions from a know landmark to the building (because I didn't have real addresses of some friends with me). Postcard always arrived (ie: third palace going west from FAMOUS_HOSPITAL_MAIN_ENTRANCE, City, Italy).

Re: Falsehoods programmers believe about addresses

#139

Earlier quoted context omitted.

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…

Picking an arbitrary starting point like 'country' still has problems. I'm in Jersey Channel Islands, which isn't a country at all (much like Vatican City & other territories). We are British but not part of the UK nor members of the EU. We're served by the British Royal Mail system and use UK-style postcodes, but sometimes when I input my address I must chose a country, so pick UK, which triggers UK VAT on my order.…

Nice spot! Sounds like the problem is with the automatic attachment of the VAT to the UK though, not the address system per-se.

Re: Falsehoods programmers believe about addresses

#140

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

I've found that if you have authoritative addressing data for your target market(s), a search/autocomplete field is a great alternative to the multi-field form being talked about in this discussion. Having access to that sort of data is, of course, a pretty big caveat as much of it is currently proprietary but efforts are being made globally to address (couldn't resist!) this (e.g. http://openaddresses.io, http://alpha.openaddressesuk.org).
Post reply on HN