3 ms·
“I would rather write more clunky code now and avoid having my code tossed two years from now by a maintenance programmer who can’t figure out what I did.” I d
by bluejekyll 7y ago
“I would rather write more clunky code now and avoid having my code tossed two years from now by a maintenance programmer who can’t figure out what I did.”
I don’t know that this is possible. Changes in patterns and language features (even legacy languages are gaining new features) will mean that someone will come to your code and need to refactor it for the new system/model/design, etc. It’s not very easy to predict the future and what current style you use that may or may not be desirable in the future.
Optimize for components that can be rewritten, replaced, and repurposed. Put a lot of tests around your code so that during a refactor it’s possible to understand if the refactor is safe. Anticipate that your code will need to be replaced.