A disproportionate amount of happy

At the start of January I sat down to think about what I’d like to achieve in 2015. There were a few goals on my list (and I have to pay attention to not wanting to do too much). One of my goals has to do with Rails, the framework. I’ve been working with Rails for almost five years now and it is the foundation of my career as a software developer.

Back to my goals:
Whenever I go to a conference and they introduce the speakers, there’s this one thing that some speakers have that I wanted to have as well. They are introduced as a Rails Contributor. I know that being a contributor is hard work and not achieved easily. But I knew that this was doable and I knew I had to start somewhere. So I downloaded the Rails source code from Github and began to read it. I am a competent Rubyist but far from the Greats. So I was surprised to see how readable the source is. There were few parts that seemed overwhelming and only some that I didn’t understand (and didn’t [yet] bothered to try to understand).

How to contribute

So how could I contribute to this source code? There would be a lot of reading ahead to make sense of it all and to be able to have a meaningful contribution to the code. I had to find a second, quicker way! I remembered that I recently searched in one of my own projects for the use of #map and a subsequent #flatten because I had learned that the call of #flat_map was more idiomatic and performed better(See also the following slide for the numbers.). So I did a full text search for /\.map.*\.flatten/. To my surprise I really found an occurrence and quickly changed it to use #flat_map. A bit further down the file I noticed a superfluous return statement and deleted that.

git commit -a and a useful commit message were the next steps. Finally I forked the project to my Github account, pushed the changes to this new remote and opened the pull request. This was exciting!

Of course my changes really were minor. And of course I used full text search to be able to contribute. But in my opinion this doesn’t matter. Having this commit merged into Rails just makes me happy. I improved the code and I did the first step to be a Rails contributor. And I believe that’s all that counts.

Where to go from here?

I will continue with reading the source. There already were some things I learned (ActionMailer is for sending email, you know that. But what surprised me is that you can use it for receiving mails as well). As my journey through Rails continues I will learn more things (e.g. Rails introduces mattr_accessible and cattr_accessible for Module and Class, respectively.), improve my understanding of Ruby and learn how to improve my usage of the framework.

I believe it’s important to start with small things to contribute and build momentum from there.

  • Do I want to continue to contribute? Sure.
  • Do I know when my next commit and pull request are going to happen? Uncertain.
  • Will it be as small/easy as this one? Probably not.

But I am proud to be on the list.

Next steps

So what’s next in 2015? Another big goal of mine is to improve my ability to teach software development. As a result I will get deeper into teaching and I will try out different approaches. This will mostly happen with the subscribers on my list. You should join today.