Hacker News new | past | comments | ask | show | jobs | submit login

Bad mistake you get a metric fuck ton of shit in your data that way.

You should always police your input data properly one big text field is lazy programming that leads to a big technical debt later on.

And yes that does mean handling apostrophes and all those other edge cases properly.




Name of recipient, state/province/etc., postal code and country, maybe. But for the rest, that bit (at least in the UK) that goes in the middle... what policing can you do? That part is just a text blob. You can't do much meaningful with it except for showing it to somebody (e.g., on a label affixed to the package you're sending) and have them figure it out.


Well sure, once you've separated name and country and postal code you've already pulled out most of the data.

The blob has been tamed to 1-2 lines, and you're probably best off giving 'line 1' 'line 2' 'line 3' fields. At this point the chance of confusion is minimal, even if you can't validate very well.


make sure its valid text - make sure you handle all the high asci characters and do something sensible with non Latin text.

I once spent the best part of a day tracking down a problem with a single bad address for a major UK directory some how some one had entered an address in Egypt in Arabic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: