2009 Ruby survey results

Matt Jankowski

Thanks to the 1000+ developers who participated in our ruby community survey a few weeks back.

Here are the results as we head into 2010.

There are result reports linked to from within each section, and this post does not comprehensively list all the results, so click through if you’re interested.

Apologies

''

I’d like to apologize to the dozens of people who felt personally wronged by this survey.

There are questions that are too narrow or too broad. There are questions that are missing options. There are questions that assume too much about an “either/or” scenario, when people really behave differently depending on context. There are questions which insult people’s core beliefs, I guess. Fortunately for all of us, the results of this survey aren’t being used to decide anything too important.

Demographics

The demographics results show that PHP (36%) and Java (22%) are the dominant “prior languages” of many ruby developers. Notably, we left out Python. Sorry python folks.

We also see that more than half the people who took the survey work on ruby professionally on a small team.

Textmate (51%) wins the editor battle, with vim (21%) in second place - and “Distributed VCS” (git, hg, etc) dominates (83%) the version control section. I’m sure that credit and thanks are due to the github team for building a product which makes using a great VCS tool even better.

Formatting

The results show that in regard to an 80 character line limit, the “modern displays are wide enough to not enforce a limit” position wins out, though not with a majority. The questions about keyword spacing, and blank lines are fairly evenly split. A solid 75% of people always use parentheses on method definition – maybe enough to justify criticizing people who don’t?

Style

The results (part 1, part 2) show a strong preference for “self.method_name” over “class << self” for class method definitions and for only using exceptions in exceptional situations.

Database

''

The results show that a slight majority prefer to disallow null in boolean columns – but most are willing to allow NULL in Integer and String columns. Results are split on adding indexing “only when performance issue” vs proactively adding them to foreign key columns ahead of time.

Views and Rails

The results that many people use a shared folder for “global partials”, and show little consensus on how/where to send email from. I think this question got the most “other” replies – let us know how else you’re sending email in the comments.

Documentation

The results show that ruby programmers prefer meaningful variable names, and only like to document code when it’s complex and needs explanation. Almost 80% have committed a code change which effects only code formatting and not functionality.

Wrapup

Maybe most encouragingly, when asked about whether the types of questions in the survey mattered or were a huge waste of time, nearly 90% chose the “I think it’s worth caring about your craft, and these questions are professionally relevant” option. From our experience at conferences and user group events, that seems consistent with the commitment to quality and best practices that exists in the ruby community.