Put the ZIP code first

61 points by diktomat


fanf

I think the “note for international visitors” banner at the top has been added since I looked at this last night (I wonder what it says to visitors from other countries). Without that caveat it was an embarrassingly parochial example of falsehoods programmers believe about addresses (previously, previously), eg I couldn’t even enter my postcode because it doesn’t fit in 5 digits. The author seems to have learned from the flames on the orange site that you can’t infer the country from the zip code, though they haven’t yet fixed the confident falsehood in the first paragraph…

rix0rrr

The author is making it out like the country can be derived from the ZIP code... but of course interpreting the ZIP code requires the country to begin with. In their live demo I started by typing my Dutch postal code. Surprise surprise, I wasn't able to type my entire postal code and the demo did nothing, least of all autoguess my country.

So half of their complaint about how selecting their country from a dropdown list would be unnecessary isn't actually true.

Of course, you could probably take the ZIP/Postal Code and filter down to the list of countries matching that postal code format, that would be a nice service to have... (and have a checkbox for countries without postal codes)

oats

Fun fact: Zip codes are derived from USPS infrastructure and logistics, not political boundaries, and so there are some strange edge cases. Namely, there are a handful of Zip codes which span US state boundaries. For example, 59221 has bits of both Montana and North Dakota for a post office on the Montana side, so all the addresses on the North Dakota side have Montana addresses despite their physical locations.

For instance: https://maps.app.goo.gl/1vewfhXegA6WkqZX8

Fun lesser-known facts that doesn't really have anything directly to do with the post: US Zip codes can have more granularity with 9 or 11 total digits. 11 digits unique digits identify every mailbox in the country (or "delivery point" to use USPS parlance). They're not really used outside of USPS systems or presorting companies, who offload work from USPS and put barcodes with the full 11 digits on mail pieces to get rate discounts.

I work in the postal & logistics industry (not for USPS directly) and have had quite a lot of fun learning about silly things like this at the intersection of geography and technology.