Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 30, 2020 05:14 pm GMT

Open Source contribution for beginners

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 project 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

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.
Close source software is a software that has source code that only one person, a team or an organization, that can change, edit or share between 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 reason of what I have learnt 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 rising an issue or contributing to solve 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, developer mozilla 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 on collaboration.
    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 is 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, to get the basics.

Resources to learn git include:

Learning Github resources

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 issue, beginners-friendly.

Websites that show you beginner friendly open source projects
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 add rules of contribution. It's always good to understand what the project is about and 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 what you how to respectful as you are contributing. After understanding the rules, go and checkout 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.

issue-page

3) Read the issue carefully

Read the issue and understand what is required from 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.

issue-comment

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 explains 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.
Example my 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 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

If you want to see how clone and create a branch remotely on your computer check out my first post. I have created a detailed steps to follow from using git to clone the project to creating a pull request.

5) Creating a branch

For the 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.

create-a-branch

6) Let's create the issue template

I will show you how I solved the issue to give you an idea on 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.

part-1-2

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.

part-3

8) Creating a bug report and feature request

Already github has created the report you you, just click on the preview and edit button.

part-4

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

part-5
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.

proposed-changes

  • 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.

commit

Choose the branch you created don't selected 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 know create a pull request.

pull-request

Congratulations you created your first pull request.

The owner or maintainers will now review your changes and see if they want to merge it to the project. Be proud you have learnt something new, you are amazing.

Congratulations gif

Conclusion

This was long, woooo!!! But I hope you learnt something new. If you want a step by step guide to clone the open source repository on your computer and get basic git command guide, check out my post on Git and Github for beginners

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.

Buy Me A Coffee


Original Link: https://dev.to/tracycss/open-source-contribution-for-beginners-1mhe

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To