Blog brought to you by the creators of Dr. Lunch

Saturday, February 04, 2006

Progress

Can I tell you how much I love progress?

4 or 5 or 6 years ago when I started this whole thing up, I had an issue. A ton of the functionality on the site is location dependent (finding new restaurants, finding groups to lunch with, etc.), which basically means if someone creates a group with a bogus zip code, it really hoses things up somethin' powerful. So my solution was to shell out $29.95 to these guys, in exchange for a nice list off all the active zip codes in the US, complete with latitude and longitude, and if anybody tries to enter a zip that's not in my list, WHAMMO, it's error message time.

Well, that's all well and good, but the US postal service rests for no man, and, as it turns out, new zip codes pop up every day. Now, I thought about all sorts of solutions at the time, most seriously screen scraping this site, since they're nice enough to have a remarkably predictable GET-based URL structure that's easy to fake out. But screen scraping is so 18th century, and, on top of that, I was pretty sure that it would be morally wrong. Anyway, I set up Dr. Lunch to send us an alert whenever someone tried to use a zip we didn't recognize, so we would find out about it and fix it, like, 3 hours too late.

Well, you know, time passes, and, as it passes, it brings progress. This week, progress reveals itself in the form of a bitchin' REST "web service" from yahoo. ("Web service" is in quotes here 'cause this whole "REST" thing makes it all little too easy. Web services should be painful.) Anyway, as of about 11 AM this morning, if you enter a zip code that's not in our original list, Dr. Lunch runs out and asks Mr. Yahoo. And if Mr. Yahoo says, "I've heard of that," well the Doctor just slams that data right into our database and you, the user, never even know what happened. It's, like, seamless, man. And, in one fell swoop, one of the more irritating shortcomings of the site is resolved.

God, I love progress.

0 Comments:

Post a Comment

<< Home