Code smells

Surface patterns in code that correlate with a deeper design problem, without being bugs themselves.


A smell is not wrong code; it is a hint that something nearby might be. Long methods, deep nesting, primitive obsession (using a raw string or number where a small dedicated type would catch misuse, like passing a currency amount as a plain number that can silently be added to a percentage), and shotgun surgery (a small change that requires edits across many files) are patterns experienced developers learn to notice because they tend to precede real defects or make the next change harder than it should be.

Naming them gives a team a shared vocabulary for design feedback that doesn't require re-deriving the argument from scratch in every review. Research on the topic traces many recurring smells back to specific gaps in a developer's understanding of the underlying design concepts, rather than to carelessness; this argues for treating a smell as a teaching moment, not just a lint rule to silence.