Pull Requestin'
This week in my Open Source endeavors, our task was to delve deeper in the open source world and try our hand in contributing more by using pull requests. Our professor had tasked us to add a feature to any of one of our peers' programs. Simple enough, except this would be my first time actually tinkering with someone else's code to add an actual contribution, pretty exciting.
So I looked through the list of repos of the class and I decided that I wanted to step out of my comfort zone and try out a program in a language different than mine. Currently, I'm taking a web development class using ASP.NET and wanted to polish my skills in C#, so I found a perfect repo for that from a coursemate, Zayed.
I thought "wow that sounds pretty similar to my program..." so it must have been the perfect fit right? Regardless, I was already quite interested in trying out C# programming and so I read and I learned. My previous knowledge of C++ from previous semesters definitely gave me a huge advantage in reading through the code. Zayed's code is quite good, it seemed like a lot to write from the start and I commend him for that. Even though it is quite messy and he admitted it as well from my conversation with him about it. (I never said it! He did) My task however was quite simpler than writing the whole program, add an additional feature, and there were quite a few easy ones that were listed in the criteria for the lab.
At first I couldn't find any logic for implementing the -v version argument in the code so I added that as a task, but I thought that'd be too simple so I tasked myself with adding other features as well. I opted for optimising the network code to send a head request and adding a time out feature. So into the microsoft docs I went and lots of tabs were opened. But in the end I ultimately figured out how to change the http method sent and how to add a timeout for the request which was fairly simple. Then I wrote the logic down to identify those timeout and tested the code a good amount of times and was satisfied with the results. So I created a pull request.
Later, Zayed replied and informed me that he had already written a v argument to my surprise. What? How? I didn't see it, how could I have missed it? So I went back and reread the code again thoroughly and I'm embarassed to admit that the code block he had written for the v argument was minimised on my visual studios. Yeah.... Not my proudest moment. However, Zayed did say he was enthusiastic about the other 2 ideas I had. So I fixed the code, made a few changes, finalised the branch and re requested another pull request. I tried my best to make as minimal changes as possible so as to not change Zayed's code too much and break or ruin it. I edited the gitignore file to omit some unecessary visual studio setting files that were in the repo and edited the readme a little bit as well.
Later, Zayed replied and informed me that he had already written a v argument to my surprise. What? How? I didn't see it, how could I have missed it? So I went back and reread the code again thoroughly and I'm embarassed to admit that the code block he had written for the v argument was minimised on my visual studios. Yeah.... Not my proudest moment. However, Zayed did say he was enthusiastic about the other 2 ideas I had. So I fixed the code, made a few changes, finalised the branch and re requested another pull request. I tried my best to make as minimal changes as possible so as to not change Zayed's code too much and break or ruin it. I edited the gitignore file to omit some unecessary visual studio setting files that were in the repo and edited the readme a little bit as well.
I had Zayed review the code, he was satisfied and happy with the changes and additions and he merged my pull request. If anyone's interested, Zayed's repository is linked below
Thanks for reading :)
Comments
Post a Comment