Skip to content

How to code

You’ve got the idea, we’ve got the road map. Let’s make this magic happen.

So you want to contribute? You’ve come to the right place. Whether you’re a total beginner or you’ve contributed before but forgot everything, we’re going to walk you through it. This guide is like your GPS—but cooler, and without the annoying “recalculating” voice. Let’s make your first contribution the smoothest ride of your life.


Step 1: Find Something That Interests You

Browse the Issues (It’s Like Online Shopping—But Free!)

We’ve got issues, but don’t worry, they’re the fun kind. You know, the ones that need fixing! Pick a label that sounds like your jam:

What Should You Pick?

  • Clear description: Can you read it and understand what needs to be done without decoding hieroglyphs?
  • Your skill level: Is it within your abilities? If not, no shame. Go learn it and come back later.
  • Active discussion: If the comments section is lively, you know you’re in good hands.

Claim Your Issue! 🏁

Don’t just dive in like a mad scientist in a lab. Comment first. Something casual like:

Hey folks! I’d love to give this a go. It’s my first time contributing, so I might need some hand-holding. Where should I start looking in the code? 

And wait for some kind soul to point you in the right direction. (You’re not really alone, promise.)


⚙️ Step 2: Set Up Your Development Environment

Prepare Your Playground 🏰

You’ll need to set up your dev environment. Don’t worry, it’s not as bad as it sounds. You can checkout detailed guide here - tech-setup.md

Here’s the abridged version:

  1. Fork the repo – Copy it to your GitHub account. It’s like getting your own pizza instead of fighting over the last slice.
  2. Clone your fork – Get that code onto your machine, because you’re about to change the world with it.
  3. Install dependencies – All the little packages the project needs to run. Don’t skip this. Your computer needs them.
  4. Run the project locally – Is it working? Great, now keep it that way.
  5. Create a new branch – This is your personal work zone. Don’t mess with the main branch—it’s like the holy grail of the repo. Protect it at all costs.

Test It Out

Test it. Run the project. Make sure it actually runs. If it doesn’t, we’re not even at the fun part yet. Let’s fix that first.


🔍 Step 3: Understand the Problem

Read Everything First. No, Seriously. All of It.

  • Issue description: Can you explain it to a friend? No? Then keep reading.
  • Comments: Is anyone else’s idea of a fix better than yours? Don’t be afraid to borrow from others!
  • Related issues: Sometimes, issues are like the five stages of grief. They’re connected in ways you can’t even imagine. (But seriously, check for related issues.)

Explore the Codebase (Be Curious Like a Cat )

You don’t need to understand everything (ain’t nobody got time for that). Focus on where the bug lives. It’s like playing detective, but cooler.

  • Look for files that might be involved in the issue.
  • Check out the tests (yes, they’re important). Are there any related to your issue? Great, run them!

Reproduce the Issue (Bug, You Better Show Yourself!)

  • Follow the steps in the issue. Can you break it? Great, you’re halfway there.
  • Take notes on exactly what happens when things go wrong. If you can’t reproduce it, comment and ask for clarification. Your teammates will be thankful.

Step 4: Plan Your Approach

Break It Down (Start with Baby Steps, You Got This)

Don’t try to fix everything at once. Start small. Chip away at the problem, like a sculptor with a tiny chisel. Can you fix just part of it? Maybe fix that part first!

Find the Nearest Good Code (Copying, but Better)

  • Has anyone else done something similar? Look for patterns in the codebase and follow them.
  • If something works, don’t reinvent the wheel. Just add your own stylish rims.

Write Down Your Plan (You Can’t Remember Everything, Trust Us)

Before you start, comment on the issue and share your game plan. It’ll look something like this:

Here’s how I’m going to tackle this:
1. [Step 1]
2. [Step 2]
3. [Step 3]

Does that seem reasonable? Am I missing something? Let me know!

Don’t just run off into the wild. Wait for feedback. Better safe than sorry!


💻 Step 5: Write Your Code

Keep It Simple. No Need to Rewrite the Bible.

  • Small, focused commits. It’s like building a house with a few bricks at a time.
  • Commit messages: “Fixed bug” is not a message. “Fixed button alignment on mobile” is. Be specific.

Don’t Forget the Code Style (We’ve Got Standards)

Look at the existing code. Mimic it. Follow the formatting, naming conventions, and organization. Think of it like dressing for a job interview. You don’t want to show up in flip-flops.

Tests! Write Them! They’re Like Insurance.

Check if the project already has a test suite (it should). Write tests to check that your changes work and that you didn’t break something else. It’s like adding a safety net—because no one likes to fall.

Document Your Changes (Future You Will Thank You)

You know the drill: comments, docstrings, updating the README if you added a cool feature. If you change something, document it. It’ll help everyone who comes after you (including your future self, who’ll forget all this in a month).


Step 6: When You Get Stuck

Help Yourself First (We’re All Looking for Clues Here)

  1. Read the error message carefully. It’s like your code speaking to you. Listen to it.
  2. Google the error (but don’t click the first Stack Overflow result, trust us).
  3. Check the docs—they’re not just there to look pretty.
  4. Ask AI for help (ChatGPT, anyone?).

When to Ask for Help (It’s Okay to Not Have All the Answers)

If you’re stuck, it’s okay! Here’s how to ask for help:

Hey team! I’m stuck on [specific part] and I’m getting this error: [paste error].

Here’s what I tried:
- [Thing 1]
- [Thing 2]

Any ideas?  
Here’s the relevant code: [link to branch or paste snippet]

🚀 Step 7: Submit Your Pull Request

Double-Check Everything (You’re Almost There!) 🎯

  • Does your code fix the issue?
  • Did you run the tests?
  • Does it break anything else?
  • Is everything formatted nicely? If the answer is “no” to any of those, go back and fix it.

Write a PR Description (Keep It Clear and Snappy) ✍️

Here’s a template for you:

## What This Fixes
Fixes #[issue number]

## What Changed
- [Change 1]
- [Change 2]

## How to Test
1. [Test step 1]
2. [Test step 2]

## Screenshots (if applicable)
[Before and after images]

Reviewers: They’re Your Allies, Not Your Enemies 🤝

If reviewers ask for changes, don’t panic. Ask questions, make changes, and push updates. They’re not picking on you—they’re making your code better!


🎉 Step 8: After Your PR is Merged

Celebrate! (It’s Party Time) 🎉

Pop the confetti! You just contributed to open-source and fixed a problem for real people. Well done, you!

Clean Up (No One Likes a Mess) 🧹

  • Delete your branch.
  • Pull the latest

changes to main. Clean slate, new issue, let’s go!

Keep Going! 🌱

  • Find another issue to fix.
  • Answer questions for other newbies.
  • Keep contributing and keep learning. The world needs more coders like you!

🎯 Common Problems & Solutions

  • Can’t get the project running? Check your dependencies. Ask for help if you’re stuck.
  • Your changes broke something? Run tests. Debug. Don’t panic.
  • Not sure about feedback? Ask for specifics. We’ve all been there.

💡 Pro Tips for Success

Technical Tips:

  • Commit early and often. Small commits are your best friends.
  • Test incrementally. Don’t wait until the last minute to test.
  • Error messages? Read them aloud. You’d be surprised what you catch.

Community Tips:

  • Be patient with maintainers. They’ve got lives outside GitHub.
  • Be specific when asking for help.
  • Thank people. It’s a little thing, but it goes a long way.

And that’s it, rockstar! You’re ready to contribute like a pro. 🌟 Welcome to the open-source community—you’re gonna do great things.