Good Stuff

spacer Scout is our Rails monitoring solution.

spacer

spacer GeoKit provides Rails geocoding and distance finders.

spacer My book is available now from Apress:

spacer WiFi cafes: community- driven site. Top cities: San Francisco WiFi; Portland WiFi; Charlotte WiFi

spacer GZoom is a Google Maps drag-to-zoom custom control. Open source.

Recent Feedback

  • codesnik on Rails on Ruby 1.9.1 in production: just do it
  • MaryA on A Sous Vide Cooking Experiment
  • jay greasley on Building a simple Sinatra/ DataMapper/ HAML/ SASS + Passenger app
  • Jay Greasley on Building a simple Sinatra/ DataMapper/ HAML/ SASS + Passenger app
  • Schneider on Building a simple Sinatra/ DataMapper/ HAML/ SASS + Passenger app
  • Jack on In-memory and in-database distance calculations
  • Minh Phan on GZoom enhancements
  • Chris on Rails on Ruby 1.9.1 in production: just do it

A Sous Vide Cooking Experiment

Oct 5, 2010 by Andre in Cooking »
spacer 1/0 trackback(s)

I love a juicy, tender steak. After reading a few articles about the mouth-watering possibilities of sous vide cooking, I had to try it myself.

What's Sous Vide?

Take your steaks (or your fish or your veggies) and vacuum-seal 'em. Put them in a low-temperature bath for longer than you expect. That's sous vide. It's not poaching, because water never touches the food. Meat cooks completely in its own juices, and it physically cannot overcook, because the water temperature is exactly the temperature you want the meat to be.

High-end restaurants use expensive heaters and cirulators to make this work. The most affordable home sous vide setup is $450 from Sur La Table. Here's the deal though: it's just hot water. You can do this at home.

Season the steaks

A perfect, succulent, medium-rare steak is 130°. You guarantee perfect medium-rareness by keeping the water at exactly that temperature.

spacer

I went with some new york strips from Whole Foods, and seasoned them simply with fresh ground pepper and sea salt on both sides.

Bag 'em up

Professional sous vide gear uses sealed, vacuum-packed plastic cooking baggies. It turns out that ziplock bags work just as well. The temperature we are cooking at is (apparently) well beneath that at which the ziplocks will leach into your food.

spacer

Here's the trick to getting as much air out as possible: immerse the bags into a bowl of cold water. The water pushes all the air out. Just zip the bag and you're set -- cheapo vacuum-pack.

spacer

I also threw some thyme into the bags for a little seasoning flair.

Into the hot water

My initial plan was to heat the water separately to a few degrees above target, and let the cooking happen in a cooler. The idea is that the insulated cooler contains the heat sufficiently for an hour or two — long enough for your steaks to cook.

spacer spacer

As ingenious as this hack sounds, it didn't work for me. My cooler was losing water temperature too quickly. No problem; I transferred it to the stovetop in the dutch oven over the lowest possible flame, and monitored it for temperature:

spacer

Total cooking time: about two hours. The time depends most on the thickness of your steak. Refer to this excellent article for cooking times.

Out of the hot water, into the frying pan

You can't have a great steak without a nice crust. That crust doesn't happen underwater. Heat up a thick-bottomed pan very hot with some olive oil. As the oil begins to smoke, transfer the steaks to the pan for 30-60 seconds on each side. The caramelization adds essential flavor and makes the steak look like a steak. Warning: this step will smoke up your kitchen.

The verdict

spacer spacer

The steaks were delicious. The texture and flavor were amazing. The tenderness of these steaks easily surpassed that of much pricier fillets I've cooked using traditional methods.

So the steaks were a win. The process, not so much. One of the big advantages of sous-vide is unattended cooking: drop the food into its cozy hot bath and walk away for a few hours. It doesn't matter if stays in there an extra hour because (remember) it can't overcook.

The home-brew setup doesn't provide that key benefit of unattended cooking. I had to watch the temperature and adjust the burner over the two-hour cooking time. That's fine for an experimental session, but it's not viable for day-to-day use.

The next step

Here are two low-budget alternatives that still provide totally unattended cooking:

  1. This completely awesome do-it-yourself setup. Can be constructed for ~$80.
  2. A $140 thermometer probe / controller for use with a rice cooker. I'll probably go this route — It will take up minimal space and allow the rice cooker to do double-duty.

Sous Vide links

  • How to cook a steak Sous Vide at Serious Eats.
  • Lengthly technical Info, including temperature matrices for various kinds of food.
  • The cooking in a cooler thread that started this whole endeavor.
  • A good Hacker News thread on cooking Sous Vide.

Rails on Ruby 1.9.1 in production: just do it

Jan 10, 2010 by Andre in Ruby »
spacer 2/0 trackback(s)

spacer

Two of my side projects, shapewiki and hotspotr are now running in production on Ruby 1.9.1. There are some good resources out there for getting familiar with Ruby 1.9. I wanted to share a few tips/observations on the upgrade process.

Gem/plugin compatibility: not really an issue on the two projects I deployed. Obviously, your experience will be a case-by-case depending on the gems/plugins you use. My takeaway was that the apprehension of dealing with this was far worse than actually dealing with it. The worst case was having to seek out a newer version (acts_as_versioned) or swapping in an alternative (nokogiri). Some of the gems/plugins I dealt with were:

  • authlogic: ok
  • geokit: ok
  • acts_as_versioned: ok, I had a pretty old version and updated it to: github.com/technoweenie/acts_as_versioned/tree/master
  • hpricot: seemed ok until I ran into run-time issues, had to switch to nokogiri. Which turned out to be very easy, essentially no code changes. Note: I did this part six months ago, and haven't checked hpricot since, so it may be fine now.
  • haml: ok
  • mislav-will_paginate: ok

Local development environment: there's just one thing you need to know: RVM. RVM makes it incredibly easy to install 1.9 and switch back and forth frictionlessly. And if you're concerned about messing up your working-just-right current system, don't be: you can revert back to your original setup in one command, or remove all traces of RVM whenever you want to. But trust me, you won't want to. RVM is awesome. Install it now so you can start doing the right thing.

Character encoding issues: this is what kept me off of 1.9 for quite a while. I initially got a few applications running on 1.9 six months ago, but ran into problems in production with extended characters from existing production data. Here are the fixes that finally got me up and running: gist.github.com/273741. Just drop this into your Rails app as confit/initializers/ruby_191_hacks.rb and you should be good as long as your database content is stored as UTF-8.

Ruby 1.9.1 in production: I took the shortcut of just using RVM to install Ruby 1.9 in production as well. A dedicated installation probably makes sense in the future, but the RVM installation works fine for now.

I feel strongly that building & maintaining momentum on Ruby 1.9 is important for the Ruby and Rails communities. The important thing to know is that it's not hard. RVM makes it very easy to dip your toes. Gem and plugin compatibility is very good at this point, and getting better all the time. So go ahead, install RVM and start the process. Once you've upgraded your app or got a new gem working on 1.9, put up a quick post or tweet on it. Every bit helps us move forward as a community!

RubyMine + Snow Leopard

Oct 26, 2009 by Andre in Ruby »
spacer 1/0 trackback(s)

UPDATE: this issue turned out to be part of a larger issue with a failing logic board on my macbook pro. RubyMine continues to be an awesome IDE for Rails development.

RubyMine is a pretty sweet IDE. I've been using it for a few versions now, including the current 2.0 beta.

However, I hit snag when I upgraded my Mac to Snow Leopard this weekend -- RubyMine was showing gibberish for any file I opened. Apparently, RubyMine is trying to use a font which doesn't exist on my upgraded Snow Leopard system. A quick fix is to go into RubyMine's preferences->fonts:

spacer

And change it to another monospaced font of your choosing. Hope this helps someone who encounters the same issue.

