When a Pattern Hurts

When a Pattern Hurts: Pattern Fever: When a Pattern Makes Code Worse, Anti-Patterns: Mistakes with Names.

Updated

  1. Pattern Fever: When a Pattern Makes Code Worse (Journeyman): A pattern is a fix for a problem, so a pattern with no problem to fix (a factory for a factory, a strategy with one choice, an interface with one class that will never have another) is pure cost: more classes and more jumps for no change made easier; the cure is the simplest thing that works, and the pattern comes back when its problem does.
  2. Anti-Patterns: Mistakes with Names (Journeyman): Teams keep making the same mistakes, as they keep finding the same fixes, and the mistakes have names too: the god object, the golden hammer, copy-paste programming and spaghetti code are anti-patterns, answers that look like they work, cause more trouble than they solve, and have a known better answer.