4 ms·
You know whats a smelly thing in OOP ? Overblown abstractions, design patterns and stuff for the sake of flexibility which in the end mostly will never need tha
by kayoone 14y ago
You know whats a smelly thing in OOP ? Overblown abstractions, design patterns and stuff for the sake of flexibility which in the end mostly will never need that kind of flexibility but in turn readability and clearness suffers instantly.
I am all for Design Patterns and abstraction, but only when it makes sense.
- meaty 14y agoIn full agreement. We have a rule about only using patterns if they become apparent rather than selecting a pattern up front.
- viscanti 14y agoI guess I don't see the harm in spending a little extra time up front to design things properly rather than just jumping in and writing code, hoping to stumble upon the correct design pattern. I've found it much easier to find and solve problems up front rather than waiting for potential landmines, at least, the time required to fix those problems is less if they're exposed earlier in the process. It's certainly possible to over-engineer a solution if you select a design pattern up front, but maybe you'd be better suited by having a rule against over-engineering.
- lmm 14y agoIt's hard to define a rule against over-engineering. The only approach I've seen that has any success is to ban any and all design up front, and only ever write code to implement user-facing features.
- meaty 14y agoWe "spike" stuff i.e. do a quick sanity check before we commit to something. A pattern will become apparent there and then if there is one. Sometimes this spike is re-factored into the product or is scrapped and rethought. Multiple eyes see every design - that is more important than anything. You can't quantify over-engineering until it is done unfortunately.
- alisnic 14y agoI guess it depends on what you learn from the subject. The general attitude I have is "Here's this thing, let's think about it", rather than "ZOMG, drop your ifs, they are BAD"