Wednesday, February 08, 2012


The creator of Ruby on Rails speaking about why he uses Ruby. It may seem like a topic only a programming geek could enjoy, but it is actually an interesting example of the use of a speech to rally the troops.

"Why Ruby?" - RubyConf X Keynote from David Heinemeier Hansson on Vimeo.

Hansson speaks of the human experience of writing programs in a language, the importance of trusting the users of a language, and the value of freedom. That seems to be his main point, that Ruby trusts its developers, and doesn't babysit them. He asserts that the creators of other languages (he names Java) just don't trust their developers, and so deny them freedom.

It is a bravura performance. I loved this quote from Larry Wall
The very fact that it's possible to write messy programs in Perl is also what makes it possible to write programs that are cleaner in Perl than they could ever be in a language that attempts to enforce cleanliness. The potential for greater good goes right along with the potential for greater evil.
There is so much I agree with in the talk: the point that when people are denied the opportunity to do what they really want to do, they go off and find some way to do it anyway, the idea that not everything should be functional, that you should do some things just because you want to, that it is lovely that Ruby is such a developer-centric language. Above all, though, I was intrigued by the talk as an example of rhetoric in action. This is something I increasingly notice about how people around me use language. It was interesting to see what he left out, and what he left in, what he emphasized, and what he downplayed.

He treats "freedom" as a simple matter of being left alone to do what you want, and of course he is right. However, while he find it offensive that Java is strongly typed, there are good reasons why the people who designed it took those decisions, and it is not only about not trusting your users. I wonder how useful Ruby would have been back in 1995, when Java was created, and hardware wasn't what we are used to today. He talks about the culture of Unit Testing in Ruby, and this is something I applaud. However, it is also especially necessary when your developers can change almost anything, including the language itself. It is much easier to to trust your developers today, with modern hardware and testing tools.

For an interesting contrast, John D Cook writing about Java and trust.
This is uncomfortable to talk about, and so the decision is usually left implicit. Nobody wants to say out loud that they’re designing software for an army of mediocre programmers to implement, but that is the default assumption. And rightfully so. Most developers have middling ability, by definition.
Maybe the future does belong to languages which trust give developers more freedom, but that doesn't mean that the past should've belonged to them too.


John said...

DHH is talking about the freedom he wants for himself. But sometimes you have to think about how much freedom you want the other guy to have, e.g. the summer intern whose code you will inherit come fall.

Rajeev Ramachandran said...

Well said.
I actually enjoyed the talk, learnt something. But not a lot of nuance in his presentation, and I'm sure he meant it to be like that.