Implementation & Cognitive Load
Smells that make code hard to read or reason about.
Table of Contents
- Magic Numbers/Strings: Unexplained literals instead of named constants.
- Arrow Code / Deep Nesting: Excessive indentation levels.
- Uncommunicative Name: Names that don’t reveal intent.
- Inconsistent Names: Pick one word for one concept and stick with it.
- Hidden Side Effects: Function does more than it promises.
- Flag Arguments: Boolean arguments that split function behavior.
- Cargo Cult Programming: Copying code without understanding.
- Premature Optimization: Optimizing before it’s needed.
- Golden Hammer: Misapplying familiar technology to everything.