What is Open-Source? How to get Started

What is Open-Source? How to get Started

TONS of benefits of open-source

Hey there! How's the day going?

Okay, let's first understand what is 'open-source', so just keep reading till the end and you will learn why there is so much buzz around this word and how you can get started in open-source with just this blog post. I was just like you, YES YOU! Sitting there, reading blogs, watching youtube videos, trying to understand this thing. So, in the end, I will share my own experience in open source.

what is this thing? Open-source.

Is it a technology? Is it a software application? Is it a complex thing that I should learn once I am skilled enough?

you must be thinking

There are two kinds of software, one which a company builds/creates/codes whatever and the code is kept secret from outsiders. For eg-Instagram's algorithm software ( God knows how is it built, it just shows the ads which I talk about with my roommate).

Open source is the opposite of it, It is software that has its code open for the public, it is visible to the public and anyone can ask to add a new code or edit the code of the software. It is on the software owner to allow those proposed changes. But, in a general sense, the software's source is OPEN! to the public to everyone! Anyone can contribute to the software. It's maintained by the public.

For eg- Linux, it is an operating system software whose code is open-sourced. Hence, Linux is called an open-source operating system.

Why is it useful to make your projects/software open-sourced?

okay, we understood what the term "open-source" means now, but why do developers make their software code open-sourced, what are some benefits of making your application/software or even your projects open-sourced?

Benefits to Developers:-

  1. Faster, More Transparent Development: Closed-source software can often be a black box that neither developers nor business users (who aren’t programmers themselves) can’t meaningfully alter or enhance. As a result, when you experience challenges, you’ll need to partner with vendor support agents or just wait until the vendor builds a solution to your problem. Open-source projects give you full visibility into the code base, which means you can frequently code your solutions and directly document your issues in community spaces. And you may receive a variety of responses that provide as much or more context as you’d receive from a professional support team, as fast or faster.

  2. Cost-Effective: If you have started your own new thing, startup or something, and you need developers for building your company's software or app. Hiring the developers and building a team will be a big task.

    With Open-source, you can make your application public and people will help you to make your application.

  3. Limited Perspectives: Suppose you hired a team of developers after many interview rounds and a filtering process. They started working on the software. But since a team is a limited no. of people, their ideas and perspectives will also be limited.

    With open-source, there will be a developer sitting in a remote location who sees your application and immediately offers a fresh perspective to improve its structure.

  4. Community-Driven Security: Open-source products often offer surprisingly robust security as teams tend to test extensively before releasing new versions. Many successful open-source communities attract security experts who also make additions to the project. That said, it may be worth mentioning that unless the community designates an ongoing security team, open-source projects may lack a dedicated resource to ensure ongoing security.

  5. More Employment Opportunities: Instead of going through thousands of applications to join your startup, you can just see the quality contributions someone has done on your open source application and from there you can recognize the talent and hire people into your team. No need to take a quiz in the interview round since you already are aware of their knowledge based on their contributions.

okay, we have now understood that open-source is very beneficial to the developers but why would anyone want to contribute to someone else's application? what are the rewards for the contributor's side?

Benefits to Contributors:-

Contributors are those who contribute to open-source projects by adding new features, enhancing existing features, fixing any typos or bugs in the project, and raising new ideas for the project. We can also contribute to these projects, thus we are called contributors.

  • You help others through Open-Source Community: You are improving the project's quality through the code you create. That's so cool. Even if it is a minor typo fix, opening a small issue, minor code change, you are helping the other developers by providing a solution, improving the code.

  • Practical Learning Experience: The learning opportunity is enormous when you work on an open-source project. You collaborate with experts, you get feedback and you glimpse into professional software development.

  • You gain recognition and leverage your career:

    If you do open-source contributions consistently you will never need to create a resume

    This is true because when you contribute to a software project, your whole work is visible in your code, your skills, and your communication and collaboration skills. Thus, the recruiter can hire you based on your quality of contributions.

  • Improves Communication Skills: Even if you are an introvert like me, and just want to code from your desk in your room, communication skill is something that you will need to excel in your tech career. Open-source lets you communicate with other developers, you understand how experts communicate, and you build a network also.

  • Builds network: I think it is clear by now, how you can meet and connect with amazing people in tech through open source!

In short, Open-source contributions have many benefits and the only downside is that you will get so much tech opportunities that you will not have time😂

How to get started?

