
Falsehoods programmers believe about geography - yaph
http://wiesmann.codiferes.net/wordpress/?p=15187&lang=en
======
ryandrake
These "Falsehoods programmers believe about XYZ" sites are interesting and
all, but the practical take away always seems to be:

"In order to handle all of these clever edge cases, your
[Time|Date|Name|Address|Gender] handling code should be 2,000 lines long, not
2 lines long."

Which is not very helpful if you're just trying to get your product out. Sure,
you could take another week to make sure you handle that hamlet in Macedonia
whose name isn't a text string, but then again, why not just slap in "address"
"city" "state" and "zip" fields and get on with the rest of your actual
product? The naive solution covers pretty much all of the USA market. Hell,
call those last two "state/province" and "zip/postcode" and you've got most of
the world handled. Fix the edge cases in V2, if you even have to.

~~~
Marazan
I think you're getting the wrong take away from these articles.

The message is that the real world is messy so don't spend 2000 lines of code
trying to validate it to a strict (simplistic) model.

For example my bank's website couldn't deal with the fact that my street
address was (representative example) "5/3 Hawthorn Street" because the '/' was
an illegal character (as was -,: and a whole bunch of other separators I
tried) - but that's how it appears in the Post Office's database. Some
programmer has spent effort to implement the code to reject my legal (and
incredibly common) style of address. It would have been far less effort not to
have done that.

By contrast the DVLA website just gives you a free input text area, perfect.
Minimal effort for them, zero hassle for me.

~~~
evan_
Sounds like it's time to write "Falsehoods Programmers Believe about
Falsehoods".

------
SideburnsOfDoom
I would add to that more falsehoods:

1) Every place is in a country.

2) The precise location of country borders is globally agreed and does not
vary from country to country.

2) The list of countries is globally agreed and does not vary from country to
country.

~~~
jameshart
\- the list of countries doesn't change over time

\- when countries appear or disappear there's some sort of logical
predecessor/successor country

\- internet address suffixes correspond to a single country

\- a country has only one internet address suffix

\- you can tell what country someone is in by their IP address

\- people don't move from one country to another

\- well, at least companies don't move from one country to another

\- a country has a single language

\- a country has a single currency

\- a currency is used in a single country

\- the currency used in a country doesn't change over time

\- a country has a single legal system

\- a country has a single tax system

...

~~~
aestra
\- a country has a single language

Really? Do people _actually_ believe this?

Some "common" counties off the top of my head:

