I Contributed to Open Source and all I got was this Sense of Pride and the Chance to Learn Something New
This year I set myself an unlikely goal that I have spectacularly failed to achieve already.
I wanted to spend a little portion of my everyday contributing to any open source project I could help out with. Open source seems to be everywhere and every project I’ve worked on has always been built on top of the software and achievements of others.
Its easy to underappreciate how much hard work goes into creating software that solves a common problem. Especially when it becomes a wildly popular bit of code that everyone is talking about.
I’m thinking about the Boost libraries of C++, the libpng of C, the Spring Framework of Java, the SciPy of Python. Frameworks and libraries used by engineers everyday to help accelerate their development cycles through high quality peer reviewed software.
This year I decided I want to put an end to my endless consumption, I wanted to become a contributor. I wanted to get a real appreciation of the software I use, expose myself to other peoples way of thinking and get the chance to speak with people I would never meet in a 100 years.
Swift Core Libraries Foundation
I started focusing my contribution efforts on open source projects immediately close to my line of work. I spend a lot of time making iOS Apps these days and the biggest change we face as engineers is the Swift language, which luckily for me got open sourced in December.
I pulled the various repositories to my MacBook, looked at the sources and built the language from source to get a feel of how it all works. Once I felt a little comfortable doing this I decided where I was going to work.
The most interesting place for me was the Foundation library that is attempting to provide a cross platform variant of Foundation we all know and use on iOS and OSX.
My first pull request was a simple one, remove a unneeded object allocation from a C method and make it more efficient. I thought the solution was simple enough until I heard from an Apple Engineer informing me I had intact not changed anything and was now leaking memory.
At first I felt a little stupid, although considering I’ve not touched C for a while (who remembers character buffers!) I gave myself a little bit of Slack. I came up with an alternative solution which ultimately got merged!
I didn’t quite save the planet from annihilation, but I made a small difference.
CocoaPods
Another open source project iOS developers will know of is Cocoapods. A dependency manager allowing quick and clean integrations of 3rd party libraries into your project.
The guys who manage the project know their stuff and are some of the most well known people in the iOS community. They are also amazingly down to earth and open to helping others contribute to the project and everything that supports it.
The change I helped with was again very small but allowed me to appreciate the hard work and complexity involved in CocoaPods. All I did was use the CocoaPods ruby library to omit a certain warning.
All in a days work for something who doesn’t really know the Ruby and therefore had Travis CI spit back 2 failed build errors.
Christmas Chill
As part of my open source endeavours I open sourced my Christmas app I created for Apple TV and tvOS. It’s an App written entirely in Swift and something I won’t look at again until next Christmas.
I thought I’d give someone a chance to see a fully working app out in the wild that I made purely for fun, I hope it’ll be of some use to someone in the future.
Ray Wenderlich Code Style
My final contribution this month consisted of yet another small change for the Android team I am apart of at raywenderlich.com. As part of making some changes to a sample project I had to make some changes to code styles we need to adhere to as part of writing Android tutorials for the site.
We have a template we use with Android Studio that helps simplify this but the instructions weren’t clear around some oddities that can happen. A folder you expect to exist might not be there and therefore you have to create yourself, Android Studio doesn’t automatically detect the template and so you need to restart or make the changes with the Application closed.
I made the pull request as part of these corrections and as well as fixing my own project I also hope to help others as well. Double win!
How many days did I contribute something?
First the small print. All the contributions I made were on Github. Not all of them were merged or accepted but still count as contributions. Taking these into account I made 21 contributions over the course of 31 days, compare that to my original target of a contribution a day then I failed by 10 contributions.
I do have a lot to show for it though. I delved into completely foreign codebases written in unfamiliar languages and tried to improve them in a small way, all the while making sure I didn’t add in some subtle regression.
I interacted with people I may never meet and injected a little bit of myself into projects people know and love. Others will look over the small changes I’ve made and maybe even rewrite them if they become outdated or redundant, it’s a pretty empowering thought!
If you have some downtime or are looking to get involved in something you should try lending a hand improving your favourite open source library or software project.
You will be intimidated at first, you will definitely make mistakes but just keep pushing and you’ll come out better at the other end with a wealth of knowledge and a sense of pride to boot.
If you want to do some reading around Open Source I highly recommend everything from the Artsy engineering blog and this excellent blog post from Oliver Halligon.