DEV Community

Marco Pasqua
Marco Pasqua

Posted on

Second PR of Hacktoberfest

Hi everyone, I recently made my second PR of Hacktoberfest. I addressed the issue in my recent blog post titled Second Issue of Hacktoberfest, but I'll summarize here.

What was the Issue?

I found a repo called calculator for everything. The main goal of the repo is to have a calculator for every equation out there on one website, whether it's for computer science, math, chemistry, etc. I liked this idea and noticed that there wasn't a large amount of physics calculators. So I wanted to create a density calculator, since it's a commonly used formula. I also, noticed that the README wasn't updated to include any of the currently implemented physics calculators. So the issue that I made to the repo owner would create a density calculator for the repo and make the necessary updates to the README to mention the implemented physics calculators.

Working on the Issue

Once I had the issue approved and assigned to me by the repo owner. I got to work. I forked the repo, cloned it, and made a branch of it for my work. Fortunately, the repo owner made a folder and file for me already and addressed me that I should be housing my work there. So I got to work.

Working on the issue was pretty simple, I wanted to keep some consistency between each calculator that was implemented. To do this I modelled my calculator after some of the other ones, by taking a look at their code for the design. Once the look of the calculator was done, all I had to was implement the formula for it, which was very simple. After I finished this, I noticed that some calculators had an info file explaining what their calculator does. I liked this idea and made one of my own. I did this in a separate file and imported it to my main calculator file to keep my code clean. My info file essentially explains what density is, what value the calculator returns (kg/m3) and what each variable stands for. I made sure to make two separate commits of these files then I moved on to the README.

Updating the README was also simple, I looked through the physics calculator folder and saw which calculators were currently working. For ones that were, I decided to write them down in the repo as I thought it was best to let the user know of the ones that were currently working, and not the ones that are still being worked on. Once that was done, I made a commit of my work. This was enough for me, but I wanted to keep my commits clean so I rebased them all into one commit and made an amend to have the commit I squashed talk about the work that was done. I then pushed this and made a PR.

My Second Pull Request

When making the pull request I had to follow a template set up by the owner, which included having two screenshots of the input and output of the calculator. This was easy enough, after I got the two screenshots I was able to create the PR. After I that I had to wait for the repo owner to take a look at it and see if there was anything I needed to improve. Thankfully, he loved my work and gave my PR a admin-appreciation label. I'm glad he liked what I did, it gave me a boost of confidence to maybe take on some larger repos for Hacktoberfest. After all, I now only have 2 more PRs to make before I'm done, and I planned on working on some bigger name repos out there.

Overall

I really enjoyed working on my second PR. I have already made my third issue, which is on the same repo as this one. In this issue I wanted to correct some grammatical errors and spelling mistakes that I came across while reading the documentation of the project. The reason being is that correcting these issues should improve readability for everyone looking at the documentation. I'm currently waiting on this issue to be approved by the repo owner, but since I'm waiting I have the time to look at some larger repos to make my last PR to. I'm looking forward to what issues I can find on the larger repos, as well as making my last 2 PRs to complete Hacktoberfest. Thanks for reading this far! I'll catch you all in the next post!

Top comments (0)