The Beginner Developer's Guide to Hacktoberfest 2022

The Beginner Developer's Guide to Hacktoberfest 2022

How beginner developers can contribute to open-source and learn open-source standards during Digital Ocean's Hacktoberfest.

This post was originally posted on my personal blog, thank you Hashnode for the OSS Mentor reward badge on the original post!

Background

πŸ”Έ What is Hacktoberfest?

Hacktoberfest, brought to us by Digital Ocean, is a month-long event in October promoting participation in the open-source software community. In its 8th year, Hacktoberfest invites software enthusiasts of all levels to contribute to open-source projects!

Whether it is sharing your own project for collaborating, making pull requests on open-source repos, organizing an event, mentoring others, or donating directly to open-source projects, Hacktoberfest will both celebrate your efforts and provide resources! Most famously, register for the annual Hacktoberfest challenge, and complete 4 meaningful pull requests on GitHub to win a prize! The prize is either a limited edition T-shirt, or a chance to plant a tree! 🌱

πŸ”Έ Quick review: What is open-source programming?

At its simplest, open-source programming is writing code that's free for others to use, view, and modify. Many open-source projects, such as Linux OS and the Python programming language, have a profound impact on the software industry. Yet their code is available to the public, unlike many major software products, like Windows OS.

Open-source programmers come in many forms. They can be hobbyists simply volunteering their skills, sponsored independently, or employed by companies such as Red Hat to work on open-source projects.

You can learn more about open-source here on Red Hat's website, and check out this awesome list of open-source projects!

πŸ”Έ Why is open-source important for beginner developers?

Beginner developers often express fear, dread, and anxiety over joining open-source efforts, and reasonably so. Contributing to open-source means coding in public and without an advanced skillset, it is absolutely reasonable for a beginner developer to feel uncomfortable. But anyone can make a helpful open-source contribution!

πŸ‘‰ What's most important for beginner developers to understand is that the process of contributing to open-source is vitally important to their learning journey, and it is much better to start early on than to wait until reaching "mastery." πŸ‘ˆ

Open-source skills are NOT like learning another software language or technology stack, but are rather specific to your niche. You do NOT need to aspire to become an open-source developer to benefit from learning open-source skills. Ultimately, open-source skills will improve your code no matter the stack and ensure that you can eloquently collaborate with other coders, as well as optimize your workflow!

Therefore, it is important for beginner devs to get started with learning open-source skills early, and Hacktoberfest provides the perfect environment in order to do so!


Open-source skills overview: Git & GitHub

Note: this is NOT an in-depth guide on how to use Git version control or GitHub, but rather a collection of helpful preliminary tips & tricks for beginner devs participating in Hacktoberfest 2021.

Open-source programming skills are all about structuring your code with collaboration in mind. Utilizing version control systems such as Git to keep track of your code, and platforms such as GitHub to host your code, are essential.

πŸ‘‰ If you are reading this and do not have a GitHub account, please stop what you're doing, open another tab, and make an account! It is required for Hacktoberfest. GitHub is the leading code hosting platform in the world, and as stated in my previous post, it's better to get started with GitHub early!

πŸ‘‰ Additionally, if you are a student, apply for the GitHub Student Developer Pack! It contains a bunch of awesome freebies and discounts to aid you in your learning journey!

πŸ”Ή Git πŸ”Ή

Important Git skills to familiarize yourself with for participating in Hacktoberfest:

  • git set up and basic config
  • basic git commands for snapshotting your code & pushing it to GitHub
  • branching, merging, and the importance of main & feature branches
  • basic git commands for sharing projects
  • understanding the basic overview of a Git workflow (Figure 1)

You can learn all about these on Git's documentation website! Also, feel free to download this super useful git cheatsheet! I recommend keeping this handy while coding for quick reference.

image.png
Figure 1: The GitHub workflow (looks more complicated than it is). πŸ˜‰

πŸ”Ή GitHub πŸ”Ή

Important aspects of GitHub to familiarize yourself with for participating in HacktoberFest:

  • Repositories & how to fork them
  • Documenting repos with README file
  • Reading CONTRIBUTING files before contributing
  • Using a .gitignore file to certain ignore files
  • GitHub issues
  • GitHub discussions
  • Finding open-source projects on GitHub
  • Drafting a pull request (PR)

