Giving Back to the Community
Of course I’m referring to the open source community who have greatly helped me to improve upon and add new features to my code. I would like to specifically thank NesaByte and sonecha for adding support for argument parsing and running multiple threads to my Haystack CLI Tool.
The month of October ushers in a special time for Open Source developers. In preparation for my entry into this year’s 2020 Hacktoberfest I have been practicing merging, forking, fixing, and issuing pull requests to my colleagues repositories. I was surprised to see a pull request submission on my own Haystack CLI tool, and I was even more awed at the fact that the changes were more meaningful than I could've hoped for. On a side note, I wanted to have Haystack be able to validate the links on multiple threads but me being a bit rusty in Python I told myself that it was something to be added once I’ve familiarized myself with the language once again. But lo and behold, sonecha issued a pull request to add support for parallel processing. Not only that, NesaByte fixed my old way of argument parsing — as stated in my previous Haystack Devblog I wanted to use the argparse library to parse my command line arguments but never got a chance to sit down and learn the API. She issued a pull request and added support for argparse. I reviewed both of their requests and decided to merge as nothing needed to be changed. Both of their requests featured meaningful additions; it was clean and only modified what needed to be added. It was a delightful experience, and I hope that the rest of my time on GitHub during Hacktoberfest will be this pleasant.
Afterwards, I forked the repo and cloned it onto my machine, created a new branch to tinker on, and made the desired changes:
Above is just one example of the modifications to the code that I made; I read through and reviewed her code, fixed the styling, added clarity to some of the user input prompts, and removed duplicate code. Moreover, I committed those changes and pushed to my forked repo.
Lastly, I issued a pull request to the original Bapples project repo:
The changes were done and submitted, this is the end of the process right? Well… not quite so, I let NesaByte know of my changes by updating my issue and directly messaging her:
After working on her code for a while, the wait for her response was nerve wracking. But nonetheless she responded, reviewed my changes, and merged my pull request! No additional work needed to be done, and my name was added to the contributors list on her repo.
So what did I learn? I used to think that I had a lot of experience with Git as I’ve been using it since I was a first year at Seneca College, but only now can I truly say that I am finally experiencing the full power of what Git can do. Learning how to use Git to contribute to other repos by actually working on someone else’s repo is by far one of the best learning experiences I have had. Working with others, seeing your name added to the contributors list, receiving praise for your additions and fixes is something I will not forget. What would I do differently next time? I think I would give myself more time to work on NesaByte’s repo. I think that given more time there were more meaningful things that I could’ve added, more code that I could’ve shortened, and more bugs I could’ve fixed. But alas, every programmer needs to wind down, shut off their computer and get a good night’s rest… because there will always be things to do tomorrow.