Chapter 2. The Refactoring Cycle

In this chapter, we'll look at refactoring at two levels:

  1. The broad cycle of identifying and fixing problems

  2. The types of manipulations you make in individual refactorings

What Is Refactoring?

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 ...

Get Refactoring Workbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.