Are you interested in getting involved in the open source community but don’t know where to start? There are several ways to contribute, even if you don’t think you have the technical chops to be useful. Don’t let a lack of confidence stop you from making the internet a better place!
Have you used any of these excuses to not get involved?
“I’m not a very good programmer, what do I know?”“I don’t have enough time to get into an open source project.”“I don’t know what open source project to work on. Where do I even start?”
Quit your bellyaching! Remember these three core open source principles as you look for contributing opportunities:
- Projects need contributions from programmers with varying skill sets and levels of expertise.
- Even the tiniest contribution is better than no contribution at all!
- The best project to begin working on is one that you already use.
The vast majority of programmers involved in open source are not programming geniuses. We’re people just like you; we like to get stuff done and help solve problems.
Andy Lester from SmartBear said it best,
“Most of what makes open source work is actual work, time spent making things happen for the project. Most of these things don’t require the brains or vision of a Larry Wall, creator of Perl, or a David Heinemeier Hansson, creator of Rails. Designing a new language or a web framework may take inspiration, but the rest of what makes projects like Perl and Rails successful is perspiration. This work may not get all the glory, but it’s still necessary, and after a while, your contributions will get noticed.”
What a great mindset! Ready to get started?
Programmers of all experience levels can help with the code in an open source project.
Before you get started, here are two tips.
- Investigate the method used for getting code from contributors from the project leader. Each project has its own workflow, so ask for any specifics before you set out to submit code. This will save you time in the long run.
- Whenever you modify code, make sure to act as a responsible member of the community and keep your code style to match the rest of the codebase. This means that the code you add or modify should look like the rest of the code and match any existing standards.
Working with Code
Now that we’ve got that covered, let’s get into four ways to contribute to open source code.
1. Add a comment to the project: When you’re digging through the code, you may find some lines that are confusing. This is normal, especially for open source projects. If you were confused, chances are that others will be, too. Be sure to document your confusion/explanation with a comment and submit a patch.
2. Write a test: Most open source projects have a test suite to test the code, but it’s hard to imagine a test suite that couldn’t benefit from having additional tests. The more testing the better! Use a test coverage tool (like gcov for C or Devel::Cover for Perl) to identify areas in the source code that aren’t tested by the current test suite. Then, add a test to the suite to cover it.
3. Test a beta or release candidate: Any project designed to run on multiple platforms could have any number of portability problems. It is very difficult for a project leader to test for multiple platforms alone. When a release approaches and a beta/release candidate is published, the project leader hopes that it will be tested by different people on different platforms.
You can be one of those people and help ensure that the package works on your platform. You better believe the project leader will be thrilled with your contribution! Testing typically means you need to download, build, and test the software, but the value to the project can be huge if you’re on an uncommon distribution or hardware. Simply reporting back that the build and test works helps the project leader know that the release is solid.
4. Fix a bug: This is a great place for contributors wanting to work on code start. Find an interesting-sounding bug in the ticket system and try to fix it in the code. Make sure you document the fix in the code if it’s appropriate!
Make sure to add a test to the test suite of the project for the code you fixed. Some open source projects require bug fixes to include tests. It’s a good idea to keep notes as you poke around in an unfamiliar codebase, too. If you aren’t able to fix the bug, that’s okay! Document in the ticket what you discovered while attempting to fix the bug. What you find will likely help those who come after you and makes it easy for a fellow programmer to pick up where you left off.
There are many ways to contribute to open source projects, no matter what you skill level. Hopefully you’ve learned a few ways to begin contributing to the community in this post and have the confidence to start helping! If you aren’t sure what project to work on, or want to start your own, be sure to sign up for a free SmartFile for Developers account. We would love to feature your project in the SmartFile Developer Showcase.
What other ways can programmers contribute to open source code? Discuss in the comments below.
Image Credit: Flickr, OpenSource Way