August 2004
Intermediate to advanced
400 pages
8h 46m
English
In this chapter I offer a few thoughts on what refactoring is and what you need to do to be good at it. This chapter is best read in accompaniment with the chapter “Principles in Refactoring” [F].
A refactoring is a “behavior-preserving transformation” or, as Martin Fowler defines it, “a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior” [F, 53].
The process of refactoring involves the removal of duplication, the simplification of complex logic, and the clarification of unclear code. When you refactor, you relentlessly poke and prod your code to improve its design. Such improvements may involve something ...