Hacker News new | ask | show | jobs
by potatolicious 3252 days ago
Data validation - you want to make sure your users are entering addresses correctly, and catch errors early (say, at checkout) rather than result in a negative experience (say, a missed delivery or returned package).

You may also want to make sure your customers have entered their full address, rather than a short form that cannot be used (see: "123 Fake St", without any markers for city, county, country, etc) - and doing so necessarily requires some structured understanding of addresses... which comes with all the pitfalls of assumptions.

There are also uses for addresses that aren't necessarily about delivering a physical item to said address - for example determining the correct taxes to charge a customer based on zip code (some zip codes do not map to a physical area, therefore are not useful for determining taxation).

There are lots of perfectly understandable reasons why programmers would assume the format of an address.