Refactoring is a core eXtreme Programming practice. It involves, at the lowest level, moving pieces of code about. As such is generally done using a text editor or text based development environment, with or without explicit refactoring support.
As defined by Martin Fowler, and others, it provides a common language of patterns for manipulating source in such a way that the behavior is preserved. Refactoring provides four major benefits. Specifically, it:
- improves the design of software,
- makes the code easier to understand,
- helps you find trouble, and
- speeds you up.