Looking Through the Telescope - Lab 6

Oh man, that took longer than planned.

This time for our lab, the task was to, yet again, update our handy link checker. The new implementation we needed to add was an integration with the student-created and maintained Telescope project. Telescope is the web page used to collect and highlight all of the student blogs for this course, while also provided an ever-changing code base that the students can work towards improving every semester.

The first thing needed to begin the addition of this new feature was to set up our own instance of Telescope to test locally. This, above all other things, was the most difficult part of the lab. While I already had a virtual Ubuntu machine set up on my laptop, I had let it grow old. This was a major source of my problems, since, even though the packages I was attempting to install to run Telescope were up to date, the machine itself was not prepped for the task. It took a few install attempts before I learned that this may have been the issue from the very beginning, and this set me back a good ways.

Once I got back on track, the install was smooth sailing, and I was able to finally progress with the actual coding of the feature. This took a lot less time than the former task. I began by creating a 'click' option for the new job I needed my checker to perform, and then built in a basic 'if' statement to my main function where it would call a telescope function that I still needed to write. This function was set up to parse the ten most recent blog posts added to Telescope, and then scrape those blogs for links featured within them. Using the Telescope API to gather the JSON data for the links was relatively straightforward, and caused me little issue.

On returning those links to the main function, I realized that the rest of the code needed for checking those links already existed within my 'link_parse' function, so I looped through the list of Telescope links and passed each them to my parser.

As I was writing the remaining code for the Telescope option, I came to the conclusion that it would be wise of me to do some refactoring of my code, since the 'if' structure that I was building was beginning to reflect the structure I had already written earlier in the main function. This led me to writing another function that accepted a list of links from the main function, looped through that list, and passed that link to my 'link_checker' function.

All-in-all, this lab taught me the importance of keeping not only the packages for a project updated, but also the software to run it all. With these headaches out of the way, things have become much more smooth for me, and has taught me to keep up to date on everything I need to work in the future.

A layout of all the changes I needed to make for this feature can be found within this Gist.

Comments