Why Should You Refactor?
I currently read Refactoring: Improving The Design of Existing Code book and I’ll highlights some key points that I found Interesting to write about.
Refactoring Improves the Design of Software.
Without refactoring, the design of program will decay. As people change code—changes to realize short-term goals or changes made without a full comprehension of design of the code—the code loses its structure.
Refactor Makes Software Easier to Understand
The trouble is that when you are trying to get the program to work, you are not thinking about the future developer. It does matter if it takes a programmer a week to make a change that would have taken only an hour if she had understood your code.
Refactoring Helps You Find Bugs
Help in understanding the code also helps me spots bugs.
Refactoring Helps You Program Faster
I strongly believe that a good design is essential for rapid software development. Without a good design, you can progress quickly for a while, but soon the poor design starts to slow you down.