4 ms·
I'm pretty certain that more code is more difficult to maintain, period. Before you modify anything, you have to find the relevant piece of code, understand it
by loup-vaillant 15y ago
I'm pretty certain that more code is more difficult to maintain, period.
Before you modify anything, you have to find the relevant piece of code, understand it, and understand all the dependencies' interfaces (or even part of their implementation, if the abstractions leak). I can't recall specific experimental result, but it seems, well, obvious, that all the above will be more difficult if there is more code to examine.
Now you could argue that you could shrink the size of the code that one have to examine before making a modification, by increasing total code size. I don't believe it. Increased modularity means more code re-use in the first place, and therefore a smaller program.
- johndcook 15y agoAgreed. I imagine most unnecessary code is justified by saying that it will make the code easier to maintain, even though it usually has opposite effect. It pays to be very skeptical of your ability to predict the future.