Blind Refactoring

Without understanding the internal mechanics of a function, any modification made to it is essentially a guess. The fix-break cycle is not bad luck but a predictable consequence of attempting to improve code whose behavior is unknown. Refa…

1 sources - 4 claims

Without understanding the internal mechanics of a function, any modification made to it is essentially a guess. The fix-break cycle is not bad luck but a predictable consequence of attempting to improve code whose behavior is unknown. Refactoring a function that is not understood produces a changed function that still does not work, and now also differs from the original in ways that are difficult to trace. Automated refactoring tools worsen the problem by causing each change to break something else, producing a loop with no forward progress.