You don't need to be a senior to contribute to open-source projects
Want to contribute to open-source projects but feel intimidated by the idea? Don't worry! Contrary to popular belief, you don't need to be a senior developer to make meaningful contributions. In fact, getting started can be easier than you think. In this post, I'll share my experience and show you how simple it can be to contribute to open-source projects, regardless of your level of experience. Let's dive in and discover how you can start making a difference today!
Some months ago, I said about my career transition to focus on Swift to be an iOS Engineer, and one of my plans is starting to contribute to iOS open-source projects. But, how can I contribute if I am learning? Well, I am learning, but I have some experience and I know how to start. So, the main challenge was discovered some cool project to contribute.
Finding a project to contribute to
When it comes to finding the right open-source project to contribute to, itâs normal to feel a bit lost at first. However, with a bit of guidance, the process becomes much simpler.
There is a website called Up For Grabs. It contains a list of projects which have curated tasks specifically for new contributors. It can be a good way to start to looking for a project, but I didnât find any interesting project for me. So, I decided to looking for project at GitHub.
Try exploring GitHub and filtering projects based on your preferred programming language, such as Swift for iOS development. I made a search query for âiOSâ and then filter by âSwiftâ language on GitHub interface to looking for projects that catch my interest and have a welcoming community.
Many projects label beginner-friendly issues as âGood First Issueâ or something similar. These issues are perfect for newcomers because theyâre often well-documented and donât require deep knowledge of the codebase.
Consider contributing to a well-known project with an active community. These projects usually have comprehensive documentation and established contribution guidelines, making it easier for newcomers to get involved.
On my search query, I found the Firefox iOS and I tried to explore it. Once you found a cool project to contribute, itâs time to explore available issues.
Exploring available issues
Once youâve found a project that interests you, the next step is to explore the available issues. Issues are tasks, bugs, or feature requests that need attention from the projectâs contributors.
Start by navigating to the projectâs repository on GitHub and clicking on the âIssuesâ tab. There youâll find a list of all open issues, along with their labels, descriptions, and comments.
Look for issues labeled as âGood First Issueâ or similar. These are specifically marked for newcomers and are usually well-documented with clear instructions on how to get started.
Read through the issue descriptions carefully and choose one that aligns with your skills, interests, and availability. Consider factors such as the complexity of the task, the technologies involved, and your level of expertise.
Donât hesitate to ask questions or seek clarification if youâre unsure about something. Project maintainers and other contributors are usually happy to help newcomers get started.
Whatâs next? Make a PR (pull request)? Be kind and request the permission to you solve the issue before to start - this should be interesting, and Iâll explain why right below.
Requesting permission
After youâve found an issue youâd like to work on, the next step is to request permission to work on it. If the issue is not assigned to anyone, you can usually volunteer to take it.
To request permission, leave a comment on the issue expressing your interest in working on it. Be polite and concise. Project maintainers or other contributors will review your request and may assign the issue to you if they agree that youâre a good fit for the task. Donât be discouraged if your request is not immediately accepted â sometimes it may take time for maintainers to respond.
This is not a mandatory step, but it is good to do to ensure that a specific issue is not assigned to more than one person, or you work in an issue that another person is already working on. I remembered a time that I wanted to contribute to Bitwarden project and my permissions was denied because the team had other plans for that issue. You can see it here. Because of this, I believe it is good to be polite and request permission before you start to working on an issue.
Once youâve been assigned the issue, itâs time to familiarize yourself with the projectâs guidelines and get started on your contribution. But let me expose to you some hilarious situation that happened to me: I asked the permission to the maintainer and a few days later I havenât received response yet and other person creates a PR and I lose the opportunity đ. I just start over to looking for another issue and I did the same asking the permission to contribute, but Iâve created a PR on the same day. I was determined to not lose another opportunity.
So, be polite, but be proactive too and send the PR when you finish the work, even the maintainer doesnât respond to you fast.
Understanding guidelines
Before you start working on your contribution, itâs essential to understand the projectâs guidelines. Every open-source project has its own set of guidelines and best practices for contributing, so take the time to read and understand them.
Start by reviewing the projectâs README file, CONTRIBUTING.md file, or any other documentation provided in the repository. These documents typically contain information on how to set up your development environment, coding conventions, commit message guidelines, and the contribution process.
Pay close attention to any specific instructions or requirements related to the issue youâre working on. Some projects may have additional guidelines for certain types of contributions or may require you to follow a particular workflow. If you have any questions about the guidelines or need clarification, donât hesitate to ask.
By understanding and following the projectâs guidelines, you can ensure that your contribution aligns with the projectâs goals and standards, making it easier for maintainers to review and merge your changes.
Setting up the development environment
Once youâve been assigned an issue and familiarized yourself with the projectâs guidelines, the next step is to set up your development environment. Having a properly configured environment will ensure that you can build, test, and debug your code effectively.
Start by creating a fork of the project. This will copy the base repository to your GitHub account, and youâll work on it. Once you fork the project, you can clone it on your machine. But remember: you need to clone the forked repository. Donât clone the base repository because you will not be allowed to make anything this way. This is a good practice in open-source contributions.
Start by following the instructions provided in the projectâs documentation or README file for setting up the development environment. This may involve installing dependencies, configuring development tools, and any of steps to guarantee that youâll configure correctly your environment.
If the project uses specific development tools or frameworks, make sure to install them according to the projectâs requirements. You may need to install programming languages, package managers, libraries, or other software components necessary for building and running the project.
The Firefox iOS project was very easy to configure. They provide a clear and good documentation explaining what are the commands I need to execute to prepare all the environment and how to open the Xcode project. I felt it is a well-organized project.
Once your development environment is set up, youâre ready to start working on your contribution. Open your favorite code editor, create a new branch for your changes, and dive into the code. In my case, Iâve used the Xcode because Iâm in an iOS project.
Testing and understanding the issue
Before making any changes to the codebase, itâs essential to thoroughly understand the issue youâve been assigned and how it affects the project. Start by reading the issue description and any associated comments or discussions to gain insight into the problem and its context.
The issue that I worked was described very well. You can see it here. The main difficult for me was to discover which screen on the app would be affected with the changes. I put some breakpoints on the class mentioned on the issue, and after some attempts I discovered what was the screen impacted.
By thoroughly testing and understanding the issue and what is the location youâll change, youâll be better equipped to develop an effective solution that addresses the problem and aligns with the projectâs goals and guidelines.
Implementing the solution
Again, the issue was described very well, and I was not difficult to understand what I need to do. But it depends on the project and the task youâll work. Usually, issues labeled as âGood First Issueâ are issues with good descriptions, and you shouldnât have any major problems dealing with them.
The issue that I worked was very easy, and the authorâs added a code snippet with the code that I needed to replace. They were very kindness and the issue was very easy, but it was a good start for a person looking to contribute to an iOS project.
Testing and validation
Test and validate are crucial steps in the contribution process to ensure that your changes meet the projectâs requirements and standards. Sometimes youâll need to implement some unit tests to validate the new behavior. Other times youâll just need to make some manual tests. In the issue that I worked, it was necessary to put the screenshots before and after the changes on the PR, and this was enough in this case.
Creating the pull request
After implementing and testing your solution, itâs time to create a PR to submit your changes for review to integrate it into the projectâs codebase. Begin ensuring that the branch where you made your changes is up-to-date with the latest changes from the main branch of the base repository. Large projects usually have a lot of PRs every day, and itâs common to start our solutions and new code are merged into the repository when weâre working in an issue. Itâs a good approach to synchronize your forked repository with the base repository and make a rebase
of your branch. Today, there is a button called âSync forkâ on GitHub. This is amazing and turn this process very simple, but if you use other system or prefer to do this using the command line, you can follow this:
First, add the upstream link of the base repository if you havenât done this yet.
Now fetch the changes.
After this, you need to merge the upstream changes to your repository. Change to the main branch and make the merge.
Now the main branch of your repository is totally updated with the base repository. Change to the branch you are working and make a rebase with the main branch.
Now youâre prepared to make the PR. Usually the above steps arenât mandatory, but are good practices. If you want to understand more about the remote upstream
and the rebase
process, you can take a look in the Git Push and Git Rebase posts.
Now itâs time to create the PR! To do this, start pushing the branch youâre working to your remote repository.
I wonât describe how to create the PR to the base repository. Instead, Iâll suggest to you to read the GitHub documentation explaining how to create a PR from a fork. It is an amazing documentation.
Provide a clear title and description for PR, summarizing the purpose of the changes and providing additional context, such as an overview of the issue or feature being addressed and the approach taken to implement the solution. If the PR addresses a specific issue, reference the issue number in the PR description to automatically link the PR to the issue. The Firefox iOS repository contains some name conventions for issue title and references inside the description, so itâs important to understand the projectâs rules.
Review your changes one last time to ensure everything looks good and that you havenât missed anything. Double-check for any potential errors or unintended changes. Once youâre satisfied with the changes and the PR description, submit the PR for review. Keep an eye on the PR for comments, feedback, or requests for changes from reviewers.
If youâre curious, here is the PR that I worked.
Conclusion
In conclusion, contributing to open-source projects is not exclusive to senior developers. With the right mindset, willingness to learn, and attention to detail, anyone can make valuable contributions to projects theyâre passionate about. By following the steps outlined in this guide, you can embark on your open-source journey, gain practical experience, and make a positive impact on the development community. Remember that every contribution, no matter how small, contributes to the collective growth and improvement of open-source software. So donât hesitate to get involved, share your skills, and become part of the vibrant open-source community.
So, what are you waiting for? Donât be afraid. Let go of fear, shame, and the impostor syndrome. I hope this post inspires you, and Iâd love to see in the comments which PR you contributed to.
Happy coding!