DEV Community

Cover image for How to Contribute to Open-Source Projects
notHanii
notHanii

Posted on

How to Contribute to Open-Source Projects

Introduction

Open source software (OSS) is intimidating to get involved with as a
newer developer but so rewarding once you do. Beginners have a hard time getting
started because projects are complex with problems and code that are difficult
to understand let alone add to. It might feel hard to find ways to contribute
when you're new or have less experience with large codebases. Despite being new,
there are still many ways to get active in open source with any skill level.
In this article, you'll learn the basics about open source software to start
contributing today.

What is Open Source?

Open source software is any software that allows the public to edit, modify,
and improve the codebase. This is made possible by developers that contribute
via improving code quality, bug fixes, performance, documentation, and community
awareness.

Open Source Licensing

Projects that are open sourced use different licenses to denote the level of
freedom and restrictions a user of the code inherits. Licenses are a legal
contract between the user and author of the code for what a user can and cannot
do with the technology. There are many types open source licenses such as MIT or
GNU General Public License that places different rules on a project. It is always
important to know what type of license the project falls under so you are aware
of your rights as a developer or user of the source code. (Note: you can learn
more about open source licenses in this article)

Stakeholders of Open Source

Open source projects have a few different types of members that influence and
improve the source code. These people can be typically classified in the
following roles:

  • Author: Whoever created the repository. This can be an individual developer or an organization.
  • Owner: Whoever has administrative access to the repository.
  • Maintainers: Contributors that drive the repository's goals by assessing discussions, pull requests, and issues.
  • Contributors: People that help add value to a project through coding and non-coding methods.
  • Community Members: People that actively use the project and give feedback to the project.

Anatomy of an Open Source Project

Open source projects come in all shapes and sizes with many sharing the same
overall structure for collaboration. Projects often contain the following
documents to better onboard new contributors and state the project's governance.
Here are common files found across open source projects:

  • README: The file that explains the project's purpose and how new members can use the project.
  • LICENSE: The license that allows others to contribute under certain guidelines.
  • CONTRIBUTING: The file that explains what areas of the project need contributions and the process to contribute.
  • CODE_OF_CONDUCT: The guidelines of how community member should conduct themselves to cultivate a welcoming environment.

Benefits of Open Source contributions

Contributing to open source adds value to every stakeholder invested in a
project. Organizations, developers, and the customers they serve all benefit
from an active open source project. This section will go more into the
benefits for us as developers rather than the other stakeholders. If you like
to know more about the business case, Tobe Langel does an excellent job stating
the benefits of businesses contributing to open source.

Better Source Code

Through contributing to open source, a project's quality improves and makes
lives better for those that use it. This can be through bug and documentation
fixes, listing examples, and feature requests. The better quality adds more
value for stakeholders to invest and use that open source project.

Learn Best Practices

A beginner will pick up new coding skills by viewing and contributing to open
source projects. With early software knowledge, simply reading the code brings
awareness to industry standards that beginners can learn. Developers can see
examples of good coding techniques in projects and start implementing them in
their work. This gives beginners a better idea of code etiquette and standards
that help transform them into more knowledgeable developers.

Connect with Community

Being part of an open source community offers the chance to grow, network, and
mentor/be mentored. You can mutually exchange knowledge that benefits you and
your connections as developers. It's also rewarding to connect with developers
of all walks of life that can be your support network throughout your tech
journey. By connecting, this developer community sees first-hand your skills
and can bring opportunities straight to you.

Build Your Reputation

The job hunt is fierce for new developers and open source contributions provide
a public track record of your ability as a developer. Your ability as an
employable developer is shown not only through the code skills, but also your
soft skills. Working on open source is like being part of a giant team. Even if
your contributions seem small, they demonstrate your ability to work and
communicate on a team. Putting yourself out there in open source gives you a
public space to display the skills necessary to get a developer job.

Ways to Contribute to Open Source

There are many ways to add value to open source projects that you can even new
developers can do. The following section covers some methods to contribute in
brief detail. I have compiled a list of extra resources at the end of this
article that can provide more substantial descriptions and examples of how
each method is done.

Submit an Issue

You can use issues to start discussions on bugs, feature requests, documentation
improvements, and other enhancements. You can ensure contributors and community
members are aware of these ideas or problems by submitting an issue. Before
submitting, it's best to check if someone else has already started that
conversation. If that issue hasn't been done, you can create one that helps
maintainers diagnose and solve the problem.

Do a Pull Request

You can solve known issues or problems found by yourself using pull requests
(PR). Pull requests are the method you can contribute your own code to an
open source repository safely without overriding the main branch. By placing
changes in a PR, the maintainers and other contributors can view the code, make
comments, and changes necessary before your code is added. When contributing
through a PR, the process works like this:

  • Fork the Repository: Make a copy of the repository and clone it to your device. Now you will have a version of the code to play with.
  • Create a Branch: Make a new branch with a name that references issues you are working on or explains the change you want to do.
  • Make the Changes: Work on the new additions or improvements in your branch and test them when possible.
  • Create the Pull Request: Make sure you highlight the differences in your changes so maintainers better know your contribution's impact. Hopefully, the maintainers approve of your code and tada! You've contributed code to open source 🥳🥳🥳!

Non-Coding Contributions

Directly coding isn't the only way to help an open source project. Developers
can contribute just by spreading project awareness and creating opportunities to
support the project. Here are just some of the many ways you can contribute
without coding:

  • Write content that raises awareness of the project.
  • Help set up meetups or social channels.
  • Help create merch or other methods for funding.
  • Sponsor the project.
  • Help organize the project.
  • Help with the project's visual design.
  • Answer community questions about the project.
  • Contribute ideas to Github Discussions.

Addition resources

Many developers and organizations involved in the open source space have better
described the topics in this article in greater detail. Here is a living list
of resources to supplement your open source journey: (Note: This section
will be updated to provided newly suggested or discovered resources to better
educate new developers. Feel free to suggest resources that have helped you in
open source)

Wrapping Up

After reading this guide, I hope you have enough info to confidently dive into
the open source world and widely expand your developer knowledge.

Top comments (0)