[0] https://club.ministryoftesting.com/t/what-are-fun-postcodes-...
Most of my street is a single post code. Once upon a time it was a street of single family dwellings, so that's maybe a 3-4 dozen homes, but this is a city suburb so densification means some of those homes were modified and cut up to form flats, one large family home becomes six smaller homes - and some were purchased, knocked down and replaced by buildings which don't look out of place but aren't what they were before. I live in a purpose built four storey block, but it's designed to look superficially like a big house, the bottom floor is below street level (it faces out over the hill), the top has only loft-style windows at the front like somebody did a loft conversion.
It's all still one postcode though, so I share a code with maybe 100+ households. Recoding is disruptive and it's not really worth it, so they mostly don't do it.
Remember for actually delivering the post the postcode is just a convenient human readable part of an address, the machines (with occasional human help) turn any arbitrary address into a unique destination code, and then that's literally barcoded (albeit not in a code you're used to from like UPC etc.) onto the post. So for the Royal Mail the postcodes not being as descriptive as they were fifty years ago isn't a big problem.
Take some mail you've received, preferably over several days and study the outsides carefully. Two fluorescent orange bar codes have been jet printed onto the mail during sorting. The upper code is "just" a temporary unique ID, every piece of mail in the sorting system is issued a code, when they run out they start over, this helps with debugging and statistics. The lower case is in some sense the successor to the postcode, it'll be identical for every item delivered to the same address and distinct for other addresses. In fact it's encoding the "Delivery Point" which is what PAF handles, the location to which the Royal Mail employee delivers mail. https://en.wikipedia.org/wiki/RM4SCC
The use of these "real" postcodes also enables the Royal Mail to more readily accede to impractical "vanity" postcode requests. If the rich people in this part of Dirt Town think they ought to have postcodes from the adjacent and posh sounding Upper Niceton, RM can allow that, because in reality their teams are working from the purely numeric code which will still treat all these new "Upper Niceton" homes as being where they actually are, in Dirt Town.
I'm sure there is a "falsehoods programmers believe about addresses" somewhere.
But apparently that would make data analysis to complicated.
The address field names are fairly standardized[0] and Google has an open dataset (used by Chrome and Android) describing which countries need which fields[1].
I have an older PHP library[2] and a newer Go library[3] that build upon this, while crowdsourcing fixes (since Google hasn't updated their dataset in a while). The Go library allows me to serve all address formats and state lists in a single HTTP request, which can then power a very fast JS widget.
[0] Initially by the OASIS eXtensible Address Language (xAL) which trickled down into everything from maps to HTML5 autocomplete.
[1] https://chromium-i18n.appspot.com/ssl-address
Foo House
Townland
Large town somewhat nearby where the mail comes through but only tangentially near the actual house
County Bar
Where Townland is optional.There's a bank address in my town: PTSB Kennedy Road Navan Co Meath
Kennedy Road is about 2 blocks long with ~ 30 shop fronts, and there are numbers on all but one of them.
Not really optional in most cases if you're not actually in the "large town somewhat nearby". I would say the large town part is more optional.
You're not going to get post delivered to "Lakeview, Cavan, Co Cavan", but you should be ok with "Lakeview, Killeshandra, Co Cavan".
In Meath, there's a House address near Garlow Cross where it's Foo House, Johnstown, Co Meath, but Johnstown is 7km away or so.
For those who have not been near there -- It's karst topography with basket of eggs hills where the water table is above ground in many of the valleys.