Live data from Hacker News

Put the zip code first

zipcodefirst.com

181–190 of 330 posts

Re: Put the zip code first

#181

> From those 5 characters you can determine the city, the state, and the country False. Many zip codes include more than one city, and some even cross multiple states. And you can't always tell the difference between codes from different countries. Now you're not just instantly filling the rest of the form, you're implementing fancy multi-country filtering logic, editable drop downs, etc. Given the obvious incompeten…

USPS doesn't care; each ZIP code has a single preferred city name and a list of acceptable alternate city names to account for cases in which a ZIP code spans multiple cities. However, USPS's address validation will prefer to use the preferred city name for the ZIP regardless of whether the recipient actually lives within the boundaries of that city. That's because USPS has opted to organize addressing entirely aroun…

> Technically speaking ZIP codes are not "supposed" to span states but, in exceptional cases, some do. In this case USPS handles it the same way: the state of the preferred city is the preferred state for the ZIP code.

I've heard this before but it raises a million questions for me and I don't understand how this doesn't cause massive systematic problems and headaches in practice. Are residents even usually well-aware what city they live in, versus what's on their postal address? I sure as heck have always assumed whatever my mailing address says is the city I live in; I can't imagine a ton of people questioning it.

Doesn't this mean a ton of citizens would be registering for the wrong state's elections? Do the election officials always catch these? What about businesses - don't they constantly pay taxes incorrectly if the address is written incorrectly? What about laws (say privacy, wiretapping/call recording, etc.) where people make assumptions based on the city and state - what if they're wrong because the written city isn't the actual city? Who's criminally liable then?? Does every business have to perform a jurisdiction lookup to make sure an address isn't misleading?

Re: Put the zip code first

#182
post #32
post #2

I definitely agree in principle. But - without doxxing myself - I input my zip and the city is not correct. It’s a very close neighboring suburb (where the boundaries are definitely blurry) but it’s not the city on all the legal documents for my current house.

Legal address doesn't matter for mail, and all of this stuff is about mail/shipping. This includes billing addresses. I would have assumed that you knew that. I know people whose ZIP code belongs to a neighboring town (because mail works that way) and it basically becomes their de-facto address.

The legal address can absolutely matter for shipping when there are legal requirements in regards to the thing you’re shipping.

Re: Put the zip code first

#183
Address entries are the weirdest places of frustration. Business clients want Google Places to make address input easier. This user wants a single ZIP code entry to begin the process. Why is adding one’s own address manually that huge of a hurdle that we have to separate the user from the inputs? If there is one person in the world who should know my address, it’s me: why then put such an effort into building a site that takes away my ability to enter my address?

Re: Put the zip code first

#184
post #123

It should be at least "Put country first, then ask for zip code". 08036 Barcelona, Barcelona, Spain 08036 Hainesport, New Jersey, USA It does make some sense to go from most general (country) to more specific (address) instead of the opposite, so the form can implement better auto completions. However in practice postal addresses are not that clean so simple dumb forms are usually better, because it's easy for except…

Or rather “country first and then postal code”. Zip code is a postal code but only one postal code is a zip code.

Re: Put the zip code first

#185
In a similar tone, it’s 2026. Why are we still messing with form ordering instead of leaning into autofill? So somehow it makes more sense to change every single address form in existence to a non standard order because…why exactly? There’s a whole world outside of the United States with many formats for postal codes. It’s more efficient to just use autofill…

Re: Put the zip code first

#186

Earlier quoted context omitted.

> A city can also exist in multiple zip codes. And there can be multiple cities with the same name in the same state. These are reasons you cannot deduce the Zip from the city, not the opposite. A ZIP+4 actually encodes all other information for a US address.

A ZIP+4 does not encode all information. Proof: a post office has its own zip code, for PO Boxes. The +4 is the last four digits of the post office box. If the Post Office has more than 10,000 boxes, the +4 will be duplicated.

Yeah, anyone who has had to work with USPS bar codes should know that internally these are called routing codes, and they come in 5, 9 and even 11 digit variants. The 11-digit one narrows down to a specific delivery point, but even that isn’t enough to derive an address (just enough to know whether you’re looking at the right one or not). Zip+4 codes also change frequently because they aren’t based on locations but on delivery routes and sequencing.

Re: Put the zip code first

#187
post #7

Earlier quoted context omitted.

Obviously put country first, then whatever the equivalent of a ZIP code is second. In the UK, a post code gets you down to around 15-16 delivery addresses on average. No-one there really _ever_ needs to type an address.

Most British websites work like this website suggests, in that they ask for the postcode first, then give you a dropdown of all the addresses at that postcode. It works great, except my address is for some reason not in whatever databases these websites use. The building number is on the list, but not the individual flats. So I have to put in the postcode, choose something like "My address is not listed", then fill i…

It sounds like your address isn't listed correctly in the UK Postcode Address File (PAF).[0] There's a form you can fill in requesting a correction.[1]

[0] https://en.wikipedia.org/wiki/Postcode_Address_File [1] https://www.royalmail.com/personal/receiving-mail/update-you...

Re: Put the zip code first

#188
post #69

Earlier quoted context omitted.

This 1000 times. I’ve tried implementing what OP has mentioned, and quickly learned it isn’t possible. A city can also exist in multiple zip codes. And there can be multiple cities with the same name in the same state. So, to be safe, you have to enter city, state, and zip.

The postcode doesn't tell the whole story. But what you can do is use an IP geolocation service which should narrow down your location enough, so that typing in the entire address is no longer necessary. I.e. using something like https://ipinfo.io/json and then typing in a full postcode and street name + number should work well in most cases.

IP geolocation is increasingly not useful for anything, especially for mobile users. The best it can do is give you the correct country and maybe get you in the right region.

Re: Put the zip code first

#189
Most sites I use auto-fill city, state and zip once I type the street address, which is the 1 piece of my address that can’t be guessed from any of the others. So I’d say that’s probably the optimal path for most people, at least in the US. I’m sure people from other countries scoff at the US address suggestion and go straight for the country box from the beginning.

Re: Put the zip code first

#190
post #69

Earlier quoted context omitted.

This 1000 times. I’ve tried implementing what OP has mentioned, and quickly learned it isn’t possible. A city can also exist in multiple zip codes. And there can be multiple cities with the same name in the same state. So, to be safe, you have to enter city, state, and zip.

The postcode doesn't tell the whole story. But what you can do is use an IP geolocation service which should narrow down your location enough, so that typing in the entire address is no longer necessary. I.e. using something like https://ipinfo.io/json and then typing in a full postcode and street name + number should work well in most cases.

What if I order something on the road and want it delivered to my home? Or what if I want to order something over mobile? My mobile IP is often 1500km away from where I live.

Autofill solves all of that with an implementation cost that approaches zero.

Post reply on HN