OSD600 Lab 5

 This week we learned about rebasing in Git! Rebasing is basically taking multiple commits and "grouping" or "moving" them into one commit. Before I started the lab I did the walkthrough on the OSD600 GitHub Wiki. At first, I struggled with it (kept getting errors when running git rebase master -i). Then I decided to start over again and I noticed the first time I forgot to commit some files on the refactor branch. I am happy I did this first because it made the lab go very smoothly.  Before I started the lab I took a look at my code and wrote down the improvements I was planning to make. I decided to do these 3 things: change my regular expression variable from a let to a const, remove an array I never used, and update some functions to use the ES6 arrow syntax. It's been a while since I used arrow functions so I used this resource to guide me Every time I added and tested a feature I did a git commit. One improvement that caused an error was when I updated some functions to use arrow syntax. I did some research and after reading this stack overflow page I realized that arrow functions don't get hoisted so I had to move my function definitions to the top of the file. I decided to just make the smaller function arrow ones. To be honest, I'm not sure if this is the best code design (should I have made all of the arrow functions or just makeCalls?), but that's ok, I have realized by taking this course that code is never perfect, and there is always room for improvement. Even the biggest software projects are always finding ways to improve. I use to freak out about writing "perfect" code, but I have learned that is an impossible task, and no matter how much time you spend refining it, someone else will always be able to find something wrong with it and be able to improve it. The rebase, and changing the commit history went pretty smooth, thanks to doing that exercise first :) Overall this was a pretty good lab and I can't wait for the next lab to continue learning about Git!

Improved Code:

ES6 Arrow functions:



Const regEx and took out unuse array called linesArr:




Comments

Popular posts from this blog

OSD600 Release 0.4 Part 3

Release 0.3 PR2