Saturday, 7 November 2020

Through the Looking Glass of Telescope

 


Hello my fellow open source followers.

I have been AFK for quite some time (reading week).
Although I have kept busy with studying for my last two midterms I have been looking into some interesting repos to continue my OS dev adventures.

Just when I thought I was all caught up and have gotten ahead on school work, I got slammed with so much stuff after reading week. Thus, this week was a busy one for me. #ThankGeorge (Game Dev professor)

Nevertheless, I pulled a couple of late nights and got through it...

Anyways, this week's lab was an interesting one. We were tasked with installing telescope, Seneca alumni made website to gather open source blogs together in one place using RSS Feeds, and YOU GUESSED IT, use our never ending link checker tool we had made way back in Release 0.1. 

Man it feels like ages ago

So, I dreaded setting up telescope because when I tried to set it up last time for hacktoberfest, I was left only in disappointment and quickly lost interest in setting it up because who RTFM... 

To my luck, of course our professor wants us to work with telescope for Release 0.3 and lab 6. Meaning I was forced to figure out how to set it up and actually RTFM. To my surprise everything installed properly this time and everything went pretty smooth. I also took my sweet time installing it... 

YEP... 5 HOURS

To be fair it only took that long because I was taking down Halloween decorations before it snowed again. I don't even know why I decorated this year, only two, TWO, kids showed up. 

EH! Whatever, I am not complaining. Now, I have a good reason as to why I am stuffing my face with so much candy. (#SorryNotSorry Dr. Roberts, my dentist)

Anyways, back to the point.

Everything went buttery smooth, so I ran telescope, ran docker, opened up and saw the JSON that the backend was returning for the 10 latest posts and began to think about how I would implement yet another functionality into my DeadLinkage

Thank god I had refactored my code from the previous lab, otherwise this would have been a NIGHTMARE.

I made a new file that would be dedicated to handling and parsing the JSON formatted array and pass back links to the actual main driver.
I then simply duplicated my logic for checking through all the links but added an extra loop to switch each link that was passed back from the JSON parser. To my avail it worked perfectly. I had to tweak it a tad to make it look pretty and all but I have spent so much time with this code I know all the ins and outs of it by heart and line (man I have no social life).

The ending result was something like this:


I am actually pretty happy with the results to be honest. This continuous expansion on the link checker tool is turning out to be a neat little app (especially after refactoring). 
OH, here is the diff if you want to check it out.


I will leave that with you and go bang my head on the desk spend hours in front of the screen because of DSA. #ThanksCathy

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...