News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about addresses (2013) by howlgarnish on Thursday October 29, 2020 @04:32AM (#24928392)
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
Re:Falsehoods programmers believe about addresses (2013) by s_dev on Thursday October 29, 2020 @07:23AM (#24929313)
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.

Re:Falsehoods programmers believe about addresses (2013) by Macha on Thursday October 29, 2020 @08:36AM (#24929816)
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.

Re:Falsehoods programmers believe about addresses (2013) by eythian on Thursday October 29, 2020 @06:18AM (#24928892)
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.

Re:Falsehoods programmers believe about addresses (2013) by brodie on Thursday October 29, 2020 @09:08AM (#24930072)
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!).
Re:Falsehoods programmers believe about addresses (2013) by targeteddots on Thursday October 29, 2020 @01:39PM (#24933010)
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.
Re:Falsehoods programmers believe about addresses (2013) by csixty4 on Thursday October 29, 2020 @08:34PM (#24937830)
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.
Re:Falsehoods programmers believe about addresses (2013) by grenoire on Thursday October 29, 2020 @06:57AM (#24929144)
Apparently the Radisson Blu Hotel in Amsterdam.
Re:Falsehoods programmers believe about addresses (2013) by AmericanChopper on Thursday October 29, 2020 @04:50AM (#24928462)
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.

Re:Falsehoods programmers believe about addresses (2013) by 7952 on Thursday October 29, 2020 @08:43AM (#24929875)
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.
Re:Falsehoods programmers believe about addresses (2013) by howlgarnish on Thursday October 29, 2020 @09:40AM (#24930330)
Many postal systems have a "difficult cases" department whose job is to try to decipher otherwise undeliverable addresses.
Re:Falsehoods programmers believe about addresses (2013) by viraptor on Thursday October 29, 2020 @06:09AM (#24928838)
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.
Re:Falsehoods programmers believe about addresses (2013) by Symbiote on Thursday October 29, 2020 @06:22AM (#24928916)
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.

Re:Falsehoods programmers believe about addresses (2013) by jjp on Thursday October 29, 2020 @06:11AM (#24928852)
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.
Re:Falsehoods programmers believe about addresses (2013) by billpg on Thursday October 29, 2020 @05:24AM (#24928619)
How does that work with a population of 6 million?
Re:Falsehoods programmers believe about addresses (2013) by howlgarnish on Thursday October 29, 2020 @06:29AM (#24928962)
95% of Singapore's population lives in apartment buildings of some kind, which pack tens if not hundreds of households into each post code.
Re:Falsehoods programmers believe about addresses (2013) by ssss11 on Thursday October 29, 2020 @05:45AM (#24928729)
Apparently there’s no more than 999,999 unique residences?
Re:Falsehoods programmers believe about addresses (2013) by Tuna-Fish on Thursday October 29, 2020 @10:10AM (#24930622)
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.

Re:Falsehoods programmers believe about addresses (2013) by flemhans on Friday October 30, 2020 @03:14AM (#24939885)
1,000,000 if the code 000000 counts
Re:Falsehoods programmers believe about addresses (2013) by nottorp on Thursday October 29, 2020 @07:17AM (#24929266)
You are assuming all post codes have the same length by any chance? :)
Re:Falsehoods programmers believe about addresses (2013) by howlgarnish on Thursday October 29, 2020 @09:39AM (#24930324)
In Singapore they're always 6 digits.
Re:Falsehoods programmers believe about addresses (2013) by anoncake on Thursday October 29, 2020 @03:00PM (#24934204)
Is there a check digit?
Re:Falsehoods programmers believe about addresses (2013) by wodenokoto on Thursday October 29, 2020 @03:03AM (#24928011)
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.

Re:Falsehoods programmers believe about addresses (2013) by swaranga on Thursday October 29, 2020 @03:28AM (#24928101)
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.

Re:Falsehoods programmers believe about addresses (2013) by gonzus on Thursday October 29, 2020 @06:49AM (#24929103)
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.
Re:Falsehoods programmers believe about addresses (2013) by ssivark on Thursday October 29, 2020 @07:30AM (#24929351)
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:
Re:Falsehoods programmers believe about addresses (2013) by Arcorann on Thursday October 29, 2020 @08:38AM (#24929831)
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

Re:Falsehoods programmers believe about addresses (2013) by signal11 on Thursday October 29, 2020 @09:56PM (#24938303)
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.

Re:Falsehoods programmers believe about addresses (2013) by swaranga on Thursday October 29, 2020 @10:49PM (#24938620)
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.
Re:Falsehoods programmers believe about addresses (2013) by nicbou on Thursday October 29, 2020 @03:17AM (#24928063)
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

Re:Falsehoods programmers believe about addresses (2013) by dnpp123 on Thursday October 29, 2020 @03:54AM (#24928194)
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)

Re:Falsehoods programmers believe about addresses (2013) by Bost on Thursday October 29, 2020 @09:53AM (#24930477)
Error translating "Context" to Korean... timeout.
Re:Falsehoods programmers believe about addresses (2013) by paganel on Thursday October 29, 2020 @04:24AM (#24928346)
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).
Re:Falsehoods programmers believe about addresses (2013) by ygra on Thursday October 29, 2020 @05:21AM (#24928604)
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.

Re:Falsehoods programmers believe about addresses (2013) by Bost on Thursday October 29, 2020 @09:34AM (#24930278)
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 :)
Re:Falsehoods programmers believe about addresses (2013) by nicbou on Friday October 30, 2020 @03:07AM (#24939858)
Asia also starts in a different place, depending on who you ask. It can start anywhere between Istanbul and the Urals
Re:Falsehoods programmers believe about addresses (2013) by speeder on Thursday October 29, 2020 @08:53AM (#24929948)
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...

Re:Falsehoods programmers believe about addresses (2013) by Symbiote on Thursday October 29, 2020 @03:42AM (#24928144)
I think only the fifth is missing.
Re:Falsehoods programmers believe about addresses (2013) by jobigoud on Thursday October 29, 2020 @04:33AM (#24928398)
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.

Re:Falsehoods programmers believe about addresses (2013) by nicbou on Friday October 30, 2020 @03:09AM (#24939870)
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.

Re:Falsehoods programmers believe about addresses (2013) by moksly on Thursday October 29, 2020 @05:30AM (#24928657)
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.

Re:Falsehoods programmers believe about addresses (2013) by Symbiote on Thursday October 29, 2020 @06:27AM (#24928944)
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.

Re:Falsehoods programmers believe about addresses (2013) by moksly on Thursday October 29, 2020 @10:47AM (#24931031)
Well, the open API isn’t free as in beer.
Re:Falsehoods programmers believe about addresses (2013) by andrewshadura on Thursday October 29, 2020 @04:09AM (#24928264)
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.

Re:Falsehoods programmers believe about addresses (2013) by steerablesafe on Thursday October 29, 2020 @07:54AM (#24929526)
> 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.

Re:Falsehoods programmers believe about addresses (2013) by tannhaeuser on Thursday October 29, 2020 @07:12AM (#24929232)
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.
Re:Falsehoods programmers believe about addresses (2013) by chrisseaton on Thursday October 29, 2020 @07:59AM (#24929558)
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?
Re:Falsehoods programmers believe about addresses (2013) by SuperCuber on Thursday October 29, 2020 @09:32AM (#24930258)
The village or town..?
Re:Falsehoods programmers believe about addresses (2013) by Bost on Thursday October 29, 2020 @09:44AM (#24930374)
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 :)
Re:Falsehoods programmers believe about addresses (2013) by tomjakubowski on Thursday October 29, 2020 @01:24PM (#24932846)
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/
Re:Falsehoods programmers believe about addresses (2013) by chrisseaton on Thursday October 29, 2020 @09:37AM (#24930309)
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.
Re:Falsehoods programmers believe about addresses (2013) by merricksb on Thursday October 29, 2020 @04:28AM (#24928373)
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)

Re:Falsehoods programmers believe about addresses (2013) by Semiapies on Thursday October 29, 2020 @01:06PM (#24932657)
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.
Re:Falsehoods programmers believe about addresses (2013) by kevcampb on Thursday October 29, 2020 @08:18AM (#24929686)
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.

Re:Falsehoods programmers believe about addresses (2013) by jeroenhd on Thursday October 29, 2020 @08:37AM (#24929825)
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.

Re:Falsehoods programmers believe about addresses (2013) by kevcampb on Thursday October 29, 2020 @09:50AM (#24930441)
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.
Re:Falsehoods programmers believe about addresses (2013) by izgzhen on Thursday October 29, 2020 @03:43PM (#24934763)
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)

Re:Falsehoods programmers believe about addresses (2013) by hvdijk on Friday October 30, 2020 @05:07AM (#24940438)
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.

Re:Falsehoods programmers believe about addresses (2013) by Bost on Thursday October 29, 2020 @09:48AM (#24930423)
In "Bohemia" there's a village called "Bohemia" https://en.wikipedia.org/wiki/%C4%8Cechy
Re:Falsehoods programmers believe about addresses (2013) by ignoranceprior on Thursday October 29, 2020 @09:43AM (#24930363)
This is by the guy who did the XSS injection via company name a few days ago.
Re:Falsehoods programmers believe about addresses (2013) by jobigoud on Thursday October 29, 2020 @04:34AM (#24928405)
Is there any place where streets start counting at 0 or go negative?
Re:Falsehoods programmers believe about addresses (2013) by ignoranceprior on Thursday October 29, 2020 @10:25AM (#24930758)
Yes, and the article provides an example of both.