the everyday smells beneath the stateful ones
Common Software Defects
The everyday defects in every codebase, read by how they're caught: readability smells a reviewer sees (duplication, magic numbers, bad names), correctness bugs tests catch (DRY violations, off-by-one, sloppy error handling), and security defects a scanner finds (SCA, SAST, DAST). Most don't crash on their own -- they make the stateful bugs harder to see, and the worst of them become vulnerabilities.
Code smells suggest software defects; software defects suggest vulnerabilities. These are the smells everyone makes.
The defects in detail
In practice
Unlike the three stateful families, these defects rarely crash on their own — they're the everyday smells that make the stateful bugs harder to see, and the worst of them harden into vulnerabilities. Read them as a 3×3 by how each is caught: a reviewer or linter spots the readability smells (copy-pasta, magic numbers, bad names), tests and types catch the correctness bugs (DRY violations, off-by-one, sloppy error handling), and a scanner finds the security defects (dependency drift via SCA, injectable code via SAST, runtime exposure via DAST). It shows up as anything from a fix you must make in five places to a query a pen-tester turns into a breach — and the tools that make it easy are the most ordinary ones in the editor: copy & paste, a hard-coded literal, an empty catch, an unpinned dependency.
How it shows up
- The same change has to be made in several places
- Numbers and strings with no explanation
- Names that have to be decoded before they're understood
- Errors swallowed by empty catch blocks
- “Works on my machine” traced to a version drift
- A scanner flags an injectable query or an exposed endpoint
Tools that hurt
Good names have these qualities
Objects & classes are noun phrases. Methods & functions are verb phrases.
Philosophies & antidotes
- DRY: Don't Repeat Yourself
- Refactoring Guru: Code Smells
- OWASP Top Ten
- Semantic Versioning
- Lockfiles for all
This family maps to the CWE pillar: CWE-710 — Improper Adherence to Coding Standards