There was a power failure in the middle of the night that reset my alarm clock. Consequently, I missed the first two sessions of the day.
I finally made it downstairs just in time to catch Stuart Halloway’s talk titled MetaRails, which was about the metaprogramming features of Ruby and how they are used in Rails. Metaprogramming is a special interest of mine, so I was particularly interested to see how Stuart would present this topic.
I wasn’t disappointed. This was one of the clearest introductions to Ruby’s metaprogramming features that I have seen. The best part was seeing the practical application of these techniques in the section he titled “How’d they do that?” Here he showed how Rails does things like automatically create object attributes from database columns, and how variables created in the controller magically become available in the view templates.
Ruby makes all of this possible because the Ruby runtime system is completely introspectable and modifiable. This ability is lacking in almost every other programming language, save Smalltalk. This fact led Stuart to say one of my favorite quotes from the conference: “The notion that you’d never want production systems to be introspectable has to be one of the worst premature optimizations of all time!”
Next up, James Duncan Davidson talked about Deploying Ruby Applications. He explicitly called out one of Rails’ dirty little secrets: while Rails will get you started and help keep you going at lightning speed, production deployment can be a bitch.
Duncan went through a number of deployment tricks and deployment debugging techniques, and then he covered a number of things to watch out for. Of most interest to me was that he advocated abandoning the current deployment protocols (primarily FastCGI) in favor for proxying directly through HTTP.
Until recently this wasn’t feasible since the only HTTP server capable of serving a Rails app, WEBrick, is way to slow for production use. But Duncan highlighted the fact that Ruby’s new Mongrel web server changes all that. Mongrel is a wicked fast, native Ruby web server that can directly serve a Rails app (kudos to Zed Shaw for creating Mongrel).
Finally, I have to mention one little off-hand comment that Duncan made. He said that Ant was a hack that he wrote one day on an airplane, and that he still gets emailed questions about it daily, even though he hasn’t used Ant himself for three years.
The last thing on the conference schedule was a Q&A session with the core Rails team. I have to admit that I barely have any notes on this part, mostly because there wasn’t much asked or said that was new.
There were two things that I noted. First, the part of Rails that they are the most unhappy with are fixtures (about half of the core Rails team said they don’t even use them). And second, DHH reiterated what JDD said about Mongrel, saying that we have ignored the deployment problem for too long and that he is very excited about Mongrel.
All during this Q&A, I had been sitting in the very back (I usually sit up front) talking with Zed Shaw and Daniel Berger about the One-Click Ruby Installer, Mongrel, and Dan’s Win32 extensions (plotting our collaboration strategy). When it was over I wanted to say hi to Sam Stephenson (author of Prototype and Rails core team member), so as the conference ended I fought my way up to the front against the flowing tide of exiting attendees, but by the time I made it up front he was gone. So, if you’re reading this Sam… “hi”!