Business lessons learned

Oct 7, 2009 by Andre in Entrepreneurial » , Scout »
spacer 0/0 trackback(s)

Scout, our server monitoring service, has grown quite a bit in 2009.

We've documented two big lessons learned on the Scout blog. The main points:

  • You will underestimate the ongoing cost of complexity in your product
  • Cool new capabilities don't sell themselves

Give it a read! We will have more hard-earned business lessons coming, so stay tuned.

Load Averages, Explained

Aug 3, 2009 by Andre in Scout » , system »
spacer 0/0 trackback(s)

Just did a writeup on Understanding CPU Load Averages over on the Scout Blog ... it uses a traffic analogy to illustrate what load averages numbers depending upon how many cores/processors you have.

If you like the post, feel free to upvote on hacker news!

git remote branch

Jun 3, 2009 by Andre in Ruby »
spacer 0/0 trackback(s)

Charles Quinn sent me this link, and I immediately installed it: git_remote_branch. It provides nice shortcuts for dealing with remote branches. Examples:

$ grb create branch_name [origin_server]

Create a new local branch as well as a corresponding remote branch based on the branch you currently have checked out. Track the new remote branch. Checkout the new branch.

$ grb publish branch_name [origin_server]

Publish an existing local branch to the remote server. Set up the local branch to track the new remote branch.

And an additional nice touch: grb "prints all commands it runs on your behalf in red, so you eventually learn them." Nice! The link again: git_remote_branch.

Rails script/runner + logging + cron + production

May 26, 2009 by Andre in system »
spacer 1/0 trackback(s)

A quick tip: you're using script/runner in production (likely invoked via cron for a periodic background task), you probably are not seeing logging output in your production.log. Why? In production mode, the Rails logger doesn't auto-flush. As far as I can tell, the logging output is simply lost.

An easy solution that worked for me: adding a Rails.logger.flush to my script/runner call in cron.

Before:

*/1 * * * * deploy PATH_TO_APP/script/runner -e production 'MyClass.do_it'

After:

*/1 * * * * deploy PATH_TO_APP/script/runner -e production 'MyClass.do_it; Rails.logger.flush'

Bonus tip: to capture any other output from the cron task, use this:

*/1 * * * * deploy PATH_TO_APP/script/runner -e production 'MyClass.do_it; Rails.logger.flush' >> PATH_TO_APP/log/my.log 2>&1

Happy logging!

Contributing on Github? Don't forget the tests!

May 22, 2009 by Andre in GeoKit » , Open source »
spacer 0/0 trackback(s)

I just wrote up some tips for contributing patches to Geokit. Pretty applicable to any open source project. If I had to condense it to just one word, that word would definitely be tests :-)

Also some specifics on running tests for the gem and the plugin there.

Stay in Touch

spacer
spacer
Recommend me at WWR -->

Blog Archives

  • October 2010 (1)
  • January 2010 (1)
  • October 2009 (2)
  • August 2009 (1)
  • June 2009 (1)
  • May 2009 (4)
  • April 2009 (1)
  • February 2009 (3)
  • December 2008 (2)
  • August 2008 (1)
  • May 2008 (3)
  • April 2008 (1)
  • March 2008 (1)
  • February 2008 (2)
  • January 2008 (2)
  • December 2007 (2)
  • November 2007 (4)
  • October 2007 (1)
  • September 2007 (4)
  • July 2007 (1)
  • June 2007 (3)
  • May 2007 (9)
  • April 2007 (1)
  • March 2007 (3)
  • February 2007 (7)
  • January 2007 (5)
  • December 2006 (3)
  • November 2006 (4)
  • October 2006 (4)
  • September 2006 (4)
  • August 2006 (4)
  • July 2006 (6)
  • June 2006 (2)
  • May 2006 (3)
  • April 2006 (9)
  • March 2006 (11)
  • February 2006 (17)
  • January 2006 (16)
  • December 2005 (7)
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.