Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Falsehoods programmers believe about addresses (2013) (mjt.me.uk)
60 points by gk1 on Oct 29, 2020 | hide | past | favorite | 62 comments


Here's a completely legal and fully specified address in Singapore:

  238801
Or if you're sending international mail:

  SINGAPORE 238801
Explanation: Singapore is a city-state with no divisions for states, counties etc, and every single house and building has its own unique 6-digit postcode, so that number is all you need to receive mail or locate an address. Of course, in practice people usually put in the regular road address as well for redundancy, but it's not really necessary.

  Ion Orchard
  2 Orchard Turn
  SINGAPORE 238801


Ireland seems to achieved the same thing (tiny addresses being accepted) in a far more casual fashion just on account of being both very small and sparse.

https://www.irishpost.com/news/eight-times-irish-postmen-ama...

I would imagine other locations like New Zealand or Iceland have the same phenomena. We adopted EirCodes (Irish Postcodes) purely so people felt they had something to type in to online forms when ordering -- sometimes programmers insisted on post code when we didn't have any in Ireland. Before this I would just use IRL00 by default.


Yeah, most of the addresses where I grew up had no postcode of any description. Remember sticking forms of "munster", "mun" or "mun001" in there (the ones that validated it by UK Post code logic were the worst).

Later I moved to Dublin which had postcodes but they were more postal districts. So my postcode was "Dublin 8", which again was rejected by a lot of validators.

now we have eircodes so my postcode at that same address is d08 xxxx. We're getting on some sites the US style autofill of address based on Eircode as a result. but not everywhere's used to it. Just Eat, the largest takeaway ordering site goes sets my address to <house number>, <Street name>, <County Dublin>, but if I leave that as is, some local takeaways, including some very near to me see that as County Dublin as opposed to Dublin City and cancel the order thinking I'm out of delivery range, so I need to correct the final field to Dublin 8 anyway.


Somewhat similarly in the Netherlands, while the full address is generally used, the postcode (say 1012CK)* and the number (say 17) is sufficient to uniquely identify a place in the country.

* this is a random place I found on google maps. Don't send them mail.


The US kind of/sort of has a similar thing with extended zip codes. From what I understand, the postal service usually assigns an extended zip code for each building they deliver to. If you’re at a single family residence, then it’s equivalent to the Singaporean example above (though it’s possible the postal service will still reject a letter addressed to just an extended zip code!).


I'm not sure what extended zip codes are as I'm only aware of the zip codes like 90210 which cover a large area. But here in the NL a lot of online shopping for example don't even ask you for the street name, just the post code (4 digits + 2 letters) and of course your house number. You type in the post code and the street name gets filled in, leaving you with just the house number to enter.


You'll see the US's extended ZIP codes referred to as Zip+4, as they have nine digits instead of the usual five. So, 90210-1234 refers to a specific Delivery Sector and Delivery Segment within Beverly Hills. The segment can be a particular building or even just one floor of a building. Or, it can refer to all the buildings on one side of the street. It's up to the post office.


Apparently the Radisson Blu Hotel in Amsterdam.


I used to work with a guy who would send mail to his mom at:

> Ma

> <postcode>

> Scotland

Supposedly it worked because his local postman knew there was only one woman on the route with a son who would be sending mail from the US. Which didn’t sound like a very reliable method, but he claimed it never failed.


I have sent something to "{name} Somewhere near the brewery {town}" and it reached the destination. They will often try and deliver these kind of incomplete addresses.


Many postal systems have a "difficult cases" department whose job is to try to decipher otherwise undeliverable addresses.


In the UK the postcode would be often applied to only one street (or a part of a street). This means in practice you get small villages with a postcode that covers 2 houses for example. The local postman could likely know the residents well enough in that case.


SW1A 1AA is sufficient for a letter to Buckingham Palace. You should probably include the name of the person.

It's not unusual. The university residence halls I lived in had postcodes unique to the building, and my first employer in London has several postcodes for several nearby buildings.


Average number of properties per post code is 15 (max about 100), so a lot smaller than a route. And in rural area the routes are often kept to the same small group of staff for years.


How does that work with a population of 6 million?


95% of Singapore's population lives in apartment buildings of some kind, which pack tens if not hundreds of households into each post code.


Apparently there’s no more than 999,999 unique residences?


Singapore is a city-state on an island that is ~40x20 km in size. If you divided that rectangle evenly to a million plots, you'd end up squares that have ~30m sides. And that's before you consider that the island is not square, and that there are roads, airports, parks and things like that.

No, there are not anywhere near a million unique buildings. Instead, there are ~9000 high-rises.


1,000,000 if the code 000000 counts


You are assuming all post codes have the same length by any chance? :)


In Singapore they're always 6 digits.


Is there a check digit?


For every falsehood, this article provides an example, which is very nice.

Most falsehood articles just list a bunch of assumptions and as a reader it can be kind of hard to understand in what way those assumptions are wrong.


I moved to USA from India and after the interstates, this is one of the top things I am jealous of since we don’t have a sane addressing system in India.

