DEV Community

Rudy Chung
Rudy Chung

Posted on • Edited on

OSD600 Lab 5

What I did this week

This week, I refactored my code due to the various changes made by other contributors. While I did make some changes to make sure my code functioned following merging other contributors' code, there were still a few changes to be made. I mostly focused on code readability when improving my code. I had to think about how someone who was unfamiliar with my code would read and understand it, and how I could ease that process. The largest change I made was to an if condition that became unnecessarily cumbersome since some parts of it were redundant. Smaller changers I made were to line spacing and minor variable name changes.

On a somewhat related note, I had earlier made some changes based on suggestions from other contributors, but they were not part of this lab. Hence I needed to make fewer changes to my code.

Rebasing My Code

The experience in rebasing my code went very smoothly. I was surprised how easy it was to squash all my multiple commits into a single commit. The process was straightforward with a bit of guidance from the on-screen instructions as well as the instructions of the lab. This was the commit I made.

Problems I Encountered

I had some issues changing my project's history since I accidentally put my changes into separate commits. I had to reverse my previous commits in order to get them all into one commit. I had to make use of git reset in order to reverse these commits and start the rebasing and merging process over in order to get them all into one commit.

Top comments (0)