DEV Community

Esther Ugute
Esther Ugute

Posted on

What are code refactoring techniques?

Top comments (1)

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

Hi Esther, if you are asking a question please set the help tag, it will make it more visible to people doing so.
On the other hand, we need to define code refactoring, which means to change the implementation details without taking any effect or side-effect to the existing features.
Refactoring never implies adding new features or bug fixing (those are different stages).

With that in mind, to be able to refactor something we need a way to ensure it will work as it did before, hence to be able to refactor properly, we need unit tests at least (E2E are also desirable depending on the scope).

Then we can apply different techniques, which you can find here along an explanation and examples.

Hope it helps! 😁