Let's get this out of the way. A lot of people are asking me how to contribute to open-source projects. Trust me! I was asking the same question when I was in college. I tried to work on a project but eventually, I couldn't get it done. I got so frustrated and never touched it again. Only when I was working as a software developer, I was able to identify why can't I contribute to the open-source projects.
Steps to be Followed :
Getting to the point, some simple steps need to be followed while trying to contribute to projects.
Choosing the Domain
Choosing the Project
Choosing the Task
Push and Review
Choosing the Domain:
One of the most confusing and difficult parts is choosing in which project should I choose to work on. Remember one thing! the complexity of the project never matters to contribute. Every project will contain all modes of difficult tasks from beginner to advanced. So don't worry about choosing the project. If you like web development very much, then start studying it through online courses. you can be a worthy contributor, only if you have enough skills to contribute.
For example, I was very much interested in blockchain technology. So I started learning the blockchain protocol first of all.
Choosing the Project:
Once you chose the domain, here comes a very important part. Choosing an open-source project. you can simply surf the internet for projects based on the domains you have chosen. One of the difficult tasks is to learn the programming language that the project is built on. I can tell you that either you can choose the project based on the domain or based on the programming language you are well versed in. After you decided what project you should work on, just go to their community contribution section on their webpage.
Open Source projects will be having a set of rules called a Code of Conduct.
Each member of the community should follow the guidelines or else they will be kicked out from the community. Every project will be having their communication channel it can be IRC channel, Slack channel or Discord channel. Though these communication channels, people can ask any kind of question-related to the project. Even if it is a silly question, people will answer your question.
In my case, I was inspired by Project SIA - Decentralized Cloud Storage Solutions. It is based on the blockchain technology. They use Golang as their core programming language. I am a DotNet developer. Of course, it is on a completely different track. But I learned Golang ;)
The next step is very important. you have to case study the entire project.
More importantly, you have to study their software architecture. Only then you can understand how the functional specifications are implemented in technical ways.
It will be very much easier if you already know something about their architecture.
And you can easily start a conversation with any one of the developers of the projects. So that they will be thinking that you are very interested in their product. Trust me, it is a really good impression that has to be made.
After performing all the steps mentioned above, finally, it's time to fire up your laptop and set up the environment. Every open source project will be having a source control version that stores all the versions of the codebase of the product. Mostly it will either be GitHub or GitLab. The instructions that are needed to set up your account and repositories will be mentioned in the README file of the project. In case you have any doubts regarding the git commands or setting up the remote you are welcome to contact the project developers. They will help you set up your environment.
Choosing your Task:
Once you are done with the environment setup, you have to ask for some issues to fix or any small feature to be developed in the communication channel of the project. Of course, you know nothing about the codebase for now. Even though you can ask the community developer to help you where to start. They will even give you the exact code to be written and where to be written for the first time. You have to understand the issue clearly only then you can write the code.
Before you do all these things, you should have worked with the software at least a dozen times.
Only then you know how your code is getting affected in the main product. Even you may find some issues and you can report the issue. The Contribution is not only contributing to the code base, but it can also be documentation. Contributing to the documentation will help you understand the process of the Pull Request or Merge Requests. I started my contribution by updating the broken link in the documentation.
Still, now I tell to my friends how stupid I was in my college that not interested to read other's code. This was the major mistake I did in my college back then. I don't like reading other people's code. But I loved writing the code from scratch.
Anyone can write the code from scratch. But collaborating with the other developers and be able to understand other people's code is always challenging.
That's where Debugging comes into the picture. A production level codebase will contain hundreds or even millions of lines of code. You won't be able to identify which method will be called at which place. The method may be overridden in someplace so you will be looking in the wrong method. To avoid all these hasty problems. Debugging is the only choice. you attach the debugger to the running program; set a breakpoint; give the input; wait for the control to hit the breakpoint. Once you understand the program, you start to write the code.
Testing your code before submitting for the review is very much essential. you will be able to identify the bugs in the code that you wrote. Developers normally would do unit testing and regression testing. Unit testing is testing a particular module that you wrote. Regression testing is testing the entire software with your code and make sure that the software is not breaking.
Push and Review:
Once you tested your code, push your code to your remote fork and create a pull request. The fellow developers will review the code and will give suggestions on how to improve your code much better. This is a very good opportunity to learn how to write code efficiently.
Congratulations! on your first contribution. Once the review is completed, your code will get merged into the master branch of the product.
The feel when you see your code performing on the final product will be awesome.
Currently I am contributing to the SIA project. you can visit my Merge Request from the below link.
I'd like to know if you have any feedback. Please post your comments below. Share this post with your friends. Subscribe to DevDecimal.