RailsConf 2006

I attended RailsConf in Chicago about 10 days ago. It was a great way to find out what was happening in arguably the most vibrant part of the web development community. I met a lot of people over those three days and would always ask them: "So, are you doing rails by day, by night, or both?". Most of the answers were "by night", with a few "just starting by day", and one "both". From my unstatistical sample, it seems like rails clearly had people's mindshare but getting it into their "workshare" is a different story.

A quick search on google or technorati will turn up a lot of info on the conference. Here are some of my favorite moments (in no particular order):

  • Martin Fowler's keynote: he spoke for over an hour about ruby, rails, frameworks & their (dis)advantages, etc. All pretty much ad lib. I have a number of his books and it was great hearing him speak live. Very interesting.
  • Why the lucky stiff's concert / monologue / animations extraordinaire. A glance at his site will tell you that all is not as it should be in Why's brain, which made his concert that much more fun.
  • Mike Clark's intro to Capistrano. This is the utility I really want to play with.
  • Justin Gehtland's overview of Ajax and RJS with Rails, and esp. the sneak peak at the new version of scaffolding he and his colleagues are working on called Streamlined.
  • One of the pleasures of attending a conference is discovering great new speakers. Out of the railsconf crew, my pick goes to Matt Biddulph. Matt's presentation was not only engaging, enlightening, and full of cool annecdotes but also focused on a BBC-related project. Having grown up in London, the beeb is still near and dear to my heart. I've found lots of interesting topics on Matt's blog, such as this great example of putting the Wikipedia and Yahoo APIs to use. Cheers Matt!
  • DHH's keynote started off with me thinking "CRUD? Why is he talking to us about CRUD?" and ended with the thoughts "Wow! This is a cool way of looking at things, must try it out!".
  • Last but not least, hooking up with a long lost friend and, as it turns out, rails and OSX fan Steve Chanin.

Next year's conference is in Portland and will be co-organized by O'Reilly. They're clearly pursuing rails as strong alpha (and dare I say beta?) geek territory. Lots of fun in store!

IRB Anywhere

IRB, short for Interactive RuBy, is a very useful ruby shell. Just run "irb" and you'll end up in a interactive ruby session. This comes in very handy for running various snippets of code to make sure they do what you intend. But what if you want to run IRB in the middle of a running program, so you can interact with it?

Turns out this is very simple:

#irbtest.rb

require 'irb'

some_var = 1
SOME_CONST = "hello"
puts "before irb"

IRB.start

puts "after irb"
puts some_var
puts SOME_CONST

The Smallest Proxy?

I needed an http proxy for another project (more on that later) and thought it would be fun to write one in ruby. How simple can it be? With a few compromises, it can be very short indeed:

I'm cheating in a couple places. I'm only handling GET requests, and I'm using Hiroshi Nakamura's excellent http-access2 package.

On the other hand, it's multi-threaded and it handles redirects, a must for the web.

SQL Server Adapter Fixed (sort of)

Many thanks to Ryan Tomayko for fixing the MS SQL adapter bug I posted a little while back.

Things aren't all roses, as Ryan states:

Quick Note: the SQL parsing regexp stuff in this adapter is bound to fail in many edge cases. This patch improves the accuracy of the regexen in many places but the basic parsing logic is flawed and could probably use a complete overhaul that accounted for things like habtm and eager loading issues from the beginning.

But it's still cool to see the process working and bugs getting fixed Cheers Ryan!

Reasons to Love Ruby

Bruce Tate's article on alternatives to Java mentions many of the aspects of ruby that I'm growing to love.

It wouldn't make sense to repeat them all here, others have stated ruby's strengths far better than I.

However, I would recommend giving ruby a shot. I gave this language a cursory look a couple years ago, after seeing a /. posting. At the time I thought "Hmmm... it just looks like a slightly better scripting language".

In some ways I feel I was right, ruby offers evolutionary improvements over other languages. But in many ways I was wrong, because the sum of all its improvements make ruby stand out compared to its peers.

What I like the most about ruby is its intuitiveness. Whenever I learn a new programming language, I always feel that I'm stumbling around at first, stringing together keywords thinking "I bet this won't work" because I haven't internalized the language's ideosyncrasies yet.

Well, in ruby I'm finding to my surprise that my bets are wrong, things do work the way I think they should. A language that intuitively makes sense is worth cherishing.

Here are some resources to get people started: