Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design patterns criticism sources [closed]

I was reading the design patterns page on Wikipedia, particularly the "Criticism" section.

Could you point me to some articles or books about shortcomings of design patterns?

like image 775
kofucii Avatar asked Oct 21 '10 18:10

kofucii


People also ask

What are the disadvantages of design patterns?

Disadvantages. Using design patterns requires extensive knowledge. Having design patterns available can also lead to people believing that apparently all problems can be solved using existing design patterns. In short, this can limit creativity and the desire to find new (better) solutions.

Are design patterns still relevant?

Quick answer: yes. Especially when you're at the beginning of your journey, design patterns are a good starting point. Even if you won't use them right away in your first projects, getting to know them will help you understand the existing solutions you're using. Complex solutions are made of patterns.

When should design patterns not be used?

If a problem has two solutions, one that fits in ten lines of code, and another one with hundreds of lines of code along with a pattern, please consider not using the pattern. Their presence isn't a quality measurement.


2 Answers

Most of the criticisms of design patterns that I have come across relate to a distaste for the structuring and labeling of what they consider to be just good object-oriented practices. Most patterns boil down to programming to interfaces, and other SOLID principles. The feeling is that when we teach patterns we cause developers, especially junior developers to try to cram all problems into the set of patterns that they have learned, which can create more obtuse and cumbersome problems than if they had taken a more 'straightforward' approach.

I tend to agree with the sentiment that once you begin to learn patterns you tend to overuse them, however, typically you very quickly move out of that stage, and into a much more productive and professional software career afterward.

As a bonus, here is a bit of mild criticism from Jeff Atwood and some critical insights from Mark Dominus

like image 74
Matthew Vines Avatar answered Oct 21 '22 20:10

Matthew Vines


Alan Kay himself is very critical about patterns because he doesn't believe software should be so vaunted. Here's a 2012 Dr. Dobbs interview with Kay.

"The most disastrous thing about programming — to pick one of the 10 most disastrous things about programming — there's a very popular movement based on pattern languages. When Christopher Alexander first did that in architecture, he was looking at 2,000 years of ways that humans have made themselves comfortable. So there was actually something to it, because he was dealing with a genome that hasn't changed that much. I think he got a few hundred valuable patterns out of it. But the bug in trying to do that in computing is the assumption that we know anything at all about programming. So extracting patterns from today's programming practices ennobles them in a way they don't deserve. It actually gives them more cachet."

like image 41
Molly Wright Steenson Avatar answered Oct 21 '22 22:10

Molly Wright Steenson