An anti-pattern is a common "solution" to a problem that looks logical at first glance but causes harm in practice: it complicates code, reduces performance, or creates new problems.
Common anti-patterns
God Object — a class that knows and does everything. Violates SRP. Sign: more than 500 lines and 20+ methods
Magic Numbers — unnamed numbers directly in code: if ($status === 3). Replace with constants or enums
Copy-Paste Programming — duplicating code instead of abstracting. DRY violation
Premature Optimisation — optimising before measuring where the problem is
Spaghetti Code — tangled execution flow with no clear structure
Golden Hammer — applying one tool to every problem
Lava Flow — legacy code nobody touches out of fear of breaking something