Open Source Contribution for beginners 🔥
Tags: opensource, github, beginners, webdev
Published: 2020-08-30 17:14:41

#### How I got started with open source

Let me be honest, when I first heard about open source contribution when I was learning CSS, I thought it was for experienced programmers. With me learning what is CSS specificity or the difference between label and input elements, I didn't want to contribute. As a code newbie, I thought I was not good enough or experienced enough to contribute to anything (feared that my code will be rejected). Thus, I didn't contribute at all until recently. I guess, I didn't believe in myself as much but if you are a code newbie, learn from my mistakes. Don't wait until you are 'good enough' to contribute to projects, just get started and you will learn along the way. 
Most project maintainers or owners of open source projects are kind and are willing to link resources that are useful to solve the issues. If you see an issue that you want to fix but don't understand fully, comment below the issue and they will guide you. 
Don't be afraid to ask for help from the maintainers or owners. You know way more than you think, just believe in yourself. 
I will guide you to resources you can use as a code newbie who wants to contribute and learn in the process. I will not use complex terms to sound 'fancy', I will make it simple and clear. I got you !! 💕 

![Believe in yourself gif](https://media.giphy.com/media/cJfV9CjH393seMpIan/giphy.gif) 

#### What is Open Source software and closed source software 👩‍💻
Open-source software is a software that contains source code (code in general like HTML,CSS, js, python, etc) which is publicly available or accessible for people to read, change, improve/enhance and share. 
Closed source software is a software that has source code that only one person, a team, or an organization, that can change, edit or share with each other.  

#### Why should a code newbie contribute to open source projects
If you are wondering why is it important for you to contribute even though you are a beginner, I will list a few reasons of what I have learned so far.

+ You get to learn more about programming. 
When you are on your coding journey, you only learn the specific language or basic syntax but it might difficult for you to see how it's applied in real-world projects. By raising an issue or contributing to solving one, you are able to apply what you learn in your coding courses. This makes you understand the concept better and on a deeper level. Some maintainers will write links to resources you can use to solve the issue.

+ Get code reviews from senior developers. 
By contributing to other people's project your code will be reviewed by someone more experienced than you. Through this process, they can be able to tell you what you need to improve in your code. Thus you can improve your skills and learn more about dry code(don't repeat yourself) etc.

