Hello, y’all. I am Samesh Lakhotia. I have a fair experience/knowledge in contributing to open source projects and I would like to share the same so that more people from our campus start contributing to open source and get involved in the open-source community. I am currently pursuing my Google Summer of Code 2020(GSoC) project at HydraEcosystem.org.
There are already tons of articles on “How to contribute to open source”. You can have a look at them for a general overview. I wanted to share some of my personal learnings/hurdles I had along my journey and how you could overcome them when you start contributing to open source projects. This article is mainly for people who are interested in contributing to open source and/or want to participate in open-source programs like Google Summer of Code, Outreachy, etc.
Contributing to open-source projects as a beginner will feel intimidating. This is because there is no kind of defined “syllabus” or “9 steps to becoming an open-source guru” guide. There are some steps general steps you can follow but you can sometimes feel a bit lost in the process because there’s a very steep learning curve involved. That’s why, the most important aspect, by far, when you start contributing to open source is that you need to be ready to learn new things on the go. But, I guarantee you, the learning you get through it is invaluable as a software developer.
The first question I often get asked is how to go about starting to contribute to open source.
Well, you need to have some basic prerequisites before you can start contributing to open source. They basically include:
- Fair knowledge(by fair, I just mean not being a complete beginner) of any programming language of your choice. It might be better if you are also comfortable with any framework/library in that language mainly because that will open up doors to allow you to contribute to more projects.
- Fair experience in working with any version control system like GIT.
One of the biggest hurdles most people face is how to choose a project to start contributing to.
There are many approaches here, but I would like to share what worked for me.
In my opinion, the best projects to start contributing are the big libraries/frameworks you have used in your preferred language of choice. They have the best open source practices followed and the project will be active. So if you are stuck in any issue, the project maintainers will always be there to offer help.
My language of choice was Python. And at that time, I was exploring the data science and machine learning domain. Due to that work, I had some experience with some of the famous libraries in this domain which included pandas, numpy and matplotlib.
So, I started my contribution to these projects.
Now one thing to keep in mind is that start with some very simple issues. Your first contribution need not be the next big feature in this library. In fact, I did suggest starting(and that’s also how I started) with some non-code contribution like fixing typos in the documentation or updating the documentation. Also, most projects have their issues tagged with labels such as ‘good-first-issue’ or ‘beginner’. You could start with them. These will get you more comfortable with the Github workflow. Also, The feeling of getting your first PR merged is absolutely ecstatic💙
So now you have a decent number of PRs merged in some projects which solve beginner issues. You also feel fairly confident using GIT.
The next hurdle I faced was how do I go from solving simple issues to more intermediate ones. This is by far the biggest challenge I had.
The problem is that there is no exact answer I can give for this. The key is patience and perseverance. I can give you some tips which could help:
- [Absolutely essential] Learn to use a debugger in the language/framework you are comfortable in. Using a debugger will really help you a ton when you are trying to fix any bug. Using print statements to log stuff can only help you until a point. I was in the python ecosystem, so I learnt pdb. You should go ahead and learn whichever is the most suitable for your ecosystem.
- For solving intermediate issues, I would actually recommend you switch your project to a not so big one. The problem with huge projects is that sometimes their code might get a little too complex when you are at that stage. They are really good to get you comfortable with GIT and open-source culture in general. So what I did, was switched my project, and started working on some intermediate-ish issues in another not-so-big project. That project was still in its alpha stage and I could understand most of the codebase.
- Try to explain to the project maintainers about your issue and where you are exactly stuck. They will always be there to help whenever you are stuck. They are going to be your best friends in open source.
- Don’t get disheartened if you are not able to solve an issue for a long time. The first issue I solved, took me around a week. Try to stick with that issue for some time but if you are not able to solve it, try your hand at another issue😉.
If you have solved some intermediate issues, you would have got a good knowledge of open source development culture. You would have also learnt a ton in the process.
Now, for people interested in programs like Google Summer of Code. The process is exactly the same with a few extra steps. But the core idea is the same, try to contribute by fixing bugs and adding features.
One very important thing to understand in your whole journey is that continue only if you like the process. I personally loved the thrill I got whenever I was going after a new issue or getting my PR merged. The satisfaction of seeing my code being used by so many other people was what drove me.
There won’t be any point in continuing just because you want to gain any kind of tag on your resume. I would recommend rather find something you like doing and work hard at that.
I hope this article helps someone getting into open-source. I would love to answer any queries that you have in the comments.
If you have any other questions on open-source development / GSoC, feel free to contact me.
Do ping me once your first PR gets merged😉! Happy developing.