3 ms·
> Design patterns are solutions to commonly occurring design problems in developing flexible software using object-oriented programming. This completely misses
by anon9001 5y ago
> Design patterns are solutions to commonly occurring design problems in developing flexible software using object-oriented programming.
This completely misses the point. You don't "pick a pattern" and choose to apply it.
Design patterns are a way to take your best solution and describe how it works to other programmers.
For example you might say something like: "We used a singleton here because we can barely manage to get one instance working correctly and never intend to write tests".
- humanrebar 5y agoYou're right, though I think casual uses of factory methods or objects is a tidier example. Especially since you don't have to justify it with hand waving about bad code.