Comparison
Anti-patternvsDesign pattern
Anti-pattern
someone named the shape you had just described and the argument stopped, because everyone had seen it before.
A commonly-reached-for solution that reliably makes things worse, named so that it can be identified without re-deriving why. The definition includes a second half people forget: a real anti-pattern comes with a refactored alternative, otherwise it is just a complaint. It is also a word that gets used to end discussions rather than have them, which is worth watching for.
Full entry →Design pattern
someone described a solution in four words and everyone in the room pictured roughly the same code.
A named, reusable arrangement of objects for a recurring design problem, along with the trade-offs of using it. The value was never the code — most patterns are a dozen lines — it is the name, which turns a five-minute explanation into a two-word one. The failure mode is treating the catalogue as a shopping list rather than a vocabulary, which is how a codebase ends up with an abstract factory producing one product.
Full entry →