4 ms·
Not only that, but they're only called ZIP codes in the US (this is a peeve of mine). In Switzerland they're "post codes" ("code postal" in French, don't know t
by a-priori 17y ago
Not only that, but they're only called ZIP codes in the US (this is a peeve of mine). In Switzerland they're "post codes" ("code postal" in French, don't know the Swiss German name). They also write addresses in a different order. As an example, here's the address of a Kebap shop I used to frequent:
Avenue de la Sallaz 29
1010 Lausanne
Suisse
1010 is the post code, identifying La Sallaz (or a part of it?), in Lausanne. My point? All this stuff is very local and if you want to do it right you should just ask for addresses free-form and if you need to extract information from it then you should use a geocoding library (e.g. http://geocoder.rubyforge.org/ http://geocoder.rubyforge.org/) to normalize it for you.
- lsb 17y agoAmericans back in the 50s used to do it almost the same, but flipped: for example, the old way to write the address (w/ zip code) for City Hall in Manhattan NYC 260 Broadway New York 17 New York but then the 17, originally a numbering system for big cities, became 100-07, the postcode 10007. (Compare the postcodes around London, EC1/N1/SW1/etc, which were originally just for sorting mail around the central city of England.)
- enf 17y agoOh interesting. I had assumed that the transition to zip codes always added digits at the start (like San Francisco, which prepended 941 to the old codes) and didn't know there were places that inserted new digits in the middle instead.
- lsb 17y agoOof, my bad. It was New York 7, no insertion of digits, same as SF.
- pavlov 17y agoMy pet peeve is the field labelled "State or province" which can't be left empty. This is surprisingly common. Most countries on Earth are not federations; dozens of nations are small enough that dividing into "provinces" would be meaningless; and even larger countries that do have regions may not include their names in mailing addresses.
- deleted 17y ago[deleted]
- jrockway 17y agoClearly the country is "European Union" and the state is "France".
- pilif 17y ago(the german term is "Postleitzahl", usually abbreviated as PLZ) Considering this and all the other issues related to addresses, I really wonder why we are still trying to store them in separated fields. Why can't the address just be one big multiline text field where the user types whatever would be needed to receive a postal letter? If we need the data in structured form, we could always write a locale-aware parser that extracts the needed information. Splitting the address in multiple fields (sometimes even labelled address_line_1, address_line_2 and so on) is probably a relic from the times where databases had nothing but CHAR (with a maximum length of 100 or something) and where applications were created for the local market only. I would need to do some a/b testing, but I really doubt that it'll be easier for a user to fill out the traditional Street 1: _______________ Street 2: _______________ ZIP: _____ City: _____________ form instead of just one big text field labelled "Postal Address" - personally, I'd probably be WAY faster filling out that one.
- Semiapies 17y agoWe really should go one-big-text box. I've tried to do it as often as clients will let me get away with it. A recent client demanded the address be broken out into fields, but I at least swayed them into accepting a big-text-box for "international" addresses after showing them a few examples.