Design patterns have (mostly) flopped

Monday, October 4th, 2010

Design patterns have (mostly) flopped, Andrew Stuart says:

The idea behind design patterns is that they are tried and true solutions to recurring problems in software development. When a programmer encounters one of these recurring problems they implement the appropriate design pattern to solve it. Design patterns have been worked out by some of the smartest computer scientists and tested over time so they are solid and known to be good solutions. With design patterns, the programmer does not need to come up with their own solutions to a whole range of programming challenges; instead they use pre-rolled design patterns. Design patterns save development time and lead to more flexible, reliable and robust software. Design patterns is about reusing the conceptual ideas, solution design and thinking of other people. It’s a great idea and make a whole lot of sense.

But here’s the awful truth: design patterns have (mostly) flopped.

Design patterns depend on programmers recognising those recurring problems as they encounter them. But if the programmer doesn’t recognise the problem then they don’t know that it has been solved before and they don’t know that there is a design pattern for it. Instead of applying well known solutions to common problems, programmers who don’t know design patterns are constantly reinventing the wheel and coming up with their own (probably sub-par) solutions to those problems. They are taking more time to write less reliable code.

Design patterns have flopped because most programmers don’t know design patterns well enough to recognise the recurring problems that they solve. If you don’t recognise the problem then you can’t solve it with a design pattern.

Leave a Reply