2 ms·
Well, not necessarily. There is plenty of good code out there. The dirty little secret of software development is that bad code is an effort sink. Let me run th
by InclinedPlane 14y ago
Well, not necessarily. There is plenty of good code out there. The dirty little secret of software development is that bad code is an effort sink. Let me run through a few truisms about bad code and see where they lead us, development wise.
Bad code is buggier, so it will require fixing more often.
Bad code is more difficult to understand and sometimes has non-intuitive side effects or method of operation and so working on it will take longer.
Because of the convoluted way that bad code often works, adding features or doing maintenance on it often makes it even more convoluted and difficult to work on.
Bad code typically has lower performance, so it will require more attention to improve performance. Due to the above 3 factors this becomes a vicious cycle of sinking effort into the code only to make it that much harder to work on in the future.
For these simple reasons bad code becomes a huge time sink. Programming tasks involving good code end up taking up a much smaller portion of the developer-effort budget because it's so much easier to work on that code, while the bad code takes so much more effort and often the code base just ends up even worse than before, perpetuating the phenomenon through to the next cycle of development.
The only way out of this cycle is to identify the code that is the main source of bugs and the main sink of effort then budget out more than enough time to tackle it and improve it. But most development shops aren't proactive enough, introspective enough, or set aside enough dev-resources to be capable of doing that. Even though such efforts tend to have an enormous impact on future development.