An anti-pattern is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive.
The term was popularized by the book AntiPatterns, which extended its use beyond the field of software design to refer informally to any commonly reinvented but bad solution to a problem. Examples include analysis paralysis, cargo cult programming, death march, groupthink, and vendor lock-in.
According to the authors of Design Patterns, there are two key elements that distinguish it from a bad habit, bad practice, or bad idea:
-
The anti-pattern is a commonly-used process, structure of pattern of action that, despite intially appearing to be an appropriate and effective response to a problem, has more bad consequences than good ones.
-
Another solution to the problem the ant-pattern is attempting to address exists, and documented, repeatable and proven to be effective where the anti-pattern is not.