Open Source and How to do it?

Anurag Sharma
3 min readJun 25, 2021

Open-source software is software that is generally developed by a community of developers for free. People all over the world contribute towards building the codebase. These contributions can be a minor documentation update or a major code refactoring, but the important part is that anyone can contribute. However, contributing to any project you find on GitHub, Bitbucket, or whatever platform you prefer, without prior knowledge about OSS development and contribution guidelines, can be tricky for new developers.

I started exploring the OSS world when I was in 9th grade. My classmate had introduced me to an awesome coding competition/program called Google Code-In. It was a contest where school students could work with major open-source organizations and win some really amazing prizes. The competition has been dissolved now, but you can read more about it on their website. So basically GCI introduced me to the world of proper OSS development, where I was able to learn a lot about how to contribute and collaborate on open-source or rather any coding project. Here are some of the most important lessons that I learned during my time in Google Code-In as well as GSOC 18 (Basically a bigger version of GCI but for university students):

Read More, Code Less —

When you start browsing through a code repository, take time and go through each code scripts, config files, etc. I remember one of my mentor said that in life you will always read more code than you write. This is quite true from what I have experienced till now. The more time you spent reading code and understanding the project structure, the more easily you can start coding and contributing.

Code Style —

Here is a small Wikipedia definition of what code/programming style means

Programming style, also known as code style, is a set of rules or guidelines used when writing the source code for a computer program. It is often claimed that following a particular programming style will help programmers read and understand source code conforming to the style, and help to avoid introducing errors.

The above definition is pretty self-explanatory, in every group, developers tend to follow a certain style or way they like to code, for example, python developers in general would tend towards PEP8. You can learn more about PEP 8 over here.

Organizations or groups tend to focus a lot on coding style, and most of them would also have some sort of documentation available if they want to you to follow a particular style. It is highly recommended you go through those documentations before you start coding. These styling methods are aimed towards improving your work’s readability aspect. This will make it easier for other developers to read your contributed code lines and understand the changes without much pain. Code readability is a very important aspect of software development in general and all the more important if you are in to open source development where a lot of people might be reading your code files.

Code Reviews are Important —

If you are aiming to contribute to a well established OSS project, chances are your work will be thoroughly scrutinized before any merging happens. This is a very important part of OSS development. During my time in GCI, I contributed to the Sahana Software Foundation. They had developers who were actively doing software development for the past 5–10 years and were very knowledgeable in their respective domains. The pull requests I used to share during that time were full of errors and mistakes. To my defence, I was still in 9th grade and had just started with coding and development. But having my PRs reviewed by these veterans of OSS development was one of the best learning experience in my life. These reviews helped my become a better developer and reduce the amount of errors I would generally make while coding.

As I said before, open source development involves the work of a community of developers, and you can only become a part of this community if you know how things function in it. Learn the on how groups communicate, what coding guidelines they prefer and what they expect from new contributors. Keep learning and keep coding. Hope this post helps you in your future endeavours in the open source world.

--

--