3 ms·
Premature abstraction is generally worse than immature abstraction. Write the most straightforward thing you can, and wait for that feeling that it won't work o
by awj 9y ago
Premature abstraction is generally worse than immature abstraction. Write the most straightforward thing you can, and wait for that feeling that it won't work out.
Then, ignore that feeling until you get proof. If you've kept your code simple and clean reacting to a lack of abstraction is relatively easy, at least compared to what digging yourself out of the wrong abstraction is like.
- dkural 9y agoYES, this 100 times.
- adrianratnapala 9y agoIndeed, it is concreteness that is the virtue and abstraction that is the necessary evil. We sometimes lose sight of this because when we learn that abstraction is necessary, and see how beautiful it can be, we forget that it is an extra layer of mental indirection.
- always_good 9y agoSandi Metz's piece on this: https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstracti...
- misja111 9y agoThis is so true. Even a horrible God class with 6500 lines of code is still many times better than an overdesigned framework with 100 classes of 65 lines each.
- siliconunit 9y agoTotally agree, and as for ownership imho it all depends what level of complexity we are a taking about, if it's some web bs (no offense) it's one thing, if we talking about some parallel gpu FEM physics solver trust me there will be ownership and I think it's a good thing...
- posterboy 9y agohard to tell what you think would be the significant difference between horrible and overdesigned.
- Ace17 9y agoI feel James Coplien's advice on the question is interesting: https://www.youtube.com/watch?v=KtHQGs3zFAM&t=500 https://www.youtube.com/watch?v=KtHQGs3zFAM&t=500 TLDW: "refactoring your way out" from a simple but too short-sighted design might take a ridiculous amount of work, compared what would have been necessary if you knew what a "correct" design for this problem was.