Refactoring: Improving the Design of Existing Code (Addison-Wesley Signature Series (Fowler))
Rate it:
Open Preview
4%
Flag icon
A poorly designed system is hard to change—because it is difficult to figure out what to change and how these changes will interact with the existing code to get the behavior I want. And if it is hard to figure out what to change, there is a good chance that I will make mistakes and introduce bugs.
5%
Flag icon
Yet as soon as someone does need to understand how that code works, and struggles to follow it, then you have to do something about it.
5%
Flag icon
Whenever I do refactoring, the first step is always the same. I need to ensure I have a solid set of tests for that section of code.
5%
Flag icon
This is the essence of the refactoring process: small changes and testing after each change. If I try to do too much, making a mistake will force me into a tricky debugging episode that can take a long time. Small changes, enabling a tight feedback loop, are the key to avoiding that mess.