Live data from Hacker News

Put the zip code first

zipcodefirst.com

201–210 of 330 posts

Re: Put the zip code first

#201

Earlier quoted context omitted.

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…

But addresses aren’t just for sending mail. Location also determines which municipal and state laws apply, so there are contexts where the distinction matters.

This is accurate. For a scenario with a possibility of litigation you must ultimately geocode the address with google maps API or census geocoder, point in polygon against district boundaries (geopandas or shapely), then pass the result through a rules table keyed on jurisdiction + case type.

Re: Put the zip code first

#202

> 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…

So it's another "Falsehoods developers believe..."

Re: Put the zip code first

#203

Earlier quoted context omitted.

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…

But addresses aren’t just for sending mail. Location also determines which municipal and state laws apply, so there are contexts where the distinction matters.

I would just like to point out that the city field doesn’t necessarily prove anything because many unincorporated areas have a listed a city but may not be subject to the laws or taxes of a municipality. So having the correct city isn’t as useful as one thinks it is.

Re: Put the zip code first

#204
I live in 10115. No, not New York. It's Berlin, Germany.

I used to live in M6C1B5. By forcing "numeric" on the zip code field, you'd immediately loose all Canadians.

This article is so US centric it's not even funny.

Re: Put the zip code first

#205
As others have pointed out this is just US-centric, and doesn't work for most countries. The best option I can see is to have an autocomplete, and allow manual addresses with a country-specific form based on a country selection (or detection).

Re: Put the zip code first

#206
Maybe first start with using non subhuman units like meter and celsius, then learn that there are other countries than 'The United States of America' and then fix that with the zip codes. ;P

p.s.: Don't takt this too serious, have just a dark kind of humor.

Re: Put the zip code first

#207

It’s easy enough to say “put the zip first because that will tell you city, state and country in one input”. What happens to customers not in the United States? They have no zip to enter. Or if they have a postal code of some stripe, it has a different format. What about folks who are in Turkmenistan, that you’re grumpy about having to scroll past? How are they signing up?

This already works on most shop systems in Germany. The OP just have to learn that zip codes aren't international. You can't know everything. Why this automation isn't implemented when you select USA as country...I don't know, but when you select Germany it works.

Re: Put the zip code first

#208
post #115

Falsehoods US programmers believe about addresses: there are no other countries than the US of A, and if there are, they don’t really matter. This person bought a whole domain for something that doesn’t work for 90% of the world, claiming it does, never even testing their assumption. Great job!

He just doesn't understood that every country has his own zip codes. He just comes from the land of the free invention of units of measurement ;)

Re: Put the zip code first

#210
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.

Yeah city is not fully a function of zip. ~I think state is though.~* I believe when multiple cities share a zip code USPS uses the larger one. Usually the wrong city will get delivered though, probably not guaranteed. * correcting myself, some zip codes do cross state lines

Can't say anything about the US, but in Germany when more than one cities have the same zip code it's just not important because there is only one sorting center for all cities with the same zip and they just sort per street address.
Post reply on HN