3 ms·
Premature Generalization is worse than Premature Optimization
by indy 6y ago
Premature Generalization is worse than Premature Optimization
- abainbridge 6y agoRelated: Asking performance questions at the design stage is not a form of Premature Optimization.
- gpderetta 6y agoAs someone sometimes guilty of both, agree completely.
- skohan 6y agoYeah totally. Abstraction should be a response to code duplication, not a hedge against imagined future requirements.
- dragonwriter 6y agoAbstraction should not be a response to imagined future requirements (though there is a fuzzy boundary between imagined and reasonably-foreseen near-future requirements: you don't want to spend effort solving problems from the hazy future, but you also don't want to be doing major rework in a month because you didn't take reasonable steps in anticipation of something clearly anticipated but not fully solidified), but code duplication isn't the only trigger. Problem decomposition often results in reusable abstraction as a natural consequence.
- disambiguation 6y agoWET (write everything twice) > DRY (don't repeat yourself)
- dragonwriter 6y ago> Premature Generalization is worse than Premature Optimization I don't think that's true, I just think premature generalization is more common among people who have internalized the maxim about premature optimization.