I think about what is the number 1 priority for a piece of code, am I gonna use it once and forget it? Will I use it all the time?
I've gone in the opposite direction in my career.
Overbuilding the initial version of something for a bunch of anticipated (rather than actual use/failure scenarios) is something I now work very hard to avoid.
The key IMHO is really being nimble enough to extract and/or refactor and/or refine as soon as it is needed. Not before, not after.
"Overly robust" code is actually a huge problem sometimes. All that unused code is in there, giving the appearance of being robust, but is not actually battle-tested....
Overbuilding the initial version of something for a bunch of anticipated (rather than actual use/failure scenarios) is something I now work very hard to avoid.
The key IMHO is really being nimble enough to extract and/or refactor and/or refine as soon as it is needed. Not before, not after.
"Overly robust" code is actually a huge problem sometimes. All that unused code is in there, giving the appearance of being robust, but is not actually battle-tested....