News for hackers. Stuff that matters.
Re:Why Users Fill Out Forms Faster with Unified Text Fields by staktrace on Friday July 29, 2011 @10:25AM (#2821904)
You can preprocess and normalize the data before you put it in the database. City/state is probably one of the easiest fields to do this with.
Re:Why Users Fill Out Forms Faster with Unified Text Fields by stinky613 on Friday July 29, 2011 @02:33PM (#2823146)
I like the idea this article proposes, but I believe the author and our commenters glance over some backend difficulties. Yes, there are exactly 50 states each with precisely one two-letter abbreviation. How would you handle, say, "Boston, masachusetts" [sic]?
Re:Why Users Fill Out Forms Faster with Unified Text Fields by spc476 on Saturday July 30, 2011 @02:11AM (#2825049)
I mentioned a method above (http://news.ycombinator.com/item?id=2825015) and since entering it, I've thought a bit more about the issue. Most instances will have only two words. If it's three or more and the last word isn't two characters, then if the second to last is one of "north", "south", "west", "new", "washington" or "puerto", then the last two words form the state and the rest is the city. And you can ignore any punctuation.