Live data from Hacker News

Falsehoods programmers believe about addresses

mjt.me.uk

81–90 of 150 posts

Re: Falsehoods programmers believe about addresses

#81

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…

I got in to an argument in school with my computer programming teacher. A BASIC course, we were having to design a system to accept an address, and I was treating my ZIP code as a string. IIRC, something like 50 INPUT "Your ZIP code?", ZIP$ Everything was reviewed via handwritten code and flowchart before we were allowed to type it in in the lab, and I was told "ZIP code is a number, but you're putting it in to a str…

>EDIT: Anyone else remember the "New Zork Times" newsletter? :)

Yep. I went to school with a bunch of the Infocom guys and was an unofficial beta tester for them at one point.

Re: Falsehoods programmers believe about addresses

#82
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 simple cases right; I don't hold out much hope for the obscure cases.

See the Google 'real-names' debacle for just how wrong people can get this kind of thing, even when they're being loudly told that they're doing it wrong.

Re: Falsehoods programmers believe about addresses

#83

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…

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 postal code in Ireland? Most people there learn to try EIRE or 00000.

I think a better article would have been: "Here are the scenarios in which the 7-text address system doesn't work, and how you can make it better." - But I couldn't find anything that suggested it wouldn't work just fine.

Re: Falsehoods programmers believe about addresses

#84

"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.

A lot of companies verify postcodes with QAS, so probably worth reporting it to them:

http://www.qas.co.uk/knowledge-centre/product-information/ad...

They are run by Experian who one of the main credit check companies in the UK, so you might be able to hit two birds with one stone :D

Re: Falsehoods programmers believe about addresses

#85
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.

Learning is important. Part of being a developer is that you must keep learning new techniques and facts that help you accomplish your goals or your clients goals. So I'm not saying we don't need to deal with internationalization, localization, and globalization. When the time comes, deal with it. I'm just saying there's no shame in being a developer with little or no expertise in those subjects. Many commenters here don't seem to acknowledge the many amazing technical things that developers generally do know about.

Thanks for taking the time to respond in words.

Re: Falsehoods programmers believe about addresses

#86
Similar to "Street names don't recur" - A named road will be continuous: a friend lives in a condominium, in one of a group of 8 buildings bounded by 3 fairly normal roads. There are 4 separate driveways between buildings leading to parking.

At some point the condo units were renumbered with street numbers, and the disjoint driveways were all given the same name: Lane.

Regular delivery drivers - USPS, UPS, FedEx, and pizza seem to cope, but taxi drivers or other irregular visitors who expect numbers to be continuous along streets are almost always baffled.

Similar to "A road will only have one name", for emergency services - fire, ambulance, and police - a similar case arises when a route passes through several small towns, each with its own set of street numbers, possibly with variations of proper street name, and perhaps with different direction/cardinality mappings.

For a motorist calling 911, reporting that one is at street number 123 on El Camino Real (on the SF peninsula) will probably map to several possible locations, depending which of the 12 or so towns one is in.

Re: Falsehoods programmers believe about addresses

#88

Earlier quoted context omitted.

Simple clerical errors rarely invalidate a contract. I'm not a lawyer though so I don't actually know. I would have done address line 1, address line 2, line3, etc. I think people got confused by your form because they are used to typing in 1234 Sample Street expecting to be asked the rest of the information further down. The other option would be on form submit to show what they have put in and say "make sure this i…

> Simple clerical errors rarely invalidate a contract. I'm not a lawyer though so I don't actually know. We need a name for this.

https://en.wikipedia.org/wiki/De_minimis

Re: Falsehoods programmers believe about addresses

#89
post #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 o…

If your country doesn't have the concept of separate city/country, (Singapore doesn't) - you can just enter "Singapore, Singapore, Singapore"

Or UK, London, London.

Totally agree that systems should not presume to known (often incorrectly) the format/content of such fields, outside of areas where they can. (I.E. Validating Postal Codes in regions like Canada, United States, etc..)

Re: Falsehoods programmers believe about addresses

#90
post #81

Earlier quoted context omitted.

I got in to an argument in school with my computer programming teacher. A BASIC course, we were having to design a system to accept an address, and I was treating my ZIP code as a string. IIRC, something like 50 INPUT "Your ZIP code?", ZIP$ Everything was reviewed via handwritten code and flowchart before we were allowed to type it in in the lab, and I was told "ZIP code is a number, but you're putting it in to a str…

>EDIT: Anyone else remember the "New Zork Times" newsletter? :) Yep. I went to school with a bunch of the Infocom guys and was an unofficial beta tester for them at one point.

did they have any clue how groundbreaking their stuff was at the time?
Post reply on HN