In computer science, anti-patterns are problems that happen frequently in computer programming and that should be avoided in good practice.
The term comes from the Gang of Four's Design Patterns book, which laid out examples of good programming practise. The authors termed these good methods "design patterns", while "anti-patterns" are the opposite.
Anti-patterns can also be referred to as pitfalls, to emphasise that they are a dangerous trap which an unwary programmer might find themselves in.
Among them are:
- abstraction inversion
- accidental complexity
- action at a distance
- accumulate and fire
- ambiguous viewpoint
- analysis paralysis
- big ball of mud
- blind faith
- boat anchor
- busy spin
- caching failure
- checking type instead of membership
- code momentum
- code smell
- continuous obsolescence
- copy and paste programming
- creeping featurism
- dead end
- design by committee
- DLL hell
- double-checked locking
- empty subclass failure
- God object
- input kluge
- interface bloat
- hard code
- lava flow
- magic numbers
- magic pushbutton
- mushroom management
- poltergeists
- premature optimization
- procedural code
- reinventing the wheel
- Reinventing the Square Wheel
- smoke and mirrors
- software bloat
- spaghetti code
- stovepipe system
- vendor lock-in
- warm bodies