Business Agility Office

Refactoring consists of improving the internal structure of an existing program’s source code, while preserving its external behavior.

The noun “refactoring” refers to one particular behavior-preserving transformation, such as “Extract Method” or “Introduce Parameter.”

Refactoring does “not” mean:

  • rewriting code
  • fixing bugs
  • improve observable aspects of software such as its interface

Refactoring in the absence of safeguards against introducing defects (i.e. violating the “behaviour preserving” condition) is risky. Safeguards include aids to regression testing including automated unit tests or automated acceptance tests, and aids to formal reasoning such as type systems.

« Back to Glossary Index