In the books (for example, Fowler "Refactoring ...") you can find some recommendations when you do not need to do refactoring, just rewrite (there are also opinions that you never need to rewrite). But how can this be understood when the situation is ambiguous (or need to be proved or disproved, with a minimum of subjectivism)? Is it possible to count some characteristics? I suppose that the relation of the time of adding one conditional feature to the "bad code" to the time of adding the same feature to the "good code" (conditionally Kt ) is (at least some) quantitative assessment correlating with reality. What is the border when you should not refactor, but need to rewrite? Is it Kt >= 3 or >=10 , >=100 ?
- And how do you measure the time to add functionality to a non-existent good code? - edem
- oneWhen adding a new feature will destabilize everything else and it will not be possible to balance all of this, then the opinion "you never need to rewrite" will quickly go to the forest) - vitidev
- @edem, your remark is appropriate, only speculative evaluation is possible. - LXA
|