Get Started Contributing to JavaScript Open Source

Kent C. Dodds
Kent C. Dodds
glowing orb

Contributing to an open source software project for the first time can be scary.

Am I good enough?

Will my pull request get rejected?

Will my code bring me shame for years to come?

Is it worth the hassle?

This is natural. It’s stage fright!

The first time is always the hardest, and once you get started contributing to open source you will quickly see the benefits and rewards.

Many people are afraid to contribute to open source because they don’t feel up to the task or don't have years and years of experience or enough in-depth specific knowledge.

You don’t need an invitation to participate in open source. If you want one, you are hereby cordially invited!

I’m not a Super Genius. Can I still contribute?

Yes, absolutely! Please do! The so-called “super geniuses” of the world weren’t born writing advanced sorting algorithms or compilers. Everyone needs to start somewhere and it’s never too late. In fact, with the pace that JavaScript is moving, you can be ahead of the curve in just a few years (what was relevant or common even a year ago is becoming antiquated). So there’s never been a better time to get started than now!

You may not feel like a super genius, but you definitely don’t need to be one to contribute to open source. Normally it’s just that first contribution to get you started, then you’re hooked. It doesn’t have to be monumental or anything. Just have a look at my first contribution!

Is Open Source worth the effort?

There are tons of benefits associated with working on open source. It would take at least another blog post to talk about them all. While improving your own skills, open source can give you something meaningful to work on. Maybe it’s something you developed as part of your side-project, but open sourcing it will help others not have to resolve the same problem.

Open sourcing also makes it easier to think about the details of your side-project or work app. By pushing out the pieces into smaller abstractions you’re able to forget about the implementation details of the cool datepicker you made, and focus on using it to push your app forward. With the component published as an isolated library, it makes it easier to understand your component, write tests for it, and reuse it in multiple applications.

Open source is an excellent way to level-up your skills as a developer. It’s handy to point to your open source work as an example of what you’re capable of, or even get a name for yourself from your contributions!). It lets you show your work, instead of just telling people about it. More skills means more opportunity, and by working on projects you enjoy, that opportunity can be more enjoyable too.

Open source is fun, challenging, and totally worth your time and effort.

How do I send my first pull request?

Lots (LOTS) of JavaScript projects are hosted on GitHub. GitHub has a feature called “Pull Requests” that allow you to contribute to a project by making your own copy, coding up some changes, and sending those changes in for review and inclusion in the project.

Every project is different, and some projects have very specific ways they want and/or need you to contribute. It is respectful of everybody’s time and efforts for you to do a bit of research before sending a pull request to a project.

Here’s some basic tips to help you get started:

  • Check for a file in the project. This is generally in the root directory and is instructions from the project maintainer as to how to best contribute.
  • Make sure the project maintainer are interested in the bugfix/feature. File a new issue or comment on an existing one.
  • Talk over the implementation with them to make sure you don’t waste effort.
  • Add tests for your feature or bugfix. I recommend TDD. Maintainers are more excited to accept a pull request that’s tested.
  • Be patient when submitting the pull request. Most project maintainers are doing this in their spare time and depending on the project it can take a few minutes/hours/days to hear back about a PR.
  • If your PR gets rejected, don’t take that personally. It’s a learning experience and is nothing to get upset about. Put in more thought on the problem you’re attempting to solve, and how it fits into the project you attempted to contribute to. Try again somewhere else! It’s ok.

What are some good projects to start contributing to?

Where to start. There are a lot of options to choose from.

What open source software do you use on a regular basis? If you’re using a framework or tool, you are in a great position to look for places to contribute. Every time you end up on StackOverflow because the docs didn’t answer your question, you’ve got an opportunity to contribute to a project. Docs are a huge aspect to any successful open source project, and very often, the coders working on the project don’t have time or energy to spare on docs

“First Timers Only” is an initiative to encourage project maintainers reserve easy issues for first-time contributors. If there’s a project you’re interested in contributing to, point them to that post and ask them to start doing it.

There’s a cool site called up-for-grabs that lists a bunch of projects which have issues they have labeled as “up for grabs” which is an invitation for you to contribute.

Send me a shout on Twitter, and we’ll work together to get your first commit to an open source project!

How do I open source my own stuff?

If you’re ready to contribute your own library or utility to the open source community checkout this series I’ve made to help you get going!