How I completed Hacktoberfest 2020
Tags: hacktoberfest, opensource, github, digitalocean
Published: 2020-11-01 11:36:07

Hello everyone, my name is Tharindu and I'm from Sri Lanka. I currently work as a Software Engineer at Arimac Digital. 

So, this is my first ever post on this platform and I hope you won't mind if I'm too informal or not in order here. And I got to know about this platform from #hacktoberfest, I fell in love with it.

### Background

When I came to know about this year's #Hacktoberfest, I was so hyped up 'cause of two reasons. One is that I've never taken part in a #Hacktoberfest. Two, I love SWAGs. 

So, I got to work. Watched so much videos regarding #hacktoberfest and open source community. and I joined online sessions that I got so much of knowledge from and I got to know many people. I talked to them directly and they taught me how the community works. Even there were some local meetups too. However, everything was online (due to Covid19 ). So, from all these I collected so much knowledge and started contributing. 

###Start finding issues

I learned that I can find GitHub issues with the label of #hacktoberfest, and I looked through them until I find an issue that's in my expertise. My familiar technologies were #Javascript, #php, #java and some #html and #css. So, I found so many issues but they looked so complicated and that's where you could get discouraged. Honestly it's not that complicated. You can just comment on the issue and, someone, may be the issue author or the repo owner will reply to your comment with a clarification. And most of the times they help you even teaching you how to solve it. So, all you have to do is write some decent code. There are guidelines that you should follow. They will mention about the contribution guidelines in the repo readme file. 

### Contributions

I managed to find around 8 issues that's within my knowledge and I asked the repo owner if I could take this issue and start developing a solution. Most of them were really happy about it and assigned me the issue so that I could work on that.

First, you should fork the repository into your GitHub account and get a clone of that forked repo to your computer. Create a new branch with a name that describes the issue you're working on and start developing the solution. 

Add commits with a proper description and that also get appreciated by the community. Once you're done with the solution push the code to the remote rep forked in your GitHub and you can then create a PR (Pull request). If your pull request doesn't have any conflicts or issues, the repo owner will merge your code in the original code. So, that's the win!

This video explain this entire process in details.

<iframe width="560" height="315" src="https://www.youtube.com/embed/XFLlakeNO10" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

### Here are the pull request that I made

1) [add Environment class to safely read environment variables with a fallback]
(https://github.com/Hi-Folks/milk-sdk-php/pull/20)

This is an open source PHP library that can get data from location services like Here. This issue was about reading environment variables directly. So, I had to create new class with a method that returns environment variables in the .env file, with fallback error handling as well. 


2) [added new method to set background colors based on weather condition]
(https://github.com/A7abhilash/weather-app/pull/7)

This is another open source project that provides a weather app. For this I myself opened an issue. It's about changing the App's theme based on the weather condition. If it's rainy, the color changes to dark blue or something. If it's sunny, the color is bright yellow. And it also considers the time as well. So, I developed a solution for this as well. 

3) [Added data array length check for infinite loading]
(https://github.com/armujahid/hnreact/pull/48)

This was a reactjs app that loads hacker news. The issue was that it had an error when loading news. The preloader was visible even there's no any more news. So, I came up with a solution. What I did was adding one more condition to check if the loaded data is valid. And it was successful. 

4) [Fix UI responsive issue on smaller screens]
(https://github.com/DenverCoder1/countdown/pull/25)

Actually this is the first ever PR I completed. This is a CSS styling issue. It was about the responsiveness on smaller devices. I added few media queries with new CSS rules and finally it was working fine on all devices. 

So, these are the accepted PRs that I had made. See, it's not that hard at all. 

Once they have been accepted and merged, your name will be displayed in the contributors' list of the repo. You have to experience that feeling. You feel so much proud about yourself. You can now showcase that you contributed to an opensource repo. 

So, once my PRSs accepted, I didn't stop contributing, I added few more issues and developed solutions. So, I was able to add one additional PR. 

So, that's how my first ever #hacktoberfest experience came through so far. So, thanks #DigitalOcean, #Github and all other repo owners and contributors for making this real. 

Now I know how it works and I'm ready to take this more serious in the next year. So, see you guys in the next year #hacktoberfest event. Stay safe.