- Refactoring as Design Practice: Henney emphasizes that refactoring is not just about quick shortcuts or large-scale re-engineering. It is a design practice essential for maintaining code quality and understanding.
Make code as open to modification as possible.
Keep code simple by resisting the temptation to make it extensible in the absence of any requirements to do so.
- Complexity and Developers: Developers are drawn to complexity, often seeking creative solutions to problems. However, Henney suggests that refactoring is a way to navigate complexity, making code more understandable and manageable.
- Technical Debt: Henney distinguishes between possessing technical debt and unmanaged technical debt. He argues that the possession of technical debt is not a problem; the key is how well it is managed and structured.
- Metaphor for Messy Code: Henney introduces a metaphor for messy code, describing how developers can’t stop thinking about it. Refactoring provides a way to take oneself to a clean and tiny context, making developers feel comfortable and safe while working on it.
- Refactoring Process: Refactoring is portrayed as a process of discovery and recognition, a reactive design practice. It involves restructuring software through a series of small, focused changes that do not alter the observable semantic behavior of the software. Automation is associated with refactoring, but the focus is on preserving the program’s behavior.