In this chapter, we'll look at refactoring at two levels:
The broad cycle of identifying and fixing problems
The types of manipulations you make in individual refactorings
Refactoring is the art of safely improving the design of existing code. This has a few implications:
Refactoring does not include just any changes in a system. Changes that represent design improvements or add new functionality are not all considered to be refactoring. While refactoring can be part of the process used to create new code, it's not the part that adds new features. For example, Extreme Programming, or XP, (described in Kent Beck's Extreme Programming Explained: Embrace Change) uses test-driven development, which ...