What are design patterns, and do they still matter?
Design patterns are named, reusable solutions to recurring design problems — vocabulary for structures that experienced developers kept independently reinventing. The idea was popularised by the 1994 book Design Patterns by four authors collectively known as the Gang of Four.
What a pattern actually is. Not code you copy, and not a library. It is a description of a problem, a solution shape, and the trade-offs. The value is largely in the name — saying "this is an observer" communicates a structure in two words that would otherwise take a paragraph.
The three traditional categories:
Creational — how objects get made. Factory, builder, singleton.
Structural — how objects compose. Adapter, decorator, facade, proxy.
Behavioural — how objects interact. Observer, strategy, command, iterator, state.
The ones that genuinely earn their place: strategy (swap an algorithm), adapter (make an incompatible interface fit), observer (notify dependents of change — the basis of every event system), facade (a simple front over a complicated subsystem), and iterator — now so standard it is built into most languages' syntax.
The honest criticisms:
Several patterns are workarounds for missing language features. Strategy and command are largely unnecessary where functions are first-class values; the iterator pattern is now for...of. As languages absorbed these capabilities, the patterns became invisible rather than obsolete.
Singleton is widely regarded as an anti-pattern — global mutable state with a respectable name, and a persistent obstacle to testing.
Pattern-driven design produces over-engineering. Choosing patterns first and fitting the problem to them is a recognisable failure mode, and it produces the abstract-factory-of-factories code that gave the field a bad reputation.
The reasonable modern position: learn them as vocabulary and as a catalogue of trade-offs, recognise them when they emerge naturally, and do not reach for them preemptively. The underlying advice — program to interfaces, prefer composition over inheritance — has aged considerably better than the specific catalogue.