Refactoring, does it help?

Refactoring, is the general idea, helps to get a higher degree of understandibility and changeability of your code. Refactoring, in short, enhances the quality of code.

That is the hunch we all have. But in practice, it is hard to prove. Recent research, for instance, show that refactoring does not lower code complexity, which is counterintuitive1,2.

You could almost speak of a war: in this article, the authors state that refactoring did not improve code quality. Developers answered, of course. The problem, I think, is partly that `code quality’ is inherently hard to measure (and cannot be measured directly), and that – maybe – refactoring serves a slightly different purpose than anhancing understandability and changeability, and minimizing complexity. Here is my view. (more…)