I’ve spent the better part of the last three years developing a navigation app at work. It includes features like
- Searching for a location
- Adding a location to favorites
- Turn by turn navigation to a destination
I had the seemingly simple task of splitting an address into two parts for displaying in the user interface (line 1 and line 2). The exact mechanism of the split didn’t matter as long as it could be reasonably split.
Here as some examples of how I presumed it could be split depending on the length of the address
- Line 1 = Place Name; Line 2 = address
- Line 1 = Place name, number, street; Line 2 = city, state
- Line 1 = Place name, number; Line 2 = street, city
- … and so on
Simple, right? Wrong.
Over the course, I’ve made several assumptions about addresses that turned out to be incorrect. This post attempts to list the things I learned about addresses.
This post is inspired by other “Falsehood programmers believe” posts (and hence uses a similar format). In fact, there’s a GitHub repo that lists all such posts. Other people before me have already made “Falsehoods about addresses” lists, but I’m making one based on my own experience.
So, let’s get right to the falsehoods. Every one of the statements below is false.
- Every location has a unique address. This is false: every location has a unique geocoordinate (lat-long), or other such identifier like Google Plus Codes or what3words, but it does not have a unique address.
- A location has an address
- The concept of an address is universal
- What constitutes an address is universal
- An address has a number
- An address identifies a single house/shop/office
- An address has a street name
- An address has a post code/zip code/pin code
- An address has a neighborhood/locality name
- An address has a place name
- An address is hierarchical (number, street, city, state, country)
User interface related:
- An address has sufficient info to make sense in a user interface
- An address, when shortened (ellipsized etc) to fit on a user interface, still gives enough context to the user
- An address fits on one screen on a mobile phone with a readable font size
- A street has a name
- A street name is unique in a city
- A street name is unique in a locality
- A road number (like highway number) is unique in a locality
- A road number uniquely identifies a road
- A neighborhood/locality name is unique in a city
- What constitutes a navigation instruction is universal
- A navigation instruction at a point is unambiguous
- Restrictions applied to navigation (like avoid highways, avoid tolls etc) are unambiguous
- Navigation directions are user-friendly (this one is an opinion, and not a fact)