Only if you are from such a place you will have an idea how frustrating it is to explain to a delivery person how to reach your apartment. “Bro, come around behind the mall, proceed to the dead-end and then left and then to the right after the temple”. This is not even some small town in a remote place. This is Bangalore, where I lived for years near corporate offices. Sigh.


Does something like Google Plus Code (https://maps.google.com/pluscodes/) help in this case? This sounds exactly like the use case they wanted to support (and that was supported by other systems prior to GPC), so I am curious if it, in fact, makes any difference on the ground.


Interesting, apart from the problem that like any Google feature/product it will likely be abandoned, and then shut down in a few years screwing over anyone that actually depended on it :smh:


Plus Codes (or Open Location Codes) are simply mappings from latitude/longitude to an alphanumeric string [1], and there are open-source implementations in many languages [2], which means the effect of the project being abandoned would be limited.

[1] https://github.com/google/open-location-code/blob/master/doc...

[2] https://github.com/google/open-location-code


Indian food delivery and ride-hailing companies like Zomato and Ola don’t appear to support it yet (and training their delivery folk), sadly. I wish they would though — it would make life much easier. Most delivery people I’ve spoken to are unaware of the feature.

Also Google Maps in India has quite a bit of variance from “ground truth” so the phenomenon OP describes (of delivery folk calling you up every. single. time) is very real.


It wouldn’t work in India in most cases. Most delivery person uses a motorbike for deliveries which I believe is not equipped with a goa device that they can refer to at all times during driving. Even if they have a smartphone and I send them a google maps link, they end up calling me several times throughout the delivery.


A few more, if I didn't just miss them:

- That every place has an address. Some countries like Mongolia don't. Many countries don't have reliable addresses.

- That addresses follow the "number street city" format. In Germany the street comes before the number

- That street names are unique within a city.

- That door numbers are contiguous and zig zag from one end of a street to another. In Germany they sometimes go in a loop, starting on one side, and returning on the other. Unless they don't.

- That streets are continuous. Mine wasn't and it confused delivery drivers. (Rue de la Volière, Granby, Canada


I think the scope of the link is pretty much UK/US centric.

e.g. in S.Korea you write an address from the biggest geographical indicator to the smallest (country, region, city, district, road, building NOT building, road, district, city, region, country)


Error translating "Context" to Korean... timeout.


To add to that list, in many places zip-codes just don't matter, I think they're mostly a US/UK thing. I'm from Eastern Europe and I found myself many, many times googling for my address's zip-code when filling-in online forms because I have never known it by heart (and before the advent of the Internet I very rarely used it).


In Germany they're needed as well. And in my home town there's actually two streets with the same name in very different parts of the city, distinguishable by postcode.

Furthermore, they ease automatic sorting and sure, once your mail reaches your local postperson, they know the neighborhood and names and addresses, but that doesn't mean postcodes don't serve a purpose.


Fun fact: several Central European countries are being quite often (wrongly) described as East European. So while at it, in that part of Eastern-ish Europe where I'm from the ZIP codes do matter :)


Asia also starts in a different place, depending on who you ask. It can start anywhere between Istanbul and the Urals


I am from Brazil, here usually door numbers zig-zag (one side is odd, the other is even).

But for some reason, on the street of my business, the numbers are seemly completely random, really.

Cue the drivers that are supposed to come pick-up products we have to ship ALWAYS getting lost if it is their first time...


I think only the fifth is missing.


But do programmers believe that? Even in big US cities streets are cut and restart a few blocks later...

And the numbers don't go from one end to another they often start at the city center and increase in both directions. In Los Angeles Wilshire Boulevard start counting from downtown LA and also start counting from downtown Santa Monica at the other end and they meet with highest numbers somwhere in the middle. If you have an appointment at 900 Wilshire make sure your GPS don't send you on the other side of the city an hour of traffic away.


They might not believe it. They might just not think about it.

I worked at HERE Maps, and little things like these cropped up in meetings. One of the benefits of a diverse team is that someone will often point it out.


A lot of these comes down to structuring law and bureaucracy to be digitizable. In Denmark every cadastre is throughly mapped and logged, and have been for a long long time. As a result we have a national addressregistry with a public API. This way your digital solutions will never really get an address wrong.

I think you could build something similar with OpenStreetMaps if your bureaucracy sucks, but it’s a massive undertaking of course.

What surprises me the most is how countries that don’t do this, keeps track of all the other GIS related things. Like how much electricity or plumbing a cadastre will need. Or perhaps more important, taxes and property taxes.


When I moved in to a new apartment in Copenhagen, it took about a year for the address to be present on most websites that tried to autocomplete it.

Almost all of them let me input it myself if the autocomplete failed. I did have to phone Yousee so they could provide broadband.


Well, the open API isn’t free as in beer.


In Slovakia, we have an addressing system invented in the Maria Theresia times: each building has a separate number, unique within the city or a suburb, in addition to the usual house number. In small villages, especially where streets have no names, these unique numbers are used to identify houses, as no other house numbers exists.

These numbers appeared in an attempt to uniquely identify households, mainly for tax and military purposes, hence the name: conscription numbers. In a lot of places, these numbers were literally issued in the order troops marched through the town, usually starting with the church. (More on the topic: https://forgottengalicia.com/wp-content/cache/page_enhanced/...)

The fun thing about conscription numbers is that they alone can be used in addresses. For example, Nižná 496 is a valid address (where Nižná is the village name), while Nová Doba 496, Nižná is what many people would use — this village has no street-level house numbers, but streets themselves have names.

Similarly, Bratislava I 501 is the same address as Hlavné námestie 1, Bratislava is the same address as Hlavné námestie 501/1, Bratislava is the same address as Hlavné námestie 501, Bratislava.

Sometimes, houses have street-level numbers, but there’s no street name. For example: <https://www.openstreetmap.org/node/4738832411#map=18/49.0512...>. There’s a bunch of houses in this area which have addresses like Trstica 1, Trstica 3, but also have conscription numbers, so technically Iľanovo 122, Liptovský Mikuláš, Trstica 1, Liptovský Mikuláš and Trstica 1, Iľanovo are all probably valid addresses (not verified by any delivery there, though).

With postal codes, IIRC all post codes in Slovakia outside of Bratislava start with 0, those in Bratislava start with 8, a remnant from the times when Czechoslovakia had a common postal code system. In Bratislava, the second digit in the postal code is the city district/suburb, three more digits define a bigger zone within it, but are largely optional; the third digit of zero means the postal code of a post office serving the area:

811 07 is an area in the Blumentál locality, 810 07 is the post office which delivers there, but a post code 810 00 would work just fine.


> Tibor Schütz points out many post offices have novelty handling of mail to Santa Claus, even going as far as to allocate special postcodes. For example, in Germany: Santa Claus Nordpolen, Julemandes Postkontor, DK-3900 Nuuk; in Canada: Santa Claus, North Pole, H0H 0H0; in the UK: Father Christmas, Santa’s Grotto, Reindeerland, XM4 5HQ

Well played, Canada.


Did a project for consolidating address representations across systems for large logistics a couple years ago. It was the one project where XML was a genuinely adequate representation. Ie you could have a text line address preserving sequence, newlines, and whitespace, yet markup postcode and other distinguished fields. Like

    <line>Bla Ltd</line>
    <line><houseno>11</houseno>, Xyz-Street</line>
    <line><postcode>12345</postcode> MyCity</line>
Taking advantage if the fact that almost all addresses can be written in a line-oriented fashion. Actual addresses were using the much more granular UPU S1 vocabulary. SGML would've been even better since it can treat newlines and whitespace as markup, eliminating <line> boilerplate and just use a regular text block representation.


The biggest falsehood I regularly see is requiring a 'city'. It seems like almost everyone does this. I don't live in a city. Many people live in villages or towns. What do you want me to put there?


The village or town..?


I've been told, in the U.S. you don't really say or use the word "village". Even if the place has just some 300 souls living there. So "The village or town..?" may not pass the type-checking :)


Many parts of the United States have municipalities legally incorporated as "villages". Illinois is one example, "the Village of Downers Grove" http://www.downers.us/


Why don't they ask for city/village/town then? Why always ask specifically for a city? Many people don't live in cities. Some don't live in any kind of town or village or anything.


If curious, see these earlier discussions about this list:

https://news.ycombinator.com/item?id=8907301 (2015)

https://news.ycombinator.com/item?id=5791489 (2013)


Unfortunately, the biggest falsehood a programmer (very briefly) believes after reading this list is that management will let you just use the only reasonable solution of a single textbox for the address without any attempt to validate it.


A fun one to add. In Hong Kong, old walk-up buildings often have different floor numbers in English than they do in Chinese.

For example, 2/F in English may be 三楼 (third floor) in Chinese.


I don't think this is all that strange, because even within the English language there's a difference of interpretation of what the "first floor" really is. British English uses "ground floor" for the floor that is at ground height and "first floor" for the first floor you need to reach by stairs. American English often interprets "first floor" as the first floor entered (the one on the ground). Of course, the British rule has left the American continent these days, but in other countries this could very easily become a problem.

In a country with different cultures, languages and systems of writing it's only natural that the Chinese representation reflects what a Chinese person would call that floor, with the English representation next to it converted to whatever level of language compatibility someone might choose for international mail.


It's strange in that my floor number changes depending on what language you are using. For systems that parse addresses into a structured format it's a real problem, as they need to ensure they are rendered into the original language.


I like this type of articles, but also felt pretty frustrated. Programmers are not supposed to be an expert in this type of details, neither do most other people in a company.

The real problem is that how do we encode this knowledge in an easily reusable way? (In the same way they programmers do not have to know x86 ISA to write useful applications)


An extra one: addresses won't look like dates.

The typical way of writing my address starts in the format 1/2 X Street to indicate house number and flat number. Some text processor altered this to the format 1 February X Street. Not surprisingly that got misdelivered.


In "Bohemia" there's a village called "Bohemia" https://en.wikipedia.org/wiki/%C4%8Cechy


This is by the guy who did the XSS injection via company name a few days ago.


Is there any place where streets start counting at 0 or go negative?


Yes, and the article provides an example of both.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: