

Dear American Website Owner - jwr
http://jan.rychter.com/enblog/2010/3/31/dear-american-website-owner.html

======
Vivtek
Dear German Website Owner

(yeah, this works both ways)

I _do_ have a state in my postal address, and if I have to enter my address as
47374 Richmond instead of Richmond IN 47374, it will probably go to Virginia
first, and maybe they'll get it to me eventually.

Just saying. Internationalism is hard. If you want to go for the global
market, it would behoove you to try to do it right.

~~~
jwr
Absolutely — which is I would recommend providing multi-line edit boxes for
addresses.

That way you can enter your address any way you see fit. _You_ really know
best how to address mail so that it gets to you, why would I want to pretend I
know better?

~~~
ubernostrum
So you have a strong AI doing natural-language parsing to figure out from that
freeform address whether you need to charge sales tax/VAT?

If you're doing business across state/province or national borders, getting
that structured address data (and getting it right) can be awfully important.

~~~
pavel_lishin
Seems like the easiest solution would be for web developers to show the
address in their country's format, if their customer is from their country,
and to show a textarea box for anyone else.

------
handelaar
Dear everybody else:

Some of us don't even have postal codes. Those profane-looking ones we enter
aren't real.

Love, Ireland.

~~~
eagleal
At least you don't even have them. We (Albanians) have them, but neither the
govt neither the professionals know about them!

------
Timmy_C
I think this blog post REALLY overlooks the fact that interface localization
isn't easy; even with a simple web forms.

The interface for a search engine is a single input field with dynamic
suggestions and people were in an uproar when Bing didn't give suggestions
that were localized to the user's country or language. That's to say, if one
of the biggest software companies in the world can't get it right, then what
hope does the average web developer have?

~~~
jwr
If I wanted to write a blog post which elaborated on all possible
internationalization issues, it would become a PhD dissertation and take a
year to write.

And then it wouldn't even touch on all the issues.

You have to start somewhere — and let's face it, dealing with the two silly
problems I mentioned would get us 80% of the way there.

~~~
tghw
I gave it a shot of my own. I didn't do all the permutations, and surely left
out big swaths that I've never even thought of, but it's a start...

<http://hicks-wright.net/blog/stupid-american-website-owners/>

~~~
jasonlotito
I wrote about Credit Card forms a while back as well.

[http://www.jasonlotito.com/programming/what-i-know-about-
des...](http://www.jasonlotito.com/programming/what-i-know-about-designing-
credit-card-forms/)

Anyways, you mention in your post:

"Making something a simple form that is fully internationalized and has useful
validation is no where near as easy as they would like us to believe."

It's not easy, but it's not as time consuming and as difficult as you think it
is. Getting the phone numbers right doesn't take years. A week is all you need
from design to testing, and you are done.

Postal Codes are easy as well, considering their are numerous services that
allow you to verify the Postal Code to the address. However, even taking
something as simple as the common case, a user from the US entering a 6 digit
code has probably made an error, and that solves a common problem.

House numbers and other addresses never presented a significant problem. I've
seen more problems with not accepting different encodings then with the actual
input.

And why is this important, even if you just want to serve an American
audience? Because not every American lives in the US. Consider just the Armed
Services, stationed all over the world.

No.

If you don't want to do it, that's fine. But don't complain that it's too much
work or not worth it.

~~~
tghw
Of course I exaggerate in the post, you're right that it'll probably take just
a week to get coded up. (Which means three weeks, the way development often
goes.)

The question is whether or not that time is well spent, or if I would be
better off using that time to improve whatever product/service the form is
attached to. Especially when you're on a lean (i.e. startup) budget, the
decision becomes pretty clear.

~~~
jasonlotito
You are throwing a lot of ifs.

If you are providing a service that needs to be programmed. If you are short
on funds. If you are only focusing on the US.

The problem isn't that. The problem is this:

When you are providing a service that relies on processing international
orders... When you are no longer a startup and earning money... When you want
to accept orders from the international community...

If you don't want to support the international market, don't. But if you do,
do it right. I've seen it happen: "Launching in Canada!" and they still have a
restriction of 5 characters for their Zip Code, or require all numbers.

It's silly. That's what the article is referring to. Wanting to accept
international customers but doing it poorly. You'd be better off not offering
the service and doing it right then offering it up poorly.

------
cstross
Oh, it gets worse fast.

I hate street address validators that insist you live in a house or apartment
with a number on a given street.

Because?

I live in flat _m_ at street number _n_ on Foo Street.

Here in Scotland -- where I live -- there are three ways to put this on an
envelope, all recognized by the post office:

Flat _m_ , _n_ Foo Street

 _m_ / _n_ Foo Street (this is the one in the Post Office postcode lookup
database)

Flat _x_ F _y_ _n_ Foo Street (where _y_ is floor number and _x_ is apartment
number on that floor, e.g. 3F2, 12 High Street)

... So why do so many Javascript address validators throw out _m_ / _n_ or _x_
F _y_ format addresses for having an illegal character in the middle?
Including British ones, _that back onto the official Post Office lookup
database_?

Address formats aren't standardized internationally. They aren't even
standardized _within_ countries with a unified postal service.

------
njharman
I've argued many times for making address one big text field. Let people who
live in the country, who own the address, format it how they __know __it
should be formatted.

~~~
Deestan
Me too! I've been arguing this for years, and I have yet for someone to reply
with a good reason why it shouldn't be handled this way.

Bad reasons given:

\- Safeguard against users who can't be relied on to format their own address
properly. Fix 1: Don't worry about that. Fix 2: If you _really_ want this,
leave the rest of us an _option_ to use a freeform address instead.

\- "Out webshop database has these fields." Fix: Change the database, then.

~~~
kpanghmc
There are several legitimate reasons for requiring users to enter in their
address in separate fields. The two main ones are:

1\. If you need to integrate with third party systems who require you to break
up the address. In case you've never tried, parsing addresses is very hard --
if not impossible -- depending on how many formats you need to support. All it
takes is one third party library that requires you to break them up to make
your life miserable.

2\. If you need to categorize your users by country, state, zip, etc. For
example, if you need to handle different tax laws for different states or if
you need to generate reports on how many users you have from country XYZ.

~~~
Goosey
Are there any promising open source libraries to fill this niche? Or startups
offering it as a service API?

Honestly this seems like a problem that could be solved once and we all would
benefit... And like any good problem, there is probably a profit to be made
from it.

~~~
pyre
It seems like it would make it that much easier if it were a text box and a
country selection (rather than just a text area, so you can reliably know the
country). Since most countries that I'm familiar with have a limited number of
ways of representing an address. The larger variation seems to be between
address formats of different countries.

------
apinstein
Not sure how many people have tried to actually make international address
forms, but it's really difficult. Despite a lot of searching, I have yet to
find any web site or book or library that can handle all international
addresses properly while still letting you validate that the data is
reasonable (city/state/postal code) etc.

It's not that American-run web sites don't want to support international
formats, but when 95% of your business is from America, it just doesn't make
business sense to deal with the complexity of international addresses for 5%
of your revenues.

I'd _love_ it if someone can point me to a library/book/tutorial of the
appropriate way to handle this situation. NOTE: I haven't looked that
recently, but did about a year ago.

------
febeling
Once you start to look at the problem, it becomes really hard. It is not only
address and phone number formats. The name alone a very hard. American style
is given name and family name I guess, and as a German that sounds very
convincing. But then you suddenly stumble across a middle initial, whereas in
Germany parents give their kids any number of additional forenames, from zero
to five or so, not just one for the middle. Then countries like Spain and
Iceland traditionally don't have a family name, but surnames derived from the
father or the mother, or just the surname from both in a certain order. You
have potentially two family-level names then (and potentially the same name
twice!). So the person complaining in the blog post probably doesn't know what
it means to get these things right, even if you only consider highly developed
countries. Even if you only want the name.

Maybe someone should start a library for this problem, and then we all lay
back and watch it grow to 50,000 LOC.

------
Major_Grooves
It can happen within countries too. Most UK websites will require you to enter
a "county". That's fine in England, because England is divided in to lots of
counties (e.g. Essex, Hertfordshire, Oxfordshire etc.). However, Scotland does
not have counties any more. They were abolished before I was even born and
replaced with regions. It might sound nit-picking, but it's one of these
things that adds to the chip on our shoulder that suggests folk in Engerland
don't really care what is going on in the rest of the UK (I don't know how
Wales and N.I. are organised).

~~~
spatulon
FWIW, not all parts of England are in counties either, so don't feel like
you're being singled out. York isn't in Yorkshire, for example. It is its own
unitary authority. Even Amazon demands a county, so I put North Yorkshire.
Close enough.

The Royal Mail are happy for old curmudgeons and the like to use traditional
counties in addresses, if they wish:
<http://www.abcounties.co.uk/bpa/bpacontents.htm>

All that Royal Mail cares about is your house number and postcode, so you
could probably even get away with telling websites that you live in Wibbleton
in Foobarshire.

~~~
petercooper
_York isn't in Yorkshire, for example. It is its own unitary authority. Even
Amazon demands a county, so I put North Yorkshire. Close enough._

It's not just "close enough" - it's entirely correct. York is in the
"ceremonial" or "geographical" county of North Yorkshire. And addresses are
geographical references, after all:
<http://en.wikipedia.org/wiki/Ceremonial_counties_of_England> (though,
technically, you should probably just go with whatever the Royal Mail
determines is valid)

~~~
andyking
Correct. They messed around with the local authorities where I live last year
- I was in Cheshire and I'm now in something called "Cheshire East". My
neighbours are in "Cheshire West and Chester".

The address "52 High Street, Northwich, Cheshire West and Chester" would
reflect the correct local authority name but is incredibly confusing - are we
in Northwich or Chester? "Cheshire" is still correct.

------
lutorm
What's the point of having a state field at all? Isn't there a unique mapping
between zip code and state?

About the phone numbers, my favorite annoyance is when companies, who _always_
are fond of making stupid mnemonics out of the letters corresponding to their
phone number, don't let me enter _my_ mnemonic for my phone number, which I
picked from Google Voice specifically because it makes my name, but insists on
numbers.

~~~
dionidium
_What's the point of having a state field at all? Isn't there a unique mapping
between zip code and state?_

No. Zip codes may cross state lines.

~~~
joshfinnie
I am not sure that is completely true. I thought ZIP codes could not cross
state lines (at least in the US). And after looking at them, I couldn't find
any that were not unique.[<http://www.aggdata.com/free/zip-code>]

Edit: Sorry, There are a few that cross state lines, when using the first two
digits as the state code. However, each ZIP code is unique to a town;
therefore, one could use it in the above scenario.

~~~
freiheit
"Each ZIP code is unique to a town"? No, not really. Small towns without their
own post office typically share a ZIP code with the closest city because
that's where the post office that delivers their mail is.

~~~
joshfinnie
I guess my point is, the ZIP code should be a pretty good indication of the
state that the person resides in. No, it is not perfect, but I think it lends
itself to be somethng that can help with the OPs concerns.

------
awolf
I wish author was a little more constructive here. What phone number pattern
would he recommend we use?

~~~
snitko
Why use any pattern? Let me enter the phone number in a way I got used to it
and deal with it.

~~~
raganwald
There's a cost/benefit analysis to be done. People do make mistakes, and
checking their submission against common patterns will save you lost sales.

As suggested in a comment on a rant I wrote a few years ago, one strategy is
to 'validate' against something reasonable, but instead of rejecting anything
that fails, ask the user to confirm that they really do want something
unexpected.

I'm not sure that 'reasonable' would be for an international phone number, but
whatever you pick based on the country they choose, let them override your
validation.

~~~
jacoblyles
Well, I suppose you could just validate numbers from the most common countries
you see and hope the rest don't make mistakes. Call it the Amdahl's law of
internationalization.

------
pixelbath
We've been told for years that database normalization is good. Removing data
redundancy is good. This is one reason forms are broken into so many separate
fields as discretely as possible.

That said, once a company decides to do business outside their country of
origin, some serious rethinking of customer-facing forms (and fields, if
applicable) is in order.

------
jwr
I should probably clarify something, given how heated the discussion is
becoming.

I could have written the same thing as a nerdy techie article, pointing out
flaws in input validation. Do you think this would have gotten my point
across? How many people would have read that article? Would it have made it to
Hacker News?

Look: this is not a rant about Americans. It just so happens that US has
developed most of the internet as we know it and it just so happens that most
of e-commerce happens there. I'm sure any number of websites in other
countries are guilty of similar sins, but you have to start somewhere.

The point is, we should start thinking more carefully about how we validate
forms and store user data in that "global economy" everyone is bragging about.

~~~
rohsh
I think on some level this is a rant about Americans, even if you didn't
intend it to be one. My Indian and German friends are aware of the fact that
not every country has states, even though their countries do. I would bet
money on the same being true for Brazilians and Australians. I would bet money
on Japanese people being aware of the fact that not every country is
partitioned into prefectures.

Maybe this is because Indians, Germans etc. are not socialized to see their
way of running a nation as the only way, at least not in the way Americans
are. Maybe not. In any case it's a nice demonstration of how collective
cultural ignorance leads to annoyed visitors and, one might presume, lost
sales.

~~~
compay
Brazilian websites are just as bad, if not worse than American ones about
this, probably because websites that do online sales in Brazil tend to cater
to a primarily domestic clientele. If you happen to live in Argentina, as I
do, entering your address when you buy things in Brazil can be comically
frustrating.

Americans definitely don't have a monopoly on ignorance when it comes to other
countries' address formats.

------
shadowsun7
YES YES YES YES YES! I've always wondered about this. I once submitted a form
saying that I wanted something delivered to New York, Singapore. Was very
lucky that it even got delivered, much less sent to the right address.

------
rglullis
I thought we already knew this whole web2.0 thingie is more than rounded
corners. It's the "web services and integration" that's interesting.

There is more than one service offering a geocoding API. Use any of them to do
the hard work for you.

Your form should have one single field, named "Address". Let the user type
whatever s/he wants. Get this input and pass it along to Google Maps, or Yahoo
Maps, or WhateverMaps. Your geocoding service will return things in a way that
is obviously more parseable.

------
nkassis
I've had that issue with a Department of Education website, I moved to Canada
for a second degree recently and I was unable to set my address with them to
here because of the state field not resetting when I select Canada.

I agree with this article, if you set a country other than USA, the state
field should go away or better, don't preselect the US and add the field
later.

------
petercooper
_all of which required me to provide a "State" name (I don't have one)_

As the author is in Poland, I'd argue that voivodeships are equivalent, in
terms of being the highest level subdivision of the country. As a Brit, I'd
tend to go with the county instead.

~~~
Vivtek
How about Puerto Rico (in those cases where Puerto Rico is listed as a country
instead of a state-like entity, which is how the US Postal Service treats it)?
Hungary? Japan? Germany? Anywhere else that doesn't use a state in the postal
address?

Edit on second thought: how about the vast majority of forms of this nature,
which have a helpful dropdown list of the fifty valid states, and sometimes DC
for the District of Columbia, but almost never PR for Puerto Rico, let alone
Guam, the Virgin Islands, and the other areas of the world that the US Postal
Service (and law) considers part of the United States?

I lived in Puerto Rico for years, and this is an utterly rampant problem for
millions of actual American citizens living in the United States, let alone
the rest of the world, all due to the fact that most Americans don't know jack
about the world they inhabit.

~~~
petercooper
_How about Puerto Rico (in those cases where Puerto Rico is listed as a
country instead of a state-like entity, which is how the US Postal Service
treats it)? Hungary? Japan? Germany? Anywhere else that doesn't use a state in
the postal address?_

"State" is really just equivalent to "second-level subdivision" (a bit like
how "ZIP code" can mean "postal code" in general, as long as the box allows
freeform input). Most countries don't call their second-level subdivisions
"states" but counties, municipalities, council areas, and the like. Puerto
Rico has municipalities and Japan has prefectures, for instance.

 _the other areas of the world that the US Postal Service (and law) considers
part of the United States?_

The places you mention are all unincorporated organized territories, meaning
they are not considered to be "part of the United States proper." The word
"proper" is somewhat important in this distinction, of course, and the USPS's
definitions do nothing to help clear the waters on this one.. :-)

~~~
Vivtek
They do if you want to receive mail. Puerto Rican municipalities have nothing
whatsoever to do with mailing addresses (and in fact the situation is worse,
since many PR addresses include an "urbanization").

Moreover, Indiana has counties that correspond to Puerto Rican municipalities.
Drawing this sort of specious parallel is entertaining, to be sure, but
doesn't help people place orders.

~~~
petercooper
_Drawing this sort of specious parallel is entertaining, to be sure, but
doesn't help people place orders._

It does if the order form requires this information. A little extraneous
information on the postage label isn't going to cause significant delays for
your mail as long as the underlying details are right (street address and ZIP
code for most of the US - everything else is filler). Mail delivery systems
are designed to deal with this (hence the introduction of the ZIP code in the
first place) because people don't always address their mail to technical
specifications.

------
cmelbye
In what way are "American Website Owners" responsible for this problem? I've
seen it plenty of times going in the other direction. Such a typical European
way of thinking...

------
Tycho
And fix those drop-down menus for country where I have to scroll
allllll....the.....waaaaay....dowwwwwwn to reach United Kingdom!

~~~
Timmy_C
If it's an HTML <select> element then you can click it to give it focus then
start typing the name of option you wish to select.

~~~
mooism2
But it would be easier for the customer if the website guessed from the
customer's IP address which country they were in, and put it at the top of the
list (as well as in its normal position).

~~~
joshd
My favourite are the dropdowns that place "popular" countries at the top. This
means that if I scroll through the list then my country may or may not be
where I expect it based on how the developer was feeling that day.

------
lkjhgvbnm
while we are on the topic can we lose the dropdown list of 196 countries you
got from the ISO table?

Seriously, how many products have you shipped to Afghanistan or Albania but
you make everyone scroll past these to get to the only country you actually
deliver to (+ Canada if you're lucky)

------
biafra
Also annoying are email address parsers that don't accept .name Domains.

------
edw519
Dear Non-American Website User:

You do not live in the United States of America. You think all American
website owners are the same. And then you decide it might just be a good idea
to lump the 95.4% who know what they're doing with those who don't. But you
know, most American website owners are no more alike that most American
<anything>.

The moment you whine about the few to the many in a blog, two things do
happen:

\- you irritate the people who know what they're doing

\- you don't reach the people you should

If you don't like something about an American website, tell _them_ , not the
rest of us. That way, you're more likely to actually accomplish something.
Which is, after all, the American way.

~~~
Vivtek
Do you respond to other general advice to Website operators in the same way,
or just to foreigners telling Americans what to do?

~~~
Semiapies
An interesting point about tone.

If this had been pitched as "sites do international addresses wrong" as
opposed to "Americans do it wrong!", there'd probably be less defensiveness,
less snideness, less "typical American can't read", etc.

~~~
Vivtek
Look, _I'm_ an American, and having lived elsewhere, I've been bitten many a
time by this kind of thoughtless antipattern. And when I am, I don't think,
"Oh my, this Web designer of uncertain origin didn't study his field," I
curse, moan, and wail, "Stupid bleeping Americans have failed again to
understand the complexity of their world!"

I don't know where you're from, obviously, but having grown up in Indiana, I'm
all too aware of the oblivious American nature, and I find the original post
entirely justified in its tone. As far as I'm concerned, the defensiveness
here is good ol' American exceptionalism at work, and anybody who wants to
have global business had better get _over_ that.

I second or third the notion that a nice library would be a Good Thing.

~~~
Semiapies
_"I'm all too aware of the oblivious American nature"_

Correct, but it's only somewhat less parochial to assume that one's own
country is _uniquely_ oblivious to the rest of the world than to _be_
oblivious to the rest of the world. After all, you were the first person in
the thread to start pointing out how sites from other countries around the
world fail in their own ways.

The simple truth is that without being whapped in the face by alternate
standards for things like address formats, _people_ assume everyone else does
things their way. That a Pole runs into this much more quickly than an
American is a natural consequence of living in a smaller and less populous
country with many nearby neighbors.

 _"As far as I'm concerned, the defensiveness here is good ol' American
exceptionalism at work"_

Please! I've dealt with too many people from other countries to buy that. When
"outsiders" start criticizing people who identify with any nationality _based
on_ their nationality, those people usually react with defensiveness and
hostility. Part of dealing with people from other countries is learning how
not to provoke such reactions.

------
Daniel_Newby
If you have a free-form field, how often to people screw up their own address
or phone number?

And if you alienate them, does your support cost go up or down?

------
mhb
Is this the place to complain about other car drivers too?

------
cwbrandsma
Actually, as a web site owner, for a number of my sites, they are
INTENTIONALLY USA only. Sorry that you happened to stumble across them, but I
either do not care about your business, don't want to deal with the hassle
(international shipped, phone, regulations, etc), or legally cannot serve your
area.

~~~
tosiabunio
Acually, as typical American, you are unable to read and understand such short
text. It is directed to those website owners who do want to deal with the
hassle you don't care about.

"The moment you put a "country" field in your form, two things should happen:"
- that sentence should give you a clue.

~~~
Semiapies
_"Acually, as typical American"_

It helps, when mocking a people, to convey such mockery through proper use of
their language. ;)

More seriously, there's no need to douche up the conversation by throwing
around slurs against nationalities.

EDIT: Apparently people disagree on that need. Ah, well.

------
snitko
It used to annoy me too. When I saw those forms, I usually assumed a website
owner didn't want to talk to me anyway. But then I realized that's okay. US
generally don't care for the rest of the world and I believe they have the
right and the privilege to do so. So it's either I move to US or stop
complaining. And US companies that, say, want my money - they usually have the
right kind of forms already.

~~~
acg
I disagree there's there's nothing wrong with wanting to raise web standards.
More people should complain, we'd have a better web. Some sites still don't
have encryption when entering credit card numbers.

~~~
cujo
Sure, but the design of a web form is hardly a standard.

~~~
nailer
I think being international is a standard of sorts. Eg:

\- handling international times (say, Feb 1 2007 rather than 01/02/07 or
02/01/07)

\- allowing people to enter their normal phone numbers and addresses

\- knowing that United Kingdom is preferred for addressing and Great Britain
is not.

~~~
sigzero
I want to see the library and code that handles all of those possibilities.

~~~
nailer
Ask a website nicely - 95% of them handle this fine. Or write it yourself.

------
TomOfTTB
Dear Foreigner,

Okay it’s probably time to come clean. In reality the problem you highlight is
all a secret plot to frustrate you and hence make you less effective and
unable to compete with us in the global economy. We were all told to do so
through coded messages that are embedded into episodes of American Idol (I bet
you thought all that stuff Paula Abdul said was just drunken babbling)

It’s all part of a far reaching plot by our government to subvert the rest of
the world. Hence Google pulling out of China and the creation of Microsoft
Windows (we secretly use a highly stable open solution and just use a keyboard
shortcut to make it look like Windows when you walk into the room much like
that fake looking spreadsheet that was embedded into the DOS version of
Tetris)

Sorry for the inconvenience (though not really as pointed out above),

America

~~~
cglee
How does this reply add value? The blog post presents a problem that I (being
an American) rarely even think about. I wanted to see how others deal with
this issue. WTF is this reply doing?

~~~
Semiapies
This is what your downvote button is for.

~~~
cglee
I did downvote, but at the time, the parent post had over 15 points and I
wanted to know why.