[http://en.wikipedia.org/wiki/Languages_of_Switzerland](http://en.wikipedia.org/wiki/Languages_of_Switzerland)
[http://en.wikipedia.org/wiki/Languages_of_Belgium](http://en.wikipedia.org/wiki/Languages_of_Belgium)
[http://en.wikipedia.org/wiki/Languages_of_Canada](http://en.wikipedia.org/wiki/Languages_of_Canada)

~~~
jameshart
Yes - that's one of the assumptions implicit in using flags to pick languages

Let me also add: the only languages spoken in a country are the official
languages of that country

------
fophillips
DB Error - cached version
[http://webcache.googleusercontent.com/search?strip=1&q=cache...](http://webcache.googleusercontent.com/search?strip=1&q=cache:d7LeIoy8OkwJ:wiesmann.codiferes.net/wordpress/%3Fp%3D15187+&cd=1&hl=en&ct=clnk&gl=uk)

~~~
edomaur
well, sorry about that, I am a bit AFK and cannot correct the situation until
I go home...

------
mcv
This list was clearly made by someone from Switzerland. Other countries have
plenty of other crazy examples.

Someone else already pointed out that the city that houses the Dutch
government has to different, equally valid names (and is also not the
capital).

Not only are there addresses that lack street names, there are also addresses
that lack house numbers or towns. It wouldn't surprise me if there are
addresses that lack a zip/postal code in a country that normally uses them.

Then there's reassigning addresses to other houses. The original building
stays, but gets a new address. I'm a victim of this: a nearby swimming pool
had my address until 15 years ago, but I still get a ton of their mail.
Clearly in those 15 years, a lot of their contacts never bothered to update
their address data. (Or maybe nobody expects a swimming pool to move.)

Edit: Beyond regular enclaves, there's of course also the crazy of Baarle-
Nassau and Baarle-Hertog. It's bits of Belgian enclaves in Netherland, some of
which in turn contain Dutch enclaves. The country you're in can change every
other house. It's possible all your neighbours live in a different country
than you. I'm not sure if it's possible a single house is in two different
countries at the same time. Maybe the front door in one country and the back
door in another? Exactly who gets to maintain the streets, I have no idea.

Links: [https://maps.google.com/maps?q=Baarle-
Nassau&hl=en&ll=51.442...](https://maps.google.com/maps?q=Baarle-
Nassau&hl=en&ll=51.44256,4.932003&spn=0.079177,0.227108&sll=51.445137,4.929523&sspn=0.158345,0.454216&hnear=Baarle-
Nassau,+North+Brabant,+The+Netherlands&t=m&z=13)

[http://en.wikipedia.org/wiki/Baarle-
Nassau](http://en.wikipedia.org/wiki/Baarle-Nassau)

~~~
memracom
There are buildings that are in both Canada and the USA. I'm not sure if there
are any houses like that but there might be. The two places that this happens
are near the Pacific coast, and the border between the province of Quebec and
several US states.

------
dhotson
Also, pretty subtle thing.. but places are constantly moving due to plate
tectonics and continental drift.

A GPS position describing a location will slowly go out of date over time.

[http://en.wikipedia.org/wiki/File:Global_plate_motion_2008-0...](http://en.wikipedia.org/wiki/File:Global_plate_motion_2008-04-17.jpg)

------
bhaak
The one about "buildings do not move" is hilarious. People hardly believe this
if you tell them about that. But this happens quite often now (although not
always by such a large distance). Sometimes it's cheaper to move a building
and being able to then use the free place for something's that is more
profitable (protection of historical monuments vs. money made).

But I don't know if such a moved building necessarily keeps its address.

~~~
draugadrotten
>The one about "buildings do not move" is hilarious.

In Sweden, the whole _city_ of Kiruna (complete with church, town hall,
schools, shops and a station) is moved two miles to the east.

[http://www.independent.co.uk/news/world/europe/and-you-
thoug...](http://www.independent.co.uk/news/world/europe/and-you-thought-
moving-house-was-stressful-huge-iron-ore-mines-underneath-kiruna-in-swedens-
far-north-have-caused-cracks--now-officials-are-relocating-the-whole-
city-8798772.html)

~~~
GotAnyMegadeth
A similar thing happened with the Capital of Egypt when the Nile changed
course [http://en.wikipedia.org/wiki/Pi-
Ramesses#History](http://en.wikipedia.org/wiki/Pi-Ramesses#History)

------
hackula1
A couple other oddities of geography I have noticed as a geospatial system
developer.

\- Outside the US and Europe things tend to get really wacky with geography
and geospatial data. Many GIS products are licensed per country for this very
reason.

\- In the US, zip codes are the most terrible type of geography to use for any
meaningful analysis, as they are constantly changing and do not actually have
defined borders. Zip codes are basically just labels that get appended to
street segments.

\- If you look in the back of the ~200 page pdf that comes with most digital
geographic data, you will find an appendix. 99% of the appendix is a section
typically called "disputed territories", and 99% of the disputed territories
are China claiming to own another nation. I never realized quite the extent of
the megalomania until I read a few of those.

------
yread
> Places have only one official name per language

Better example could perhaps be The Hague (Den Haag or 's- Gravenhage in
dutch). It also an example for the first and third one (dutch doesn't use 's
(or des) nor den anymore)

edit: oh and it's also the seat of the government but not the capital

~~~
hesselink
> Better example could perhaps be The Hague (Den Haag or 's- Gravenhage in
> dutch).

I don't think so, the official name is 's-Gravenhage, even though many people
and official organizations use Den Haag.

------
Sharlin
I'm surprised nobody has already mentioned this (or I just missed it):

\- A country means the same thing as a nation-state (for a counterexample, see
the UK)

An Americanism I've often encountered in postal address forms:

\- Every country has something equivalent to "states" and your "state" is a
mandatory part of an address

------
xumption
Falsehoods geographers believe about server setups -
[http://wiesmann.codiferes.net/wordpress/?p=15187&lang=en](http://wiesmann.codiferes.net/wordpress/?p=15187&lang=en)

------
rburhum
How about 0 meters in wgs84 lat lon (what you get from most GPS) is sea level
everywhere?

More info for those that asked:
[http://www.esri.com/news/arcuser/0703/geoid1of3.html](http://www.esri.com/news/arcuser/0703/geoid1of3.html)

------
andyzweb
"Falsehoods programmers believe" is the new "X considered harmful"

~~~
maw
Maybe, but not nearly as harmful as nearly all of those X considered harmful
articles were.

------
protomyth
I grew up in a house whose street address (before 911) was "House 313 behind
the School". UPS was happy with that address, but other delivery carriers had
some issues.

USPS didn't do home mail delivery, so the PO Box we kept was fine for them,
but a lot of folks insist on a "physical address" and didn't like "House 313
behind the School". 911 has changed this in rural communities by giving a
street address that means something to the police & fire, but means little to
the people living there.

------
DanWaterworth
Rather than documenting all of the incorrect assumptions programmers make by
topic, it might be easier to list the ones that they make that _are_ correct.

------
gulbrandr
_most french persons have no clue how to type the “ÿ” character_

Not true. ÿ is very simple to type on a french keyboard, it's like ë (eg
Noël), with a different letter.

[http://en.wikipedia.org/wiki/%C3%8B#French_and_Dutch](http://en.wikipedia.org/wiki/%C3%8B#French_and_Dutch)

------
aestra
Addresses map to physical locations that never change or rarely change.

counterexample - military mail (APO/FPO)

------
xradionut
A experienced developer know that any data/code concerning names, addresses
and locations is more complex and error prone than an apprentice realizes.

------
mikeash
Here's one I've run into a lot that I haven't seen mentioned yet:

\- Any location within a US state will also be within a county.

Virginia treats incorporated cities as county-level entities which are not
part of any county. It looks like Baltimore, MD is the only example of this
outside Virginia, and so it's not encountered often.

When people ask about county, giving the independent city is generally the
"correct" answer, but sometimes it leads to confusion. I remember having to
explain to a loan officer, who you'd think would be up on the details of the
states they operate in, that my "county" was in fact "Alexandria City" and
there wasn't any other sort of answer they could get.

Just recently, I recall checking out some project linked here on HN which
needed to know what county I lived in. I currently live in Fairfax County in a
zip code that also includes the City of Fairfax. After giving it my zip code,
it then gave me two choices for county: "Fairfax" and "Fairfax".

------
mikeash
I grew up in a tiny village in rural Virginia (maybe 50 houses in total) and
we had no address. Mail got delivered to a post office box that was
conveniently in the post office next door. For UPS deliveries, we would
literally give them the address, "Next to the post office, on the east side."

Every so often we'd get a delivery driver with a poor sense of direction, and
he'd give the package to the people on the other side of the post office
instead. Aside from that, it worked great.

~~~
tankenmate
My brother once sent a letter by post to a friend; from Yokohama, Japan to
suburban Sydney, Australia. He couldn't remember his friends address but he
remember the directions to walk from his friend's local post office; so that's
what he wrote as the address, the instructions to walk from the post office to
his friend's house. The letter was delivered just fine. In fact the story of
its delivery made the front page of a national newspaper (Column 8, Sydney
Morning Herald, national edition).

