Picture this: it's a few years ago, and I'm sitting at my desk, staring at my computer screen. I've always had this nagging feeling that I should contribute to open-source projects, but I just can't seem to find the motivation. Every time I try to start, I get overwhelmed and lost in the middle of a large project, wondering "Now what?"
That's when I learned about Outreachy from past interns who wrote about it. Despite my doubts that I would be accepted, I decided to take a leap of faith and apply. And you know what? It was one of the best decisions I've ever made.
If you're in the same boat I was, feeling lost and unsure of how to get started with open-source contributions, let me tell you about Outreachy and how to apply.
What?
Outreachy is a paid internship that encourages people to contribute to open-source projects with experienced mentors from the project you choose to work with. You can find more information about it here: https://www.outreachy.org/
Why?
Contributing to open-source is a great way to learn how things are done in large projects. You become familiar with various ways to handle the same problem, learn to use Git with large teams, and, more importantly, receive code reviews from experienced contributors.
How?
Outreachy has two rounds per year, with the second round in August. I applied in the May round, which starts in February. The initial application process involves filling out personal information and talking about yourself. A month later, I received an email stating that my initial application was approved, and I had one month to make at least one contribution to one or two projects of my choice to be accepted into the internship.
One Month, One Issue
I worked as an iOS developer for three years before the internship, so I was already familiar with Swift and knew that I wanted to contribute to Firefox. Next came the contribution itself. I had a month to make one contribution, but I wasn't stressing myself out; I was only thinking of making it happen.
I planned the month as follows:
First Week: Clone the project and build it on my device.
Firefox has helpful documentation for contributors that encourages people to contribute to their project. I followed the steps mentioned in their documentation, and the application build succeeded.
Second Week: Find an easy-to-contribute issue and understand the problem.
Every project listed on Outreachy's website has its documentation, which provides everything you need to know about that project. Your mentor and their email, the community chat of that project which you can have access to and ask about anything, the documentation of how to clone, build, and search for the labels of the easy-to-contribute issues in the project. So, it wasn't that hard with all of these resources and ways to learn.
Third Week: Find the file I need to make the change in and make the contribution. After choosing an easy-to-contribute issue and understanding it, I tested it myself (since I already built the project successfully). I selected this issue: Issue #13538, which is related to cell height with a very long text.
I searched for "Sync and Save Data" on the screen because I thought that would be unique and won't be repeated on many screens and will lead me to the file I need to make the change on. Then, I searched for the table view in the file, changed the color of the cell to make sure that I reached the right file, and my search was successful, and I'm in the right file. Next comes understanding the root problem and fixing it.
TL;DR
The issue was that every time the text is too long in the cell, the cell won't contain it. My first thought was that the cell did not have a dynamic size to be adjusted to different content heights, but that turned out to be incorrect because I found a cell that could be adjusted to long text content "I filled them with different text." Looking into that cell, I found that it had a different cell style (UITableViewCell.CellStyle.default), and the cell with the issue had a UITableViewCell.CellStyle.value2.
After some search on Stack Overflow, I discovered that when UITableViewAutomaticDimension is enabled, the system calls systemLayoutSizeFittingSize, which is responsible for calculating the cell height and adjusting it according to the content of the cell. It ignores the height of the detailTextLabel in its computation. As a result, the cell height is always going to be too short. I found a workaround to fix that issue that calculated the detailTextLabel height, and it worked 🤩
Pull Request #13750
Last Week: Record the contribution in the application.
The final step is to push your changes and make the PR. After reading the project's documentation on how to contribute, I named the pull request (PR) according to their guidelines and submitted it for review. Whether the PR is merged or not, I can include the PR link in the final application form, along with a description of the issue and solution, and submit the final application.
Supportive mentorship
The mentor of the project was really helpful and fast to reply. Once I made the PR, I found her giving reviews on my code, and once it was fixed, chatted with me if I submitted my contribution to the final application, that encouragement and support were instrumental in helping me gain confidence and stay motivated throughout the project.
A Small Tip for Big Improvements
Here's a handy tip to polish your writing skills: after answering an essay question, try using Notion's Ask AI feature to improve the grammar and rephrase your sentences for enhanced clarity. This way, the reviewer of your application form can easily understand your responses, and you can present your thoughts and ideas in a more professional and polished manner. Don't forget to leverage tools like Ask AI to improve your writing. It's quick and easy and will help you showcase your skills in the best possible light.
And that's it! With determination and support, I made my first open-source contribution. If you're feeling stuck or unsure of how to get started, don't worry - there's a whole community waiting to help you.