The main purpose of refactoring is to fight technical debt. Its heart is a series of small behavior preserving transformations.

Refactoring is the controllable process of systematically improving your code without writing new functionality.

Here are some of its features: Clean code is obvious for other programmers. Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. It transforms a mess into clean code and simple design. The mantra of refactoring is clean code and simple design.

Refactoring is "the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure," according to Martin Fowler, the "father" of refactoring.

Nice! The goal of refactoring is to pay off technical debt. And I’m not talking about super sophisticated algorithms.

But what’s clean code, anyway? Refactoring like any other development activity, is quite an easy way to introduce new bugs, so you must re-test your software. Maintaining a complete and exhaustive set of passing tests will ensure your Refactoring does not cause regression errors in your code to go undetected.

what is refactoring