cs3281-AY1617S2-website

CS3281&2: Thematic Systems Project I & II

Contributing to Open Source: freeCodeCamp

Introduction

freeCodeCamp is a friendly open source community where users learn to code. It features a website where users can work through self-paced coding challenges, build projects, and earn certificates. Their goal is to aid the public in building job-worthy portfolios of real apps used by real people, while helping nonprofits. Established in 2015, it has grown to have over 800,000 registered users, with almost 400,000 being active. You can read up more on freeCodeCamp here.

Note: While I was contributing to this repository, freeCodeCamp was in the process of moving to its beta site. All PRs made to the repo currently aren’t live on the main site, but will be once beta is released.

Contributing to freeCodeCamp

The site itself is written in mostly Javascript, CSS and HTML, so some knowledge in web development is needed to contribute to this repository. freeCodeCamp is geared towards teaching users many front-end frameworks, so ideally some experience with them would be useful. Most of the content is contained within the code challenges, which are represented by JSON objects. This makes the codebase very modular and easy to make changes without having to understand the entire system. Minimally, familiarity with JSON is required, as all challenges are formatted that way. The link to to the repository can be found here.

freeCodeCamp treats their Github repository as a second avenue for their users to pick up software development skills, and they even have a course for using Github. Users are thus encouraged to make their own contributions to the site, and the moderators are very helpful and beginner friendly, as they want to encourage first timers to contribute to open source. The procedure for setting up the working environment and making a PR is clearly documented here, along with places to seek help if one gets into trouble.

Summary of contributing workflow

Here is a short summary of the contributing workflow:

  1. Find something to work on:
    • Suggest a feature or bug you’d like to fix. You will be given a short checklist to fill out with information such as description, browser info, screenshots, etc.
    • Find an existing issue to work on. Recommended tags are help-wanted and first-timers-only. Leave a comment saying you’d like to work to it.
  2. Wait for the go-ahead from one of the core members.
  3. Create a fork of the staging branch and make changes.
  4. Test changes locally and ensure all tests pass.
  5. Create a PR against the staging branch. You will be asked to fill in a checklist. Three important things to ensure:
    • Your branch name must start with fix/, feature/ or translate/
    • You have only one commit (squashed)
    • Branch targets the staging branch
  6. The PR will be labelled as QA. Wait for a member to review.
  7. Upon review:
    • If the PR is accepted, it will be automatically merged and closed.
    • If the PR is rejected, you are given a list of changes to make. Make the changes, and use git commit --amend and git push --force to push them (Don’t make a new commit)

What I’ve learnt

Don’t be afraid to share your suggestions.

One main deterrent that stops many programmers from contributing to open source is that they’re afraid of sharing their code. Creating an issue and a PR usually leaves you open to other coders to comment and judge your work, and that’s never a nice feeling. While there are a few unsavory people who might be overly judgemental, there are also many who are willing to guide you and offer a helping hand. The point of open source is to encourage coders to share their code (and for free), so people aren’t as critical of mistakes as you would think. Even though a few of my PRs had a lot of things that need fixing, I felt that most of their criticisms were fair, and they pointed them out respectfully and without ill intent. I can safely say that contributing to freeCodeCamp has helped me improve my coding skills.

Not every contribution has to be a large one.

I was actually quite surprised at how receptive the admin team was in responding to suggestions, even for minor ones like minor wording errors. For any large project or repository, many things can be improved, and even the small things can make the project a little better. I find that a common belief amongst many coders nowadays is that it’s not worth wasting time on things that aren’t broken, and that it’s better to focus on the bigger things like new features and breaking bug fixes. While true, it doesn’t make little fixes any less beneficial, as these add polish and quality to the code base in general. These really help in improving the user experience, both for users and developers alike.

Learn to learn.

It’s hard to get into a new project. The first step, setting up the project and understanding the codebase is usually the hardest, and the problems you encounter are usually unique to your system and not documented. It’s frustrating, but I think working with external open source projects offers an experience that a comfortable school project environment would never provide. You learn how to troubleshoot, look for help, and solve problems on your own. These are all vital skills in learning new how to operate new frameworks and projects, and are very applicable to programmers since new technologies pop up all the time. I usually say that a good programmer isn’t one who’s proficient at what he’s used to, but rather one who can be given something he has never used before and instantly learn it. Open source offers good training in this aspect since pretty much every single repository uses a different stack and workflow that needs learning.

Other small notes/interesting details:

Comparison to NUS-OSS

What’s interesting about freeCodeCamp and NUS-OSS is that they share similar goals. Both are repositories intended to introduce fresh coders to contributing to open source. As such, many of their practices can be applicable to NUS-OSS. For this section, I will be talking about freeCodeCamp in contrast with PowerPointLabs, which is the OSS project I’m working on.

Conclusion

freeCodeCamp is a great place for beginners to open source to start contributing. It offers friendly moderators, many avenues to seek help, and a well documented contribution work flow to get started. The code base is also very easy to get into, and doesn’t require a lot of knowledge of javascript or HTML to contribute to. I have learnt a lot from contributing to freeCodeCamp, and I would strongly recommend freeCodeCamp as a repository for beginners to open source to start with.