Skip to main content
Following the advice leads to extremely complex short code which violates the principle of KISS for maintainability.
Source Link

While code which breaks the rules in the other answers is certainly worse to maintain, all code is hard to maintain, therefore the less of it you have the better. Defects correlate strongly with amount of code, so the more code you have the more bugs you have. Once code get over a certain size you can't keep your whole design in your head anymore and things get much harder. Lastly more code eventually means more engineers, which means more cost, more communication problems and more management problems.

Though keep in mind that one should not write more complex, but shorter code. The most maintainable code is simple and simply contains no redundancy to keep it as short as possible. Delegating tasks to other programs or API can also be a viable solution as long as the API calls are simple enough.

so in a nutshell, any superfluous code is a maintainability problem

While code which breaks the rules in the other answers is certainly worse to maintain, all code is hard to maintain, therefore the less of it you have the better. Defects correlate strongly with amount of code, so the more code you have the more bugs you have. Once code get over a certain size you can't keep your whole design in your head anymore and things get much harder. Lastly more code eventually means more engineers, which means more cost, more communication problems and more management problems.

so in a nutshell, any superfluous code is a maintainability problem

While code which breaks the rules in the other answers is certainly worse to maintain, all code is hard to maintain, therefore the less of it you have the better. Defects correlate strongly with amount of code, so the more code you have the more bugs you have. Once code get over a certain size you can't keep your whole design in your head anymore and things get much harder. Lastly more code eventually means more engineers, which means more cost, more communication problems and more management problems.

Though keep in mind that one should not write more complex, but shorter code. The most maintainable code is simple and simply contains no redundancy to keep it as short as possible. Delegating tasks to other programs or API can also be a viable solution as long as the API calls are simple enough.

so in a nutshell, any superfluous code is a maintainability problem

Post Made Community Wiki by Mike Dunlavey
Source Link
jk.
  • 10.3k
  • 1
  • 35
  • 43

While code which breaks the rules in the other answers is certainly worse to maintain, all code is hard to maintain, therefore the less of it you have the better. Defects correlate strongly with amount of code, so the more code you have the more bugs you have. Once code get over a certain size you can't keep your whole design in your head anymore and things get much harder. Lastly more code eventually means more engineers, which means more cost, more communication problems and more management problems.

so in a nutshell, any superfluous code is a maintainability problem