snakes and rubies
I managed to attend
Snakes
and Rubies yesterday where Adrian Holovaty and David Heinemeier
Hansson talked about their respective web frameworks:
Django and
Rails.
The event started at 2PM and went to 6:30PM or so, and was attended by over 100 people! I watched this little event take shape out of the mists of the local python and ruby mailing lists and was just amazed to see how vibrant the Chicago software development scene is, or has become in the 3 years Iâve lived in the area.
Whatâs more Adrian and David did a great job promoting both of their projects, while remaining amiable and respectful of the other camp. Itâs hard to imagine a similar event between two commercial frameworks. Both were given about 45 minutes or so to talk about their software in any way they wanted. They both had extremely different yet effective presentation styles, and their projects had one important thing in common: disillusionment with PHP.
Rather than talking technical details Adrian spent most of his time focused on how Django came to be down in Kansas at lawrence.com. lawrence.com began itâs life as a PHP application which served as a community site for all sorts of goings on in Lawrence, Kansas. The site interleaved all sorts of local entertainment content: music, dining, art, moviesâŚand it encouraged user participation. For example you can listen to mp3s from local musicians, but hereâs the twist, you listen to them as they are playing in townâŚso if you like a song you can jump over to the venue later that week to see them live. Another example was a full on sports site for the local little leagues which posted details of games, scores, weather conditions, etc. All of this was detailed to show how deeply intertwined all the data was.
The really interesting stuff for me was when Adrian described how journalism informed his software development practicesâŚand how Django fed into this process. In the same way that journalists work against the clock to get news stories out quickly and accurately Adrian and his team worked to get software projects done often on similar deadlines (sometimes like 4 hours). They quickly found that their PHP infrastructure wasnât allowing them to respond quickly enough without introducing side effects, and decided that they needed new toolsâŚwhich is how Django was born. In fact the little league application mentioned above was the first Django application.
Adrian has since moved on to the Washington Post, where he is their resident web technology mad scientist. Apparently they are using Django in some form at the Post, or are planning to since he mentioned Djangoâs caching can scale to the 9 million odd requests the Post gets in a single day.
Unfortunately my lead pencil ran out of lead just a bit of the way into Davidâs talk, so I donât have as much written down from the Rails presentation. David dropped some wonderful one liners that I wish I could have written down. Much unlike Adrian, David let actual code do most of the talking for him.
Early on he had a screen with a quote from Richard Feynman on the importance of finding beautiful solutions to problems (if you remember the quote please let me know). This quote kind of guided the rest of the talk where David showed off beautiful Model, View and Controller code from RubyOnRailsâŚand it really was beautiful stuff. Davidâs thesis was that beautiful things make you happy, and happiness makes you more productiveâŚso beautiful code will make for happy, productive programmers. Much of this comes back to the essential philosophy of Rubyâto give joy to programmers. At any rate, the lights were dimmed and David gave us a tour of what RubyOnRails code looks like, while highlighting some of the strengths of the project and the Ruby language. On one of the pages there was some code to set a cookie expiration, and the date was created like so:
20.years.from_now
How cool is that! I wasnât sure if this was part of Ruby proper until I fired up my ruby interpreter to check:
biblio:~ ed$ irb
irb(main):001:0> 20.years.from_now
NoMethodError: undefined method `years' for 20:Fixnum
from (irb):1
Whereas from the Rails console it works fine:
biblio:~/Projects/cheap ed$ script/console
Loading development environment.
>> 20.years.from_now
=> Thu Dec 04 15:38:48 CST 2025
So Rails decorates the Fixnum class with the years method. Pretty awesome :-) Another thing David highlighted was that Ruby is used everywhere, from configuration, to writing XML, to writing JavaScript. I was even surprised to hear him argue for full on Ruby in view templates. His argument is that even when a framework offers only a limited set of tags, itâs still offering logic, and rather than creating some bastardized tag language why not just use tried and true Ruby.
The two presentations were followed by a few (not many) moderated questions, and some questions from the audience. The highlight for me was when Why the Lucky Stiffâs question was asked:
Looking a bit beyond web frameworks, how do you envision the world coming to an end? David responded by âscopingâ the world to mean the world of software development and said that this world would come to an end if the layers of Java âsedimentationâ continue to accrue. He went on to predict that weâre at a crossroads in software development, and that a paradigm shift is underwayâŚintentionally provocative, and pretty much right on as far as web development goes if you ask me. Adrian responded âYoko Onoâ.
So, as you can tell Iâm still digesting the presentations and discussion. There was so much good stuff, and I was really struck by the collegiality between the two guys: open source software development at its finest. The two main things I took away were embracing the boundaries between software development and a particular industry like Journalism, or in my case Libraries; and always trying to strive for the beautiful in software, âboiling downâ a thorny problem into its most simple and elegant expression.