Lab 2 Blog

    Today I contributed to another user's project on GitHub, I wanted to work on a feature where it counts how many times each type of HTTP status code as well as URLs in total has been checked, and then display it as a result section of the output.

    First I sent out an Issue on his repository regarding what I wanted to do and proposed to work on it myself. After I finished adding my feature, I issued a pull request to the person's repository as I wait for feedback.

    During the making of the Result Counter feature, I started by creating variables to hold all the counters and display messages. Then, I put the counters inside the loop that determines the status of the URLs, counting each and every time the if statement was valid. The total amount of URLs are added each time the loop had completed. One major problem I came across while making this feature was the fact that the result message were displayed before the list of URLs were outputted, the only way for me to fix this was by making the function an Async Function and putting the await keyword on the Promise block where the loop is supposed to be in hopes to delay the result message until the loop finished displaying the URLs.    

     From this lab, I learnt how to properly fork another user's repository on GitHub, as well as pushing the branch to create a pull request for the directed user.


Comments

Popular posts from this blog

Release 0.4

Lab 4 Blog