Relaunching lunchomizer.com

I spent a bunch of time the last couple of days sprucing up a few of my personal projects. Today was mostly spent on the lunchomizer, which gives you random suggestions for lunch, based on your location. It still only works for Midtown Manhattan since the locations all come from Midtown Lunch and that’s also the neighborhood where I happen to work. The biggest change today was fixing the HTML5 location support and a much better mobile experience via a separate Rails layout tailored for small screens. All in all, it was pretty easy, but one thing that surprised me was a noticeable lack of a de facto standard library for doing mobile, or really any, browser detection. I ended up using a gem called Nomadic and that worked well with the following controller code: ...

February 13, 2011 · 1 min · chetan

Distributing JARs for Map/Reduce jobs via HDFS

Hadoop has a built-in feature for easily distributing JARs to your worker nodes via HDFS but, unfortunately, it’s broken. There’s a couple of tickets open with a patch again 0.18 and 0.21 (trunk) but for some reason they still haven’t been committed yet. We’re currently running 0.20 so the patch does me no good anyway. So here’s my simple solution: I essentially copied the technique used by ToolRunner when you pass a “libjars” argument on the command line. You simply pass the function the HDFS paths to the JAR files you want included and it’ll take care of the rest. ...

December 30, 2010 · 1 min · chetan