# Design Patterns

Design Patterns can be seen as repeatable solutions to common problems arising in software design. They provide a great, language-agnostic way of talking about software architecture.

"Head First Design Patterns" explains simply:

> Design patterns don't go directly into your code, they first go into your BRAIN. Once you've loaded your brain with good working knowledge of patterns you can start to apply them to your new designs

There are a number of benefits to considering using a design pattern:

* Helps your system prepare for accommodating change - an inevitability of software development
* Allows for a shared language when describing a system - you can "say more with less"
* Can lead to a better designed system (through _appropriate use_ of a design pattern)

There are 23 'Gang of Four' patterns that are generally considered the foundation for all other patterns. They are categorised into three groups: Creational, Structural and Behavioural.

## Criticisms

[SourceMaking](https://sourcemaking.com/design_patterns) highlights some of the criticisms of using design patterns:

* Targets the wrong problem
* Lacks formal foundations
* Leads to inefficient solutions
* Does not differ significantly from other abstractions

Some argue that design patterns ultimately boil down to good software design with careful consideration of SOLID principles. [Jeff Atwood also has some thoughts on design patterns](http://blog.codinghorror.com/rethinking-design-patterns/)
