What is refactoring?

August 29, 2022
As in alegebra, code (re)factoring doesn't change the meaning of an expression, only the representation.

“Refactoring” of software seems to generate a lot of confusion.

“We need to refactor our eCommerce platform to accept Stripe payments.”

No, no, you don’t. That’s not a refactor. That’s a new feature!

A refactor doesn’t change the code’s behavior.

“Well then why would we bother with a refactor?”

We do refactoring because it makes future changes easier. Or becase it makes the code easier to understand.

It’s the same in algebra. (Re)factoring doesn’t change the meaning of an expression, it only changes the representation.

Share this

Related Content

Refactoring for readability

A simple rename can save hours of time in the future.

Refactoring Revisited

Many people don't understand refactoring, and this leads to several anti-patterns.

Refactoring itself is worthless

Why refactoring doesn't, and shouldn't provide direct business value