DEV Community

Abdulbasid Guled
Abdulbasid Guled

Posted on

Exposing myself to the world beyond. Just need confidence that I'll be just fine

No puns for this post. It's another blog written so soon after the last one, and I like to have at least one per week.

So, for this week, our first lab was to peer review someone else's release 0.1 as well as have someone else review mine. For me, this was an easy task since it seems many have written in either node or python. My lab partner was Mo (https://medium.com/@moho472) and he gave me some recommendations that helped me in the right direction.

The first was to make a setup.py file so that I didn't have to specify the name of the file that runs the cmd tool all the time. This also has the added benefit of downloading all the required libraries that aren't built-in. Very effective, and it let's me even call my tool as "urlChecker" instead of "urlChecker.py".

He also recommended that I switch from requests to urllib3. The reasoning for this is the complexity that the library brings in terms of what I was able to do with it compared to requests. Although they're both written for the same purposes, urllib3 allows me to grab the head much easier. This was more useful for making 'HEAD' requests, which was an optional requirement. Getting the status code was therefore faster to get since the return type of the request method was a dictionary instead of a list, allowing for O(1) time complexity with regards to searching.

In terms of issues that I had, they were mostly relegated to the regex. The rest of the code was reliant on a proper working regex.

Once that was fixed, the rest of the work was history. The issue I made for the regex can be found here (https://github.com/HyperTHD/URLAutomationMachine/issues/1)

I also made a PR for another student in our class named TJ on some fixes and readability updates for his release 0.1 which he also wrote in python. (https://github.com/IcemanEtika/deadlinkz/pull/1) The main thing was changing his "requests.get" to be "requests.head" to optimize network requests, while also accomplishing another optional requirement for him.

Overall, it was very nerve-wracking working on another person's code, and even making the PR as well. One thing my professor wants us to get over is the "Imposter Syndrome" and opening myself up to criticism is something I'm still currently working on. I feel like I have alot of room to grow in the open source community and next month's Hacktoberfest will be where I will try to leave my mark. It felt good to have all of my issues fixed as it allowed me to present a completed project, giving me the confidence that I'll need for future projects to come. See you guys in Hacktoberfest!

Top comments (0)