On a quest for the silver bullet..

Refactoring

To make it clear: “Refactoring” (as the term made famous by Martin Fowler in his great book with the same name), means to change the code without changing its behavior. Too many people talk about refactoring when changing some of the behavior of a system. This interpretation is just plain wrong.

This distinction is not just a play with words, it is important to understand what the practice of refactoring is.

When I stress the importance of the practice of continuously refactoring the code base, it would make no sense if you thought I was talking about changing requirements. When I talk about refactoring and its importance, I talk about code quality.

Refactoring means to enhance the code quality of the system. It is probably the single most important practice to prevent code rot and design debt.

That’s a major distinction.

Fowler defines refactoring this way: “a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior”.

Everyone should know of this practice, understand what it means, and understand its vital effects on the code base.

-Tore

January 19th, 2009 at 20:54 (913)


Leave a Reply