17 ms·
> Smart developers don’t write mazes. You don’t choose what your forebears have written, though.
by pyrale 20d ago
> Smart developers don’t write mazes.
You don’t choose what your forebears have written, though.
- jorisw 20d agoPatching that up by using comments as a 'map' isn't the right way to deal with that. Refactors and rearchitecture are. Putting in comments just helps procrastinate what's necessary.
- stingraycharles 20d agoRewrites require a lot of effort, significantly more than just adding comments. It’s a pragmatic tool until you actually have the time to do the rewrite.
- jorisw 20d agoI never said rewrites. And the more you put in procrastination-encouraging half-solutions, the worse your code base gets.
- adrianN 20d agoIt's difficult to refactor and rearchitect without first understanding what's there and why.
- jorisw 20d agoAnd yourself putting in comments is the solution to that?
- adrianN 20d agoIt depends on how much time you can spend on the task. If you're allowed to write proper documentation about architecture and requirements that is probably better. If you're just drive-by fixing the code, then good comments are a lot better than nothing.
- pyrale 20d ago> Patching that up by using comments as a 'map' isn't the right way to deal with that. There is no right way. Only grey ones that help relieve pain for the team. > Refactors and rearchitecture are. Yeah... if you have the cash and the people. Usually, mature codebases are driven by limited investment with proven business value, because the sweet VC money is no longer there (or never was, in some industries). If you don't, reachitecturing is vanishingly rare, and your refactor budget is limited and you spend it carefully. If a piece of code hasn't moved recently but still comes up frequently when onboarding newcomers, documenting the code may be more profitable and less risky than changing it. It also helps preparing a case for a potential refactor.
- misswaterfairy 20d agoThough the onus is on us to improve what our forebears wrote, for the sake of our own and others' future.
- pyrale 20d agoI agree with that. I'm just not sure all of us have the same leeway to improve the codebase, and the cost isn't the same either. When you have less means, you spend them more sparingly.