+ Learn how to use Google properly.
When you are stack when solving an issue, you can google and read through different resources to get solutions. Learning how to use resources like [stack overflow](https://stackoverflow.com/), [developer mozilla](https://developer.mozilla.org/en-US/), and language documentation to solve the problem. Googling is an important skill to learn early in your journey since we can't remember everything about a language. Unless you have a super memory or you are a genius(I wish I was 😁). 

+ Experience in collaboration. 
An open-source contribution is a great place where you can collaborate with other developers by improving their code or correcting them. When you go through other developer's code you learn how to write code in different methods. Like how to use arrow functions, declaration, or expression functions. Most importantly, through the comments, you can chat with other developers if need help or more clarification on the issue you want to solve. 

+ Rewarding. 
The feeling you get when your pull request is merged and your code is used in the main project are amazing. I remember when I contributed to my first open-source project, I was so happy. Finally, people will see the resources I have included and even use it. Just remember no contribution is too small to be celebrated. As a beginner, each contribution is an achievement and is worth celebrating. Plus you get the motivation to contribute more as you are learning.

#### How to get started
Open source contribution requires you to know basic git commands and also knowing how to navigate your way on Github. You can check out my post about [Git and Github for beginners](https://dev.to/tracycss/git-and-github-for-beginners-po3), to get the basics.

 Resources to learn git include:
+ [Basic git commands by Atlassian documentation](https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html)
+ [Git handbook](https://guides.github.com/introduction/git-handbook/)
+ [Start using git command lines](https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html)
+ [Resources to learning Git](https://try.github.io/)

Learning Github resources
+ [Github lab learning](https://lab.github.com/)
+ [Github guidelines - Hello world](https://guides.github.com/activities/hello-world/)


#### How to contribute
##### 1) Find projects to contribute
Search for GitHub projects that are open source and have issues that are been labeled good-first issues, beginners-friendly.

##### Websites that show you beginner-friendly open source projects
+ [Great for new contributors](https://github.com/showcases/great-for-new-contributors)
+ [First time only](https://www.firsttimersonly.com/)
+ [First Contributions](https://github.com/firstcontributions/first-contributions)
+ [Up for Grads](https://up-for-grabs.net/#/)
+ [Good First Issues](https://goodfirstissues.com/index.html)
+ [Triage Open Source Issues](https://www.codetriage.com/)

##### Creating a pull request
It is always good to show a real example for you to see how easy it is to create a pull request. I will go on GitHub and find an open-source project with a good first issue that I can do.

##### 1) Read the readme file and contribution file
The readme file is where the creators put details about the projects and some additional rules of contribution. It's always good to understand what the project is about and the technologies used. The contribution file (CONTRIBUTING.md) contains rules or guidelines to follow in order to create a successful pull request(a request created to the original project with the changes you have made.) You can also go through the code of conduct file that shows you how to respectful as you are contributing. After understanding the rules, go and check out the rest of the folders/files to be familiar with the project. 

##### 2) Find a good first issue 
The issue tab on Github repositories is where you can search for labels written bugs, good-first-issue, beginner-friendly, or feature enhancements that you can work on. 

<img src="https://i.ibb.co/yBKX640/issue-page.png" alt="issue-page" border="0">

##### 3) Read the issue carefully
Read the issue and understand what is required of you. If you find that you don't understand it fully, ask for help from the maintainers or owner in the comment section. Just click on the issue and you will see it in detail and what you are expected to do. Write a message in the comment section, click the comment button and your message will be displayed. 

<img src="https://i.ibb.co/nLC2Pt6/issue-comment.png" alt="issue-comment" border="0">

##### 4) Do your research 
When I come across an issue that I don't understand or it's something new to me, I use my best friend Google(that includes stack overflow). With that, you can get different websites that explain the problem you are trying to solve. If you want something more visual, Youtube will be your wise uncle. There are amazing youtube channels with great content that will help you. 
For example, the issue that I tackled was creating an issue template. I have never done that before, I did my research and got my solution. 

##### 4) Fork the project in your Github account 
I always try to find a solution before forking the project because I want to do something that I can actually solve. Plus It's always good to comment that you are interested to tackle the issue in the comment section. The maintainers will assign the issue to you.
Forking is done by clicking the fork button on top of the page. This will create a copy of the repository in your own Github account.
![forking image from github](https://i.ibb.co/tKKsG5p/Screenshot-156.png)

If you want to see how to clone and to create a branch remotely on your computer check out [my first post](https://dev.to/tracycss/git-and-github-for-beginners-po3). I have created a detailed step to follow from using git to clone the project to create a pull request. 

##### 5) Creating a branch
For example I am going to show you, doesn't require me to clone the project to my computer.  I will create a branch in the Github repository under the feature flag. Example feature/issue-template that's the name of our branch. The branch will be similar to the main/master branch which is the default branch. 

<img src="https://i.ibb.co/V2YgYGN/create-a-branch.png" alt="create-a-branch" border="0">

##### 6) Let's create the issue template
I will show you how I solved the issue to give you an idea of how to solve others on your own.
Go to the setting tab, check the issue checkbox, and click on set up templates button in green. 

<img src="https://i.ibb.co/N7ggq4c/part-1-2.png" alt="part-1-2" border="0">

##### 7) Select the template you want.
In this case, the issue template will have a bug report and a feature template. Let's do a bug report first. Click on the bug report button and GitHub will generate the template for you. 

<img src="https://i.ibb.co/0yXHjsK/part-3.png" alt="part-3" border="0">

##### 8) Creating a bug report and feature request
Already GitHub has created the report you, just click on the preview and edit button. 

<img src="https://i.ibb.co/C7rjv2S/part-4.png" alt="part-4" border="0">

View the report and edit it to your liking. You can also leave it as it is, it's all up to you.

<img src="https://i.ibb.co/3pbqn6T/part-5.png" alt="part-5" border="0">
After editing it, save it, and let's create a feature request template. Click the preview and edit button, edit it and save it.

##### 8) Creating a pull request
+ Click on the proposed changes button in green.

<img src="https://i.ibb.co/YkC1WcM/proposed-changes.png" alt="proposed-changes" border="0">

+ Write a commit message 
Write a commit message and additional information that is descriptive. The maintainers need to know which files you added and some additional info about what you created inside the files. Let's make the life of the maintainers easier even if you are a beginner.😊

<img src="https://i.ibb.co/yVJkymB/commit.png" alt="commit" border="0">

Choose the branch you created don't select the main or master branch. Click the commit changes button in green to create the issue templates. Github will update your changes and you can now create a pull request.

<img src="https://i.ibb.co/rFDPVpy/pull-request.png" alt="pull-request" border="0">

#### Congratulations you created your first pull request. 
The owner or maintainers will now review your changes and see if they want to merge it into the project. Be proud you have learned something new, you are amazing. Start with these small contributions as you prepare for [Hacktoberfest 2020 ](https://hacktoberfest.digitalocean.com/)which is next month. 

![Congratulations gif](https://media.giphy.com/media/26DOoDwdNGKAg6UKI/giphy.gif)

#### Conclusion
This was long, woohoo!!! But I hope you learned something new. If you want a step by step guide to clone the open-source repository on your computer and get a basic git command guide, check out my post on [Git and Github for beginners](https://dev.to/tracycss/git-and-github-for-beginners-po3)
<b>PS:</b> You can apply for the [Outreachy internship remote program](https://www.outreachy.org/apply/). The program is based on contributing to open source projects plus you will have amazing mentors to guide you along the way. All the best in your application.

If you find this post useful share it with your peers or beginners who want to start open-source contribution. You can also buy me coffee. 🙂 

<a href="https://www.buymeacoffee.com/janetracy" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-red.png" alt="Buy Me A Coffee"height="41" width="174" loading="lazy"></a>