Falsehoods programmers believe about addresses
21–30 of 150 posts
Re: Falsehoods programmers believe about addresses
#22Of course, they're falsehoods that everyone believes about addresses (except maybe for postal workers), but programmers are the only ones who have to actually think about them. It would be nice to come up with some sort of conclusion or recommendation. Should addresses just be used as one big blob of text, and never parsed at all? should there be individual per-country libraries for parsing them? should we just addre…
I think the consensus is to go with the "big blob of text" approach. You mentioned that postal workers are the only people qualified to parse addresses—let them do it. The validation done on your end shouldn't be much more than asserting that addresses contains non-whitespace characters. I don't know how well this works in practice, but it's the most "correct" thing to do.
As soon as you don't control the whole thing end-to-end, i.e. from the user entering the data to printing it on an envelope: it won't work at all. It would require every program in the whole chain to accept this "big blob", which is simply not going to happen.
Re: Falsehoods programmers believe about addresses
#23Also, since it brought up naval vessels, here's the addresses of all US Navy ships: http://www.navy.mil/navydata/ships/lists/ship-fpo.asp
Anyways, the post office does a wonderful job delivering mail considering how complex addresses can be and how people can have messy handwriting.
Also - You can have an address that doesn't map to a physical location that totally looks like it should (not just PO boxes). Consider RPIs address.
http://rpinfo.rpi.edu/locateRPI.html
"Correspondence to and from Rensselaer Polytechnic Institute uses the official address of 110 Eighth Street, Troy, NY 12180. This address serves as a mailing address only; you will not find a building with that number on 8th Street."
Re: Falsehoods programmers believe about addresses
#24This one's particularly common in Edinburgh. In fact in the example they use - "Regent Road" connects to Princes Street, which becomes Shandwick Place, then Atholl Place. At this point the main fork becomes Dalry Road which then becomes Gorgie Road which becomes Stenhouse Road and then Calder Road - all of which are roughly a straight line:
https://www.google.com/maps/dir/Calder+Road,+Edinburgh,+UK/S...
Re: Falsehoods programmers believe about addresses
#25When actually using all the addresses you stored for shipping stuff, it is almost guaranteed that the shipping company will cut off or drop lines from labels, and of course every shipping company is going to have its own quirks. Maybe just because not every address is going to fit onto a fixed label area in a fixed font size.
I have in fact lost several shipments to my address(es) due to every single kind of the above caveats.
Re: Falsehoods programmers believe about addresses
#26So I guess this is nothing more than a fantasy: http://www.xkcd.com/208/
Re: Falsehoods programmers believe about addresses
#27"A road will only have one name" This one's particularly common in Edinburgh. In fact in the example they use - "Regent Road" connects to Princes Street, which becomes Shandwick Place, then Atholl Place. At this point the main fork becomes Dalry Road which then becomes Gorgie Road which becomes Stenhouse Road and then Calder Road - all of which are roughly a straight line: https://www.google.com/maps/dir/Calder+Road,…
Re: Falsehoods programmers believe about addresses
#28When you're training developers remember that you're not training demigods.
Re: Falsehoods programmers believe about addresses
#29Re: Falsehoods programmers believe about addresses
#30Earlier quoted context omitted.
Did you need it for delivery of something? Was that made very clear to the user? I can't believe so many people, wanting to receive something through the post, would wilfully screw up their address - maybe there's more to your use-case than meets the eye?
It was a form for signing an agreement. If they don't fill in their full address then the contract may not be legally binding.
I would have done address line 1, address line 2, line3, etc. I think people got confused by your form because they are used to typing in 1234 Sample Street expecting to be asked the rest of the information further down. The other option would be on form submit to show what they have put in and say "make sure this is your full address [CONTINUE] [EDIT ADDRESS]."