Lab 5

  

    While closely examining my open source repository, I noticed that I had many unnecessary lines of code. Although program worked, the code was not as good as it could be. Having these unnecessary lines of code had lead my program to be prone to errors. After identifying these issues, I removed them and thus my code was concise and efficient.

    

    A bug was also found while inspecting my previous code. I had forgotten to implement the function that allows users to choose "-all", "-bad", or "-good". To solve this bug I invoked the function that was already declared. 

   The final improvement was my terrible variable names. While implementing my "--ignore" functionality I used the variables url and url2 to hold the values of the url currently being checked and the url to be ignored. These variables had no description of the values they were holding. I replaced my old variable names with ones that accurately describe their purpose.


    Refactoring my code in small commits has given me the opportunity to work with little to no anxiety. Making small commits reminds me of saving my progress in a RPG game before tackling a hard task. Hitting the save button allows me to try different tactic without worrying about losing the progress of my project.

    After solving some bugs and naming conventions we can run the "git rebase -i" command that allows us to squash all your commits into one commit. Some projects consider this a normal process to keeping their master branch clean. Once this step is complete, I took a look at all of the commit messages by executing "git commit --amend" command. This had allowed me to edit my commit message into a single message.

    Making small commits allows me to take small steps towards a solution. If I make a mistake I can always come back to the place I saved. Whenever I have something that solves a problem in my code, I create a commit on a branch to ensure my previous solution is safe.






Comments

Popular posts from this blog

Working with others

The Progress

We are off! V0.1