Sick of the R word
I’m getting a bit fed up of hearing the word ‘Refactoring’ when what people really mean is just ‘hacking at code’. Back in May last year I responded to Bob Cringely’s piece on how bad the whole idea of refactoring was; I still stand by what I said and, looking back, I think the key point is this:
“Not all code changing is refactoring. Refactoring requires discipline. You need to balance the risk of refactoring with the risk of not refactoring. You need to know when to stop and you need to do it because it’s the right thing to do for the project, not just because you can. Changing code without this kind of thought and discipline is just hacking (in the worst sense of the word).”
Unfortunately, now that ‘Refactoring’ is trendy, everyone refers to every little hack job as ‘Refactoring’ because it sounds so much cooler to management… I think that’s a pity; it devalues the term. When Refactoring is done well it improves the quality of the code base; when every little change is ‘Refactoring’ then it has at best a neutral effect on the quality of the code.