This year, I participated in Google Code-in.
Google Code-in (GCI) is an online contest encouraging 13–17 year old pre-university students to participate in open source software development. Students work on small tasks created by open source organizations, giving students the opportunity to gain real world experience working with a community of international developers while still in their teens.
This was my second year participating, and also the second year I chose to do tasks for Wikimedia. The Wikimedia Foundation is the non-profit organization behind Wikipedia and the software that powers it, MediaWiki. I think it’s really cool to be writing code that powers a site used by millions of people everyday!
A sample of the tasks I did:
- Wrote a maintenance script to import pages from text files
- Added support for image interlacing when generating image thumbnails
- Made many, many, many, many, changes to unloved maintenance scripts
- Added ability to preview requests for deletion before they are created in Twinkle, a tool for performing common maintenance tasks on Wikipedia.
Each task has one or more mentors, and all of the mentors I worked with at Wikimedia were exceptionally nice and helpful. A big thanks to tto, tgr (Gergő Tisza), FlorianSW (Florian Schmidt), MatmaRex (Bartosz Dziewoński), and jayvdb (John Vandenberg) for mentoring tasks I completed! It was cool to work with so many talented people all around the world! (Even if I couldn’t pronounce their names :)
Through completing tasks for Wikimedia, I learned a lot about open source software development:
- Code review is sometimes a slow and painful process, but ultimately results in better code. Wikimedia uses Gerrit for code reviews. Gerrit is a very powerful Git code review platform which allows for reviewers to leave inline comments for the change owner and give each patchset a score ranging from +2 to -2, where +2 means the patch it ready to be merged, and -2 will block the patch from being merged. I found Gerrit to be fairly easy to use, and the comments left in Gerrit to be very helpful.
- Everything is tested. Every patch submitted for code review is tested by Jenkins before it can be merged, and many problems are found and prevented in this way. I had to write tests for much of the code that I contributed.
- Sometimes, you break things. Wikimedia deploys new code once a week, and that means that code I write can cause problems for actual users a little over a week after it gets approved in Gerrit (although one of the goals of code review is to prevent things from breaking). One of my patches broke some API requests to Wikimedia Commons, which hosts images used on Wikipedia and dozens of other third-party wikis. Thankfully, MatmaRex (Bartosz Dziewoński) fixed it before I even had a chance to look at the code.
Google Code-in is an amazing opportunity for high schoolers to introduce themselves to the world of open source software. I had a lot of fun with it, and I look forward to continuing to contribute to MediaWiki in the future!