DEV Community

Cover image for Making Your First Contribution to Open Source
Ritam Debnath
Ritam Debnath

Posted on

Making Your First Contribution to Open Source

Open source software powers a huge portion of the Internet and many applications that we use every day. Massive projects like Linux, WordPress, and Firefox are all open source, as well as popular projects like React Native, Angular, and Kubernetes.

Even if the application that you’re using isn’t open source, chances are that some of its downstream dependencies are. For proof of how interconnected open source packages have become in today’s web development, look no further than the story of how the removal of one 11-line open source package took out web development projects around the world:

So we know that open source software is ubiquitous, but where does all of that open source software actually come from? Open source projects arise from the efforts of thousands of maintainers and contributors, many of them volunteers. Anyone can download and use the source code of an open source project — and anyone can add their contributions to that project too. At BigCommerce, we have a number of open source projects that we maintain, including Cornerstone, Stencil CLI, and BigCommerce for WordPress. Those projects are maintained by our engineering teams, but they’re also open to contributions from external developers.

If you’re curious about open source, but you’re not sure where to begin, this post is for you. We’ll talk about what open source means and run through a few of the reasons you might want to consider becoming a contributor. Then, we’ll outline the steps you can take to make your first contribution. Along the way, we’ll gain insight from our friends at Brand Labs, BigCommerce partners who are active in open source, with core contributions to Cornerstone and Stencil CLI.

What Is Open Source?
Open source software has a few key characteristics:

  1. It’s free to use
  2. The source code is accessible
  3. Developers are free to modify the source code for their own purposes, including for commercial use

Some open source projects are completely not-for-profit and run by volunteers. Others are offshoots of proprietary software products, like the open source repositories maintained by BigCommerce. Most, but not all, open source projects accept contributions from the public.

The concept of open source was built upon ideas around free software dating back to the early days of software development, but coalesced into a movement with the founding of the Open Source Initiative in 1998. Today, there are thousands of open source projects run by maintainers from around the world.

There are a number of approved licenses that open source software projects can use. Many BigCommerce projects are licensed under the MIT License, which grants users the ability to use, modify, and distribute the software free of charge.

Advantages of Open Source Software

The first advantage we’ll discuss won’t be surprising — open source software is free, which is a definite plus. But, that low cost to entry can also be a powerful driver of technological innovation. A prime example is Linux, which powers a large portion of web servers. According to W3Techs, Unix web servers power about two thirds of sites on the internet, and many if not most of those are running Linux. Why is Linux so dominant? It’s simple — a Windows server license costs money while Linux is free. Robert DeBoer, Software Engineer at Brand Labs, sums it up: “Linux is this thing that you can’t live without and somehow it’s free. And it’s great — I can keep installing server after server after server.” That ability to scale up infrastructure at a low cost was a key contributing factor to the spread of the internet.

Another huge advantage for developers is that it saves time and effort. Open source software fits directly into the patterns that many modern software developers use to build out projects. Instead of building something completely from scratch, it makes sense to look for a framework or an existing project that provides a foundation, a starting point, that you can modify to fit your specific needs. That allows you to build upon existing software in a modular way instead of having to reinvent the wheel with every new project. “Open source software gives you an opportunity to grab something and own it without having to spend all the time writing it, and there’s a certain benefit to that,” Robert says.

Why Should I Contribute to Open Source?

You don’t have to contribute to open source software to benefit, but there are lots of reasons why you might want to dive in and get involved. Whether you’re interested in stretching your skills as a programmer, want to improve the software that you already use, or would like to connect with a network of like-minded individuals, contributing to an open source project can get you there.

1. Further your career.

In addition to your portfolio, open source contributions are a publicly visible, tangible indication of your skills — and that’s something prospective employers look for. Even if you’re not on the market for a new position, making contributions to open source projects is a great way to exercise skills outside of your day job and stretch yourself by solving new problems. Beyond that, open source contributions are a signal that you’re passionate about the technology you work with, and that’s a valuable quality to future employers and teammates.

2. Understand the inner workings of a project.

Diving into the source code is an essential way to understand a new technology on a deeper level. Carson Reinke, Development Manager at Brand Labs, explains how this concept influenced his entry into open source projects. “It’s really when I got into more Ruby and Rails development that I started embracing the open source aspect. When there’s a failure in the documentation, you just go look at the code. And it really kind of clicked with me. I’m like, ‘Well, I’ll just go look at how it works and really understand it that way’.”

3. Make a project you use better.

Many open source contributors make their first contribution because they see an opportunity to make a project that they already use better. Maybe they fixed a bug or added a useful new feature — in that case, submitting a pull request so the broader community can also benefit just makes sense.

This kind of crowd-sourced development is one reason why many open source projects are so robust. If many developers and organizations have projects that depend on an open source product, they have an incentive to make sure that the quality of that dependency is high. Not to mention, the more developers who are scoping out bugs and adding new features, the more can be accomplished and the better that project will be.

4. Connect with a community.

Getting involved with an open source project can be a great way to make connections with fellow collaborators. Many open source projects have thriving communities around them. For example, WordPress boasts over 1500 meetup groups around the world, with 700,277 members. While only a portion of those members are actively contributing code to WordPress, the WordPress community emphasizes the fact that everyone has something to contribute, and you don’t have to contribute code to make an impact. You can help with documentation, translations, and support tickets in addition to patching bugs.

5. Give back.

For some developers, contributing to an open source project is a way of paying credit to a software product that’s being used for free. “If you use a project, you really need to contribute to it,” Carson says. “That’s the debt that you owe to this project. That’s the licensing fee.”

