freedom in ruby and code

November 16, 2010

After my last post, I had a twitter conversation with @dhh about his talk and my reflections on it. I’m still not sure he understands that his talk wasn’t “weird-cool” like his example of _why, nor do I think it was an example of “weird-angry” that the Ruby community would disdain. Instead it is an alternate brand of weird, on the verge of weird-creepy — over the top for some, but merely boring and off-topic for me. I heard from one person via email that the keynote (and some panel I didn’t attend) caused a first-time RubyConf attendee to feel out of place at the conference — not likely to attend again. I didn’t get a sense of leaving in a huff, rather that this was a closed community with an in-crowd and a sense of humor not shared. I believe there a wide space between delightful and avant-guard experimentation in code and art, and the status quo of corporate America. However, David Hansson and others seem to fear that if they can’t use NSFW language and metaphor that soon we’ll all be wearing suits to RubyConf and the wild creativity of the Ruby community will be stifled. I think not.

I do believe Dave when he says that he sought to inspire…
I can't imagine a more inspiring topic than freedom. I was certainly fired up! But glad you liked Dave Thomas' talk.

Over twitter, he re-stated his thesis for me:
@ultrasarus tweet: @dhh wondering.. did you have a call-to-action in mind? or just that we should appreciate (defend?) our Ruby freedoms? sorry if I missed it / @dhh replies: @ultrasaurus If you don't know and appreciate the freedoms that you have, you're much more likely to casually lose them.

What does freedom mean with respect to code?

David referred to Maslow’s Hierarchy of Needs, suggesting that there is a parallel hierarchy of programming languages. I think assembly language should be considered the bottom of the pyramid, since it allows programs to survive using a primitive communication with the machine and agree that Ruby supports the top of the pyramid.
Maslow's Hierarchy of Needs

Self-actualization

The top of the pyramid includes: morality, creativity, spontaneity, problem solving, lack of prejudice, acceptance of facts
Examples:

Esteem

The next level includes: self-esteem, confidence, achievement, respect of others, respect by others. These aspects are in some ways strongly supported by the community where there is technical support for publishing our work and strong systems of acknowledgment.
Supporting Examples:

Where we still need work:

Defending Freedom of Code

I agree that the Ruby community uses the freedom of the Ruby language to great benefit. As the community grows, we are in danger of settling into patterns established by our pundits or the conventions of last year’s gems (which reflect last year’s thinking). Each of us needs to understand the core principles by which we code and practice those, in order to retain our freedoms. I’d like to share some examples that would have worked better (for me) in the keynote, which could have been suitable replacements for what I felt were off-topic metaphors.

One of the points David Hannsson made in his keynote is about the freedom from declaring types. It reminded me of Oliver Steele’s article Test vs. Type — originally referencing JavaScript and Python, but the same principles apply to Ruby. David talked of critics who speak of “enough rope to hang yourself” and asked, rhetorically, if hanging was really the most common use case for rope. Should we focus on preventing one rare use case rather than supporting all of the other useful ways to use rope? Instead of being afraid of what liberty allows, we can provide effective measures to protect ourselves. With Ruby, we do that by having strong technical and social support for testing.

The Ruby test framework explosion in the past few years has been a bit overwhelming to many of us and was at first addressed by blog post tutorials and talks at meetups and conferences. Many Rubyists have also worked hard to support the freedom to use your test framework of preference. Here are some examples:

In general, Rubyists value freedom of choice. When we can easily experiment with different frameworks and libraries, we can make well-reasoned decisions without overly valuing the status quo. As software developers, we need to work hard to overcome inertia in order to move forward and continue develop great code year after year. A few more examples:

I’d be interested in hearing about other examples of how Rubyists are using the flexibility and freedom that are inherent in the language to create an ecosystem that protects us from the inherent risks, defends those freedoms and promotes programmer happiness and creativity.