Thursday 1 October 2020

Open Source Progression - Lab 2

Heya Everyone

I hope everyone is enjoying the week so far. It sure has been a busy one for your boy.

So, I'm going to try and keep this one short.
Just as a refresher, in my last post I talked about how I reviewed Chris' repo and filed issues and even submitted a small PR.

Well, I jumped the gun on that a bit showed initiative last week because contributing something useful was the task for this week. We were tasked with adding 2 optional features that had not been implemented yet. So naturally, I chose the feature I thought would be easiest to implement I could do since I absolutely detest python. 

Going down the list and reviewing his code once again I noticed that he was using the request "get" as opposed to "head". I figured this wouldn't be much of a PR as it was fairly simple. I decided to make another feature because Chris was doing two why not. Next on my hitlist was the 300 redirection. It sounds pretty simple right?!

Well it was and it was not at the same time. I had troubles storing the URL of where you were being redirected. A quick search and I found my answer on a stackoverflow thread.

In order to store the history and allow redirecting I had to implement another request.

req2 = requests.head(test_link, allow_redirects=True)

Awesome everything worked out and redirects were now being followed. I don't know what happened when I was trying to create a PR for this feature but I had an issue with pushing my updates. Super weird... I had no idea. After a little tinkering I figured it out but it was annoying.

That was the feeling I was getting.

Anyways...
I got some features implemented on my own repo. Chris copied my idea for added redirection feature which was really neat. I completely understand the battle with getting the web driver to cooperate with what exactly you want to do. Maybe selenium isn't the best way to do this sort of thing, but then again anything can be done. I also saw that he fixed my status code ranges. Chris added Linux command line support which shouldn't have been that hard, aka adding more conditions in the if statements.

HAHA. Jokes aside, thanks for the contributions my dude. That is two less features I have to worry about. I really appreciate it.

Something I agree with Chris on is that we should have communicated ALOT more in regards to implementation. Instead of spending hours searching for an answer on threads we could have just asked each other, but I guess you live and you learn right?! Doing this I confirmed my initial thoughts that I HATE (love) PYTHON.

Till next time,
XOXO,
Gossip Plamen

No comments:

Post a Comment

Release 0.4.3 - The End of Something Great

  Hello my wonderful followers! It is here... It is finally here. The end of this nightmarish semester is finally here. I have to say the pa...