3 ms·
If you want to reduce your code mass, the number one thing you should do is look at the code paths that have not been reached in a year and consider throwing t
by ryanmarsh 10y ago
If you want to reduce your code mass, the number one thing you should do is look at the code paths that have not been reached in a year and consider throwing them away.
Still make sense?
- spinningarrow 10y agoCode paths that have not been _reached_ are very different from code paths that have not been _changed_, though.
- plandis 10y agoSo remove all code for handling unlikely failure scenarios? ;)
- zachrose 10y agoThis would depend on the kind of software you're making and the potential for an unhandled error to cause injury, expense or damage, but yeah. I would really like some system that can tell me how many times a line of production code has executed in the last year. For an ecommerce web app, I can't imagine how a line of code that hasn't run in the last two years would still need to be there.
- jshevek 10y agoMy immediate thoughts exactly, so I reread to confirm the parent said "consider" removing the code. I think this is reasonable. While considering the removal of unused code, we should should keep the code that handles unlikely failure scenarios.
- deleted 10y ago[deleted]