Stories

A great way to stay current with your craft is o attend (or even speak at) local and regional conferences. And, if you're having trouble finding one, check out RubyThere.com, where you can find a listing of Ruby events and calls for proposals.

Ola Bini published an article this weekend discussing a safer way to monkey patch. Using included modules, rather than directly modifying code or redefining a class, you can use some Ruby built-in methods to track and maintain your local modifications.

Kristian Mandrup recently released a new geolocation gem, called GeoMagic. It uses the freegeoip.net service for looking, it doesn't use SQL for distance calculations, and it's not bound to ActiveRecord. It also comes with a full test suite, written in RSpec 2.

Now that RSpec 2 is out, it's easier than ever to create your own, custom matchers. If you'd like to see just how easy it is, Piotr Solnica put together a walkthrough of a simple example to get you started building your own.

On Saturday, Sanitize version 2.0.0 was released. Sanitize is a whitelist-based HTML filtering library and this release marks a major internal refactoring. It is highly customizable and is compatible with Ruby 1.8.7 and 1.9.2.

Maurício Linhares put together a pretty detailed, step-by-step walkthrough on how to setup Sunspot and Solr in a Rails 3 application. He starts at the beginning and explains the integration from configuration, to the model, to the controller and finally to the view. If you've been wary of playing with Solr, this is a great way to get your feet wet.

Phil Whelan put together an article describing Linux's zero-copy kernel feature and how you can use it to speed up some parts of a Ruby application. This won't work on OS X or Windows, but it's a good technology to know about if your servers are running Linux.

Simon Harris wrote in to let us know about his Hamster project. It adds immutable Hash, Set, List, Stack, Queue, and Vector objects to Ruby which makes those objects thread-safe and sharable. If you're working in a concurrent environment, this may be worth a peek.