If you are a beginner in Open-source then I suggest you first learn Git and GitHub because open-source contributions are done using Git and GitHub. Also, these two are pretty mandatory skills every developer should know.

Resource for learning Git and GitHub

Go watch that video first and I am waiting down here :)

Okay, I hope you have got the gist of Git and Github by now, so let me explain step by step with my example of How can I contribute to a project through open-source:

  1. Go to the GitHub repo of the project you want to contribute:

    Suppose I want to contribute to this repository ( devs-in-tech)

    This is their readme documentation.

  2. Fork the repository:

    I need to click on the Fork arrow down on GitHub on the repo I want to fork

    In this case, I have already contributed to this project so my previous fork already exists but you should create a new fork

    Forking is done so that whatever change you do in the forked repo will not be visible in the main project's repo. A fork allows you to freely experiment with changes without affecting the original project. The original project is used by the public so forking is a must.

  3. Clone the repo in your local PC/System:

    After forking the repo, a new repo with your name will open up. Here, you can experiment with any changes and It will not affect the original project repo.

    Now, you need to clone this repo in your local system so that you can work on these files locally.

    Click on the green code button and copy the https link.

    now, paste this link in your git bash or CLI with the following git command:

    i.e- git clone <url of clone link>

  4. Find the downloaded files and folder and change them:

    Now that all the folders and files of the forked repo are downloaded in your local PC, you can finally start working on these files using any code editor of your choice ( my personal favorite is VS Code ). Go look for these downloaded files on your PC and start with any change in the code.

    In this case, I will show how if you don't know any programming knowledge you can still contribute. Here, I will fix any typos in the readme doc.

I found them in my C folder in the users/SagarSharma folder

I opened the readme file using vs code and added a new line ( in this case, there was no typo error in the file so I just added my name :(

  1. Change the directory: I am changing the directory in which I want my git commands to work with the 'cd <directory Name>' command.

  2. Create a new Branch: We need to create a new branch for any new feature we are adding or for any change. This is done with the command 'git branch <branch Name>'.

    Now, we need to make this new branch the head. 'git checkout <branch Name>. Now, whatever changes will be done, it will be on the new branch and not in the main branch.

    There's a reason we should create a new branch for any new feature and it is explained in the Git, GitHub video (which I shared above) by Kunal very clearly.

    I used the command 'git checkout <branch Name>' to change the head pointer to the new branch

  3. Adding the changes: Now, we can see the status of the directory by using the 'git status' command

    By using the 'git add .' command we can add these changes to the stage and once they are on the stage, we can commit them

    Now, the changes in the status show green which means we can commit them.

  4. Committing the changes:

    'git commit -m " any message you want to write" '

  5. Pushing the changes:

    We need to push these changes in the forked repo on Git Hub. Let's do this by using the command 'git push origin <branch name>'. Here, push means we are pushing the changes and origin is the name of the repo on which we are pushing the changes. By default whatever URL you clone is named as the origin.

  6. Open Github:

    Now, on your forked repo, you will see that a new commit has been added and the option for creating a pull request will appear.

  7. Creating a Pull Request: Always click on compare & pull request so that you are up to date with the main/original repo.

    If you look closely at the top, you are asking the maintainer of the project to merge the changes in your forked repo's feature branch into the original repo's main branch.

    Just click on Create pull request. Congratulations You have created your first PULL REQUEST!

    It's up to the maintainer if they want to merge your changes. These changes will be reflected in the original project which multiple users are using. Here, they can give their feedback and suggestion on your changes and in this way your communication, and collaboration skills improve.

Don't worry, all these steps will come naturally to you once you start contributing to open source regularly. And if your skill level increases, let's say you learned CSS. You can start modifying the code in CSS files and creating a pull request. For eg- changing the style of the footer section of the website.

I know this blog was long but I covered everything which could help you start your first open-source contribution.

Resources to practice

There are some resources where you can practice open-source contributions:

  • Girl Script Summer of Code ( GSSOC ): It's a program where beginner contributors contribute to open-source projects and learn and network with other contributors.

  • Social Summer of Code ( SSOC ): It's the same as Assoc and you should check it out! It's completely beginner friendly

  • EddieHub: It's an awesome community for open-source contributors. Try searching it up on GitHub and there you will find a proper guide for practicing open-source contributions. You can join their discord server to network with amazing folks too!

Thank you for reading till the end, If you have any questions or doubts pls ask them below in the comments. Let's meet in the next blog where I will share my learnings on JavaScript ;) 🚀🚀