You can learn all about these on GitHub's documentation website! Although studying GitHub extensively is not necessary for Hacktoberfest, you are likely to encounter these when contributing to open-source projects. What's most important is that you get started and start learning naturally through using the platform if you haven't already!


How to Make a Meaningful Pull Request

Now this is the fun part: actually contributing to open-source projects! As a beginner dev, you may feel limited with what you can actually contribute. But that's okay, there are plenty of opportunities for beginners to contribute! What's important is that you don't end up spamming maintainers with junk pull requests.

Let's learn what an unmeaningful pull request looks like for comparison...

🚫 Spam pull requests 🚫

In 2020, due to many complaints of spam pull requests by open-source maintainers, Hacktoberfest changed the rules to make all participating repos opt-in only. According to Hacktoberfest's FAQ page:

We’ve changed the program to only count pull requests that are made to repositories with a 'hacktoberfest' topic or labeled with hacktoberfest-accepted. Due to this change, it’s no longer necessary for maintainers to opt out of Hacktoberfest.

While Digital Ocean thankfully took action against spam pull requests, spam pull requests are still an issue. Therefore, it is extremely important for Hacktoberfest participants to differentiate between spam-y and meaningful pull requests!

Spam pull requests often add lazy and unwanted changes to docs, comments, and HTML/CSS files. These are problematic because these changes come from a place of being uneducated about the projects standards.

hacktoberfest-spam-listing.png
Spam requests featured in the blog post "DigitalOcean's Hacktoberfest is Hurting Open Source" from Sept. 2020 by Domenic Denicola

Recognizing a project's standards is an essential component of contributing to open-source. If you want to commit minor changes such as these, there are plenty of repos made specifically for that, so there is no need to spam!

🟩 Meaningful Pull Requests 🟩

As a beginner, it may be difficult to find open-source projects within your scope of experience. But don't fret! There are many resources to help you find appropriate projects for you! What's most important is that you learn the workflow of contributing to open-source!

How to find beginner friendly projects to contribute to on GitHub:

  • Search repos with the qualifying hacktoberfest topic tag here.
  • Within these projects, look for issues with the beginner-friendly and first-timers-only tags, these are the issues you want to focus on!
  • Check out firsttimersonly.com for a list of super helpful resources.
  • Hack: check out repos with the awesome-lists topic tag here and find one with the hacktoberfest tag. For instance, this Java Design Patterns repo and this Awesome Open Minds Team repo! These repos will only require you to add an entry to their lists, such as a Java design pattern, or a cool resource. 😊
  • Fun Hack (No Code): check out the jokes topic here on GitHub and find repos with the hacktoberfest topic, such as devjoke, computer-puns, and EverydayFun. These repos simply require that you add jokes to their arsenals! 😎

Once you find a project to contribute to, follow these steps to make a meaningful pull request:

  1. Fork the repo
  2. Clone it to your local system
  3. Make a new branch
  4. Make your changes
  5. Commit your changes with a meaningful message
  6. Push it back to your repo
  7. Click the Compare & pull request button
  8. Click Create pull request to open a new pull request
  9. Respond to any discussions if they arise

For more resources on how to make a pull request, I highly recommend this guide from freeCodeCamp.

Additional tips for following open-source standards:

  • Notice a typo in a repo's documentation? Don't be afraid to open an issue for it.
  • Read the docs carefully. If you are making changes to them, are your docs in the correct format?
  • Take note of any tests. Do your changes pass?
  • Take note of any CI/CD like GitHub actions. Do your changes pass?
  • If you can think of meaningful tests and GH Actions to add, don't hesitate to open a PR! Just make sure they follow the same conventions as the others.
  • Don't commit commented code.
  • Keep commits small, don't make large changes within a single commit.
  • Don't be afraid to open up PRs on your own repos for practice!
  • Look at previous issues and analyze their discussions, are the maintainers open to new features?

Summary:

The process of contributing to open-source teaches valuable skills important to any beginner developer, such as:

  • Optimizing your git workflow
  • Knowing your way around GitHub
  • Technical communication
  • Networking with other developers
  • Collaboration

Any developer can make an open-source contribution! All it takes is some basic knowledge in git, GitHub, and open-source etiquette. While it may be tempting to assume open-source is reserved for the "pros," the reality is that all of those "pros" were beginners at one point too. So it's better to get started sooner rather than later. 😊

Hacktoberfest provides an excellent opportunity for developers of all levels to get involved in open-souce programming. So what are you waiting for? Happy Hacking!


Β