Hey PC Readers:
Welcome back to my blog!
So I started this blog in order to do it in time, but unfortunately, due to some personal reasons, I could not complete this lab in time. But eventually, I had to learn it right. I mean I did learn it in the later labs and Releases, but I had to, had to complete this too. It did not take much time, as compared to the later labs I did after Lab 5 but you know how if you missed something, you keep missing it, and try to grab the current situation in hand. That is what happened with me.
Even when I completed this lab, it took me 4 days to write this blog and mark this as complete. Anyway, late is better than never, right? Lets look at the positive side. I did it :)
In this lab, I had to refactor my code. Since I was doing it late, I already refactored a whole lot of it, in next few weeks but I tried my best to do at this stage. I started by reusing of the code, since I was using a pattern to match the URL, I decided in order to not change it in the code everytime for some new changes, let keep it in the separate file where I can just change it once, and it will be automatically used in the code then.
Then I went ahead to rename some very bad naming variables, showBad and show Good which actually meant, to show Good urls only and show Bad URLs only. So, I changed those to showGoodUrl and showBadUrl (which actually made more sense). I dont know why until now I did not think of that.
To complete the tasks, I made more few minor changes, like changing the exit code line, which was not properly written. I added two more patterns of URL REGEX and URL_IGNORE in the separate file that we created in order to keep the consistency and not change it directly in the coding files to avoid misshapen.
I checked if the code was working with every step. I would not lie, it did break. But it was stupid error, of extra quote marks which took me sometime to figure it out. After every step, I made a commit as told by the prof. I was wondering why we would do that, but then the magical rebase and squash came into place. I always have to open this lab to do the squash, I have done this like so many times but I still feel like I would screw something up. Lol, Irony is I have done this lab unofficially like so many times but eh, officially this one time did not get a good time. Sorry Lab 5, you were not served right!
Details about Lab 5 can be found here:
https://github.com/chawlapalak/Url-Inspector/pull/13
See you in the next week!
Best,
PC
No comments:
Post a Comment