still flowing

energy, thoughts, flow

An Experience in Contributing to Open Source

21 december 2014
open source, programming

I joined github back in 2012, and starting working with software from the Ruby/Rails community in 2013. After a few months of working in the Rails ecosystem, the greatness of open source software (OSS) began to dawn on me- As OSS-founder (he wouldn’t like me calling him that), free software advocate, and sorta hippy-computer-guy Richard Stallman said,

‘Free software’ is a matter of liberty, not price. To understand the concept, you should think of ‘free’ as in ‘free speech,’ not as in ‘free beer’.

Who wouldn’t want to write free software for the betterment of mankind with this dudebro? (Photo courtesy of Wikipedia)

Although Stallman’s perspective is essentially a humanist one, there are also arguments to be made for OSS in capitalism. It fosters competition and innovation, and encourages the movement towards aaS, which I believe to be a business model better suited for the digital world: shit is way too easy to steal.

Tangents… So, let’s say I had the desire to contribute back. For a long time I sort of floundered as to exactly what I would contribute - it just seemed that a majority of functionality had already been created. I spent some time digging around existing projects looking for things to do, but that didn’t seem like a good use of my time, and it was kind of boring too! (It was like an endless cycle of code reviews for code I didn’t particularly have an interest in, for people I didn’t know… and the flaws I did find were usually things like: [‘prefer single over double quotes for non-interpolated strings’, ‘slightly refactored method with default parameter’, ‘removed whitespace’]… I was rubocop incarnate). I didn’t feel great about the scope of these ‘improvements’ or particularly enthusiastic about contributing them. I stopped looking to contribute, and became a ‘user’ for the next year or two.

Then, just last week, I started working on a personal project, intending to connect a few music APIs (, spotify, echonest, bandsintown) in one interface, providing links to relevant events and cool data visualizations and other fun stuff. That’s a work in progress™, and maybe another blog post… Anyways, I looked for gems. Working with the most-starred ones on github, I had a lot of success, but I discovered some issues- Specifically, the echonest libraries didn’t have access to the genre API endpoint, and the latest version of the bandsintown gem released on had a bug in it that was preventing me from pulling events. I wanted to use these gems, so I forked them, debugged the one (really just a gemspec and version bump), and added a class for Echonest::Genre to the other. That first day, I really don’t believe I was thinking about contributing to these gems; my idea for my music site was so exciting, I had no choice but to improve the available tools to meet my goal! After I got the gems integrated in my project, my thought then turned to open source. I realized I had improved two gems with at least reasonably well-written code, the worst I could do is submit a PR and get rejected, right? I cleaned up my code, added some tests, and opened the PR… Silence at first, but a day or so later the echonest gem maintainer responded with more-or-less thumbsups!

This is pretty cool. feelsgoodman.

My code has yet to be actually merged, but merge or no, I’m excited for more opportunities to write open source software. There’s a nice little positive feedback loop between personal projects and contributing: Work on a project to build something cool or useful, you’ll eventually write code that nobody has written yet. Contribute to OSS and you get that sense of pride and satisfaction in your work, which in turn gives you motivation to keep working.

In comparison to actively seeking out projects to work on, another benefit of this more organic approach is a deeper understanding of the source you’re working with. If you’re approaching a project as a tool to solve your problem, and need to make changes, the code you write will hopefully be well-thought out and cleanly written, – you want to accomplish your goal in an efficient way, after all – and thus, without really having expended any extra effort, you’ll have some nice bits of code, prime candidates for giving back.

TLDR; don’t to try to force your contributions to OSS. Keep programming, building things you’re passionate about, and solving real problems, and eventually you’ll discover a space where code has not been written to accomplish your task, and you’ll find yourself naturally improving an existing project or creating one.