It’s easy to begin taking open source projects for granted, but it’s important to keep in mind that many open source projects are managed by volunteers and sustained by donations. Providing your time and skills to keep a project going is the best way to make sure it’ll be there to use in the future.

Making Your First Contribution

Now that we’ve reviewed a few of the reasons to contribute to open source…how do you get started? If you’ve never contributed to a crowd-sourced project before or you’re new to GitHub, making your first contribution can be intimidating. Not to mention, it can be difficult to know where to begin. How do you find your niche to begin making a difference?

Something to keep in mind is that you don’t have to take on a huge task to have an impact. “What really pushes these projects along at the end of the day is not the one or two giant contributions. It’s the hundred small contributions that happen every day that really prop it up,” Robert says. We couldn’t agree more, and in the next section, we’ll discuss how you can choose the right project and task, and we’ll go through the process of submitting a contribution step-by-step.

1. Pick a project.

For many people getting started with open source development, the most obvious place to start is with a project that you already use day to day, but that doesn’t have to be the case. Other good reasons for choosing a starter project might be that the project has an active and supportive community around it, or it’s a technology that you want to learn more about.

If you’re new to open source and a newbie developer, choosing a project that has a lot of resources around it is a good idea. Whether that’s great documentation or a forum full of active users, you won’t be alone as you work through a problem.

If you want to browse projects that are actively looking for contributions (including by first-timers), up-for-grabs.net is a site that lists repositories requesting help from outside developers. Codetriage.com is another great resource to discover new projects. It’s a collection of open source repositories that you can filter by language. You can also sign up to have a new open issue emailed to your inbox every day so you can be sure that you don’t miss your opportunity to get involved.

2. Find a good first issue.

So you’ve found a project that speaks to you. But what’s the best way to identify which issues need your attention — and fit your skill set?

Some maintainers will mark issues that are suitable for new contributors with labels like good first issue or first-timers-only. A help wanted label is another good indication that maintainers are looking for the community’s help with an issue. You can filter issues by label in GitHub to get a view of all open issues that have been marked specifically for first time contributors.

If you’re selecting an issue that hasn’t been marked help wanted or good for first time contributors, it may be a good idea to comment on the issue to let the maintainers know you’re interested in helping out. The last thing that you want is to spend a lot of time working on a solution that the project maintainers aren’t interested in merging. Bug fixes and documentation errors are usually a pretty safe bet, but it’s always a good idea to confirm that the task you’re taking on is in line with the community’s vision.

3. Check project requirements.

Most projects will have their own set of guidelines for how contributions should be submitted. The first thing to check is the project’s license. While most open source licenses won’t cover policies on accepting contributions from the public, it is a good idea to review the software’s terms of usage in case you wish to modify or distribute the project.

The next thing to check is the repository’s CONTRIBUTING.md file. CONTRIBUTING.md contains the project’s contribution guidelines. A good set of contributor guidelines will outline the kinds of contributions that the project does and does not accept, templates for submitting pull requests or issues, and a style guide, if the project uses one.

4. Submit a pull request.

Once you’ve identified the issue that you want to tackle and put together a solution, it’s time for the main event — submitting your change to the project as a pull request. But if you’re new to GitHub, that can be an intimidating process.

The first step is to fork the project — basically, copy it over to your own GitHub account — and then clone the repository to pull down a local version to your machine. On your local copy, create a branch where you’ll make your edits. When you’re finished making edits, commit the changes and push them to your remote repository in GitHub. Then, navigate to the remote repository in your GitHub account and you’ll see a green Compare and pull request button. The next screen will autofill the base fork and branch (the one that you want to merge into) as well as the head fork and branch (the one you created, containing your proposed changes). Fill in a comment with some information about the changes you want to make (the project may even have a specific template for you to fill in), and then click the button to create the pull request. This sends your proposed changes to the maintainers to review and merge into the core project.

When you go through the process of submitting a pull request for the first time, it can feel like all eyes are on you, and the prospect of making a mistake can be nerve-wracking. For that reason, first contributions.github.io provides a test repository that new contributors can use to practice submitting a pull request. Consider it a safe zone to get comfortable with the Git workflow used to contribute to group projects.

5. What if my PR isn’t merged?

If all goes according to plan, the maintainers will merge your change and you can celebrate your first open source contribution. But what if the maintainers request edits to your pull request…or even decline to merge it?

It’s disappointing to work on a contribution only to have the maintainers say no, but open source projects also have to set some guardrails around what they will and won’t accept to keep the project on track. It’s okay to ask follow-up questions about why the decision was made, but at the end of the day, the proposed change might not be a good fit for the project or might not be general enough to support a wide variety of use cases. But, that doesn’t mean that your use case isn’t valid or that others might not benefit. You can always create a fork and take the project in your own direction — that’s the great thing about open source.

Conclusion

Getting involved with open source opens the door to a world of exciting projects and new connections, and there have never been so many resources geared toward beginners. In this post, we’ve examined some of the reasons why you might want to learn more about open source and some of the first steps you can take to get started.

As longtime open source contributors, the Brand Labs team had a few parting words of advice for new developers getting started. Carson emphasizes that contributing to open source is a two-way relationship, and it’s important for developers to see themselves as part of the solution when reporting issues: “When people are new, they almost think that it’s like a customer support system. They fill out an issue and they’re like, ‘Well, I’ve reported this problem, where are we at,’ not really understanding that you’re providing assistance to this project by recording the issue. And, really, you need to have due diligence and fill out the issue template, really look into it, and even try and solve this problem. It’s not a Customer Support Portal — it’s an open source project that everybody can contribute to.”

Top comments (0)