2 ms·
Do the added LOC/complexity/classes make it easier to change the software later? As I understand it, all of those things aren't there to make it easier to start
by pavel_lishin 15y ago
Do the added LOC/complexity/classes make it easier to change the software later? As I understand it, all of those things aren't there to make it easier to start; they're there to make software easier to maintain.
- mistermann 15y agoThat is typically how the design is "sold", but in practice I've found that either the anticipated changes are never required, or are such that the "flexible" design doesn't work for the changes that are eventually needed. Meanwhile, you have to live with this same complexity everywhere in your system; wrapping your head around the simplest implementations is very time consuming, onboarding new developers is unnecessarily slow, making minor tweaks to production apps no one has touched for 2 years is slow and dangerous.
- loup-vaillant 15y agoI'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.