Hacktoberfest -1

 This week the Hacktoberfest event has finally started and I had the chance to contribute to real open source projects. Finding an issue that I can fix took way longer than I thought it would, most of the issues were either taken or they were too complicated for a first time contributor. After a while of searching around GitHub repos with "good-first-issue" labels applied, I found a couple repositories that seemed interesting to me. One of the repositories requested for a new URL redirects in their projects, I thought this was an easy fix, but that it was more complicated than I thought it would be, the original repository had no instruction on how to run and test the application, therefore, I had to leave a comment in the issue asking for instructions. As it turns out a test must be written first before adding any code to the project, and when I ran the initial test before adding anything into the project, I was already getting testing errors, it seems like a challenging one for the first PR considering the amount of time I have, therefore, I decided to go with another repository and save this one for later.

The repository I actually worked on this week is a public maintained code library for data structure and algorithms in different languages, they were looking for someone to produce a bubble sort algorithm code in typescript. This seemed like a good issue for my first pull request, so I have asked to contribute and was soon assigned to resolve the issue. After I cloned the repo, I have noticed that this algorithm was already implemented by someone else in regular JavaScript in the same project, since TypeScript is extended from JavaScript, I have decided to just add in type declarations for variables and reuse the JavaScript version code made by the other contributor to keep the consistency within the project. Since I have never worked with TypeScript on it's own, I had no idea how to compile my program in VS Code, I did some researching on Google and found out that it could simply be done by using the tsc module. After a bit of work, I pushed my code onto GitHub and sent a pull request, during the PR process, I noticed that they have automated testing in pull requests, I was expecting to run into issues since this was my first time contributing to real projects, and as expected it was declined, because I had a console.log call to display the sorted output of the array, it seemed like they don't want me to include that, so I went ahead and deleted that line of code on the same branch and the PR process started over again, and it was once again stopped by a member of the repo because I forgot to edit the README to indicate that this algorithm has been done. After a few rounds of updating, my work was eventually accepted and merged.

This attempt of PR was a huge mess, but the community was supportive, and it was a great learning opportunity, which helps me to prevent making the same mistakes for the future contributions.

Repo: https://github.com/FOSS-UCSC/FOSSALGO

Issue: https://github.com/FOSS-UCSC/FOSSALGO/issues/486

PR: https://github.com/FOSS-UCSC/FOSSALGO/pull/512

Comments

Popular posts from this blog

Working on the Telescope Project

Using Code Formatter and Linter