code smell
Suspicious software pattern
A code smell is a pattern in software that suggests something may be wrong with the underlying design—not a bug, but a hint that the code could be cleaner or more maintainable.
Common examples include duplicated logic, overly long functions, or classes that do too much.
Like a physical smell, it signals you should investigate: That deeply nested loop is a code smell.
Counterproductive common practice
- spaghetti codePoorly structured program
- dead codeProgram logic never executed
- magic numbersUnexplained literal values in code
- middle manAgent between parties
Ease of ongoing repair
- readabilityEase of understanding text
- complexityState of being complicated
- couplingJoint between systems
- cohesionTendency to bind together
modularity · technical debt · legacy code · bit rot · reusability · extensibility · scalability · testability
antipattern
Counterproductive common practice
- spaghetti codePoorly structured program
- dead codeProgram logic never executed
- magic numbersUnexplained literal values in code
maintainability
Ease of ongoing repair
- readabilityEase of understanding text
- complexityState of being complicated
- couplingJoint between systems
cohesion · modularity · technical debt · legacy code · bit rot · reusability · extensibility · scalability · testability · clean code
refactoring
Code improvement, same behavior
- software developmentcoding, programming, bug, debug, debugging
- codefunction, source code, variable, array, class
- antipatternsspaghetti code, dead code, technical debt, cargo cult, golden hammer
- code analysiscode review, linting, lint, semantic analysis, lexical analysis
- code problemstech debt, technical debt, spaghetti code, bugs, legacy code
- coding principlesKISS, KISS principle, keep it simple, clean code, refactoring
code smellsyntax error
Invalid code structure
bug · runtime error · crash · exception · type error