Being inspired by Falsehoods Programmers Believe About Names, I wrote down this list of falsehoods programmers belive about locations and addresses.
- Information from the Google Maps API is always correct and up to date.
- At least there is a single, correct location database that I can use.
- Every location has an English name.
- Locations with weird foreign characters in them always have a simplified/anglified spelling of their name.
- Every location can be written using letters found in ASCII or the ISO encoding that I use.
- Every location can be written using Unicode encoded characters.
- Addresses are formatted or structured in the same way.
- At least addresses have the same format within the same country.
- Drivers, official maps and the post office use the same street names and addresses for the same location.
- Every address indicates a name, street address, postal code, state or region and city.
- Every street address has a house number.
- Every building has only a single address.
- Addresses always have a structure.
- Every location has an address.
- But surely every address indicates a location that can be found on a map.
- No?
- Postal codes are always called "Zip Codes" in English.
- Postal codes are always 5 numerical digits.
- Postal codes are always numerical.
- Then at least postal codes should be validated somehow.
- Well, then I can strip out spaces and dashes from them.
- Postal codes always indicate the nearest city/town/village.
- Postal codes never change.
- I can assume things unrelated to mail sorting, such as real-estate value from a postal code.
- Postal codes don't cross administrative boundaries such as county, state or region.
- Postal codes are also area codes.
- Every location in every country has an associated postal code.
- Every country uses postal codes and I can depend on that!
- Postal codes are not personally identifiable information.
- At least there aren't multiple postal codes per building, right?
- Right?
- Everyone agrees about which country a city or town belongs to.
- Well, then buildings don't cross country borders.
- Every city or town has a single, canonical name.
- People never use administrative divisions that officially don't exist anymore.
- Localities such as cities have official names that everyone agrees on.
- Everyone agrees what a county, municipality, hamlet, village, town or city actually are.
- Also, those never merge or change or cross each other's hierarchical bounaries.
- Street and place names are uniqe.
- Street and place names never change.
- At least street and place names are unique within the same municipality, town or city.
- Then the combination of city or postal code and place name are always unique.
- Businesses don't have more than one branch in the same street.
- Buildings and venues never move places.
- At least they don't move on a day-by-day basis.
- I can always depend on popular APIs such as Google Maps or HERE Maps for routing.
- An external API is better at routing than a human driver.
- One-way streets, traffic islands that block right-hand turns and dead ends are edge cases and I don't need to account for them.
- Drivers are happy and accepting about their route being planned by an automated system, with an estimated time for each stop because it saves them time and effort.
- Every delivery route can be planned and estimated by a computer.
- Navigation routes don't change.
- Well, but not within the same day, right?
Alda Vigdís // aldavigdis.is