Code Refactoring

- 1 min

Learn From Code Refactoring

I spent a few hours refactoring the code on a simple page the other day. It then occured to me, a new way of learning. As I was going through each line of the code, I started thinking, can this line of code be written in a better way? To be able to do this, I needed to define the better way first. In general, there is no correct answer of writing code in a better or correct way. It comes down to the team effort.

First of all, following the best practices and code consistency of the team. Second, think and google a lot. Third, read through the documentation again(I found this to be extremely helpful). In reality, as developers, we aren’t granted enough time to think before we write. Code refactoring is an amazing chance to pick up that thought.

Treating code refactoring as a new way to learn, a new way to discover. A way of getting out of your comfort zone and trying to code from different aspects. This is a great way to get better, more importantly, you will also enjoy code refactoring.

Yifan Chen

a software developer

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google pinterest medium wechat