Skip to content

Refactoring

Improving the internal structure of code without changing its behavior: renaming, splitting functions, removing duplication. The program works the same externally, but internally it is cleaner.

Why

  • easier to read and maintain;
  • less technical debt;
  • easier to make changes.

Rule

Refactoring does not change behavior. If behavior changes, it is already new functionality and requires its own tests.

See also

← All terms