How to Contribute to an Open Source (and Why You Should Do It!)
What is Open Source?
You might not be aware but you have used an open source project before, some examples are Linux, WordPress, TensorFlow, Django, and many more! But what makes a project to be open source? Like the name implies, it refers to source code of a software that can be modified, accessed and share by anyone. The main goal is to make the applications free so that the community can freely distribute copies to the public. The development of this kinds of projects heavily rely on developers who donate their time and effort to collaborate. It is an opportunity for programmers to improve their own skills and expertise.
You don’t have to be an expert to contribute. Many people get discouraged by the fact that some of the code found in open source projects is very complicated and often very optimized, however the development and contribution process can be divided into different steps requiring different skills and levels of technical expertise. You can found a range of roles and difficulty levels to choose from when contributing to a project.
How To Contribute
Before contributing you must select a project! If it’s your first time contributing to an Open Source, try to select a project that’s not so popular, like TensorFlow, pandas, etc… to allow yourself some space and time to breath. Typically these projects have many contributors fixing these issues in a matter of hours, so selecting a more low profile project allows you to be more relaxed.
- Set up Git in your computer and make a Github account.
Nearly every open sourced project uses Git to track their changes across all the contributors and Github to host the project. So it’s essential for you to know the basics of these two tools. You can check this resource for setting up.
2. Clone the project into your machine and change branches.
By cloning the project into your machine you are essentially downloading a copy of the source code. But before making changes be sure to change to a development branch! The main branch is usually reserved for official releases and often only maintainers or authors can make direct changes to this branch.
3. Make Modifications.
Now it’s your turn to make modifications! Try by solving an issue present in Github or developing an enhancement! You can even try to develop a completely new feature. Keep in mind that you must first communicate to the project maintainers about your work! This will enable you to clear any doubts regarding the project o the issue.
4. Make a Pull Request!
After finishing all of your modifications it’s time to make a Pull Request. This means that you want to pull your development branch to the main branch (or to the project’s development branch in case you forked the project). It’s very important to communicate your changes in a clean and concise manner so that the reviewer doesn’t spend hours trying to understand the changes that were made. Here’s a some guidelines that can help you.
Why You Should Do It!
Improve Technical Skills
The only way to improve your coding skills is by practice. Getting practice outside of a classroom or online course can be difficult. Many get trapped in tutorial hell and can’t escape it. A good way for practicing in a more real environment is to contribute to an open source project!
Grow an Online Reputation
Open Source work is public, this means that anyone can see the work you’ve done. Your work could be used anywhere in the world! This can be helpful for you, since participating in open source projects can help you reach more people.
Learn People Skills
Taking part in open source offers the opportunity to practice leadership and management skills, such as resolving conflicts, organizing teams and prioritizing work. It serves as a training ground for you to learn how to communicate!
Find a Mentor (and be a Mentor!)
More often than not, when contributing on an open source project, you will be working and collaborating with very talented people. At first you will have many doubts, but they will guide you in the right path for you to get to the answer and learn many things in the way. And before you know it you will be mentoring other people too! The overall goal of open source is to share knowledge with the community.
My Contributions this Week:
I decided to start contributing to open source! I chose this project because about a topic I’m passionate about and it’s not a so popular project. The best thing about contributing is that there is always opportunity to learn something new! Here I had the chance of learning about a new React Hook, SWR, for fetching data and handling REST requests.