Guide for contributing to open sourced projects
Most times when I bring up contributing to open-sourced projects there are developers who treat it as a strange topic or something that they've heard of but never attempted.
The majority of them think along this pattern, "So Jason, you're telling me that a developer is going to code a project and I have to find this project and suggest a way to make the project better?".
It also tends to lead to more questions such as:
- Where exactly do I find this project?
- What can I fix and why should I fix it?
- How long does it take?
- What if it's rejected?
- Will it show up on my Github contributions?
Within this article, I am going to use my own experiences to answer these questions.
Where exactly do I find this project?
Open-sourced projects can be found in several places if you're looking. There may be a project that you use which needs to update its documentation, a website that you find helpful but it has a bug in the layout or a random project you discovered and have opinions on how it can be improved.
For this example, I will be using my contribution to Real World. Real World is a collection of projects developed using various technologies to achieve the same result, a basic website or application called Conduit.
Having got the link I decided to go through and explore the different technologies and how the same project can be built using each framework.
What can I fix and why should I fix it?
You can suggest a fix for anything that you perceive as an error. This may be a:
- Bug in the code
- Grammer issue in documentation
- UI issue on the website
- Performance issue
- Accessibility issue
If you can explain what is wrong and how fixing it will benefit the project, you can suggest a fix.
Having gone through a few Real World projects, I came upon the solution done by Mutoe which uses Vue.Js, Vite, Pinia and Typescript to build the website. The first thing that caught my attention was the fact that the website had an issue with its CSS. The layout had a navigational bug in regard to scrolling.
A horizontal scroll was present which did not follow the design system of Conduit and was a clear bug. Even though this project was just a demo, I began thinking about SEO implications, performance issues and accessibility concerns which would be raised if it were in a production environment.
Having located an issue within the website, the next question is "Why should I fix it?".
The answer to that is you don't have to and there are several reasons why you may not be able to fix an error that you find:
- You don't have the time
- You don't have the expertise
- You don't want to clone the repo or examine the entire project
In this case, if you spot an issue you can simply report it as an issue on Github. Someone else will notice the issue you highlighted and work to resolve it.
I took on the task of fixing this issue myself because I had some free time when I found it. Moreover, CSS is my strongest language so I knew it would only take me 3 minutes to locate and fix the issue.
How long does it take?
When contributing to open-sourced projects something that you should always have in mind is that it may take a while for your contribution to be acknowledged. People are passionate about their projects but just like you, they are dealing with everyday life. Don't feel discouraged if a couple of weeks go by without any word, I can assure you that they will get to it when they have the opportunity.
What if it's rejected?
My contribution to the project was accepted and merged into the codebase.
However, there are a few reasons why a contribution may be rejected.
- The pull request was badly formatted
- The pull request has a merge conflicts
- The contribution suggested was already planned
- The contribution suggested would have led to issues unknown to you
An example of when a contribution I made was rejected was with Next.Js. The issue was that their documentation for link tags did not address a use case presented so I suggested an update, however, my contribution would have been unnecessary with the launch of the next version of Next.Js.
Your contribution may be rejected but it may also be accepted. If it is accepted you will be the person responsible for making life easier for thousands of developers. Moreover, it may open you up to networking opportunities which can lead you to greater things.
Contributing to open source projects is always recommended.
Will it show up on my Github contributions?
This is the last question that is usually asked. Yes, it will appear in your Github contribution history.
However certain conditions must be made if you want to see a badge such as here:
Firstly, the contribution must be made to an organization. Contributions to user projects, such as my contribution to Mutoe's Real World project, do not award badges. Secondly, you must enable badges in the Github settings so that other people can see them.
In conclusion, you should now have a greater understanding of the process of contributing to open-sourced projects. You should know how to find a project to contribute to and what you may be able to add to the project. In addition, you should be more understanding when it comes to how long it may take for your contribution to be recognized and know what types of contributions will give Github badges. You are now ready to start contributing to open-sourced projects and the community.