Sitemap

My First Open Source Contribution: Sugar Labs

3 min readApr 4, 2025

--

Press enter or click to view image in full size
First pull request

Introduction

Open source always seemed like a distant world to me — a place where experienced developers collaborated on massive projects. I never thought I could contribute until I discovered Music Blocks, a project that perfectly blended my two passions: coding and music.

This is the story of my first open source contribution— how I navigated a large codebase, solved an issue, and gained the confidence to keep contributing. If you’re new to open source, I hope this post inspires you to take that first step!

Finding the Right Project

I was searching for something that combined programming and music when I stumbled upon Sugar Labs’ Music Blocks. It’s an incredible tool that lets you create music using block-based programming — perfect for beginners and fun for experienced coders.

After playing around with the app, I realized: Why not contribute to it?

I joined their developer community — a decision that changed everything.

The First Issue: A Small But Meaningful Fix

As a beginner, I wanted to start with something simple. I found an issue that seemed approachable:

Problem: The ”alphabet pitch block” (which lets you convert letters like “G” into musical notes) was only available in Advanced Mode. The request was to make it accessible in Beginner Mode as well.

At first glance, it looked like a small UI change, but for someone new to a large codebase, it was a daunting challenge.

The Hunt Begins: Navigating a Massive Codebase

Night 1: The Endless Scroll
- I cloned the repo and started searching for the block.
- With thousands of lines of code, I had no idea where to begin.
- I spent hours scrolling through files, hoping to find something related to the “G” block.
- No luck.

The Next Morning: Obsession Kicks In
Even during college lectures, my mind kept circling back to the issue. I was determined to solve it.

Night 2: The Breakthrough
When I got back, I resumed my search. This time, I stumbled upon a function called beginnerBlock().

Aha! This function controlled whether a block appeared in Beginner Mode.

I tested my theory by setting this.beginnerBlock(false) for a random block — and just like that, it disappeared from the UI.

Get Om Santosh Suneri’s stories in your inbox

Join Medium for free to get updates from this writer.

Now I knew: To fix the issue, I had to find the “G” block and set this.beginnerBlock(true).

The Final Challenge: Finding the Elusive “G” Block

I kept searching but couldn’t find anything related to the pitch block in the main directories.

Then, by sheer luck, I discovered a /blocks folder — and there it was!

Inside PitchBlocks.js, I finally found the alphabet pitch block definition.

The Fix? Just One Line!

I added :

this.beginnerBlock(true);

…and BOOM! The block now appeared in Beginner Mode.

Lessons Learned

1. Patience is Key — I could have given up after the first night, but persistence paid off.
2. Reading Code is a Skill — The more I explored, the more I understood the project’s structure.
3. Small Wins Build Confidence— Solving this tiny issue gave me the confidence to tackle bigger problems.
4. Don’t Rush for Help — Struggling through it myself taught me more than just asking for solutions.

The Joy of My First Merged PR

When my pull request was merged, I was ecstatic. Seeing my name in the project’s contributors list was an unforgettable feeling.

Advice for New Open Source Contributors

- Start small — Fix a tiny bug or improve documentation.
- Explore the codebase — The more you read, the more comfortable you’ll get.
- Be patient — Struggling is part of the learning process.
- Celebrate small wins — Every contribution matters!

Final Thoughts

My first open source contribution was challenging but incredibly rewarding. If you’re hesitant about contributing, just dive in. Find a project you love, pick an issue, and start exploring.Who knows? Your first PR might be just around the corner.
Have you made your first open source contribution? If not, what’s stopping you? Let’s discuss!

Music Blocks GitHub: https://github.com/sugarlabs/musicblocks

My First Pull Request: https://github.com/sugarlabs/musicblocks/pull/3979

Happy Coding!🚀

--

--