Skip to content

Software quality

Refactoring

Targeted restructuring of existing code without changing its external behavior.

Refactoring refers to the restructuring of existing code without its external behavior changing in the process. A function is, for example, split into smaller units, names are made more precise or duplicated code is merged – the output for given inputs stays the same.

The term became known through Martin Fowler's book of the same name. Because the behavior is not supposed to change, sensible refactoring requires safeguarding by existing tests: only then can it be checked whether the restructuring really changed nothing about the result. Refactoring is thus clearly to be distinguished from a rewrite with new behavior.

In practice at Provimedia

What Provimedia uses it for

Provimedia schedules refactoring as a work step of its own, safeguarded by the existing test suite, instead of letting it run along on the side.

Want to use Refactoring for your project?

In a free conversation, let's find out how we can implement this for you.