clean code
Well-structured software writing
Clean code is source code that is easy to read, understand, and maintain.
The term implies simplicity, clear naming, logical organization, and minimal redundancy—code that communicates its intent to other programmers (or to your future self).
We spent the afternoon refactoring the spaghetti into clean code.
The concept is often associated with professional software craftsmanship, where readability matters as much as functionality.
Code improvement, same behavior
- modularityDivisibility into independent units
- documentationWritten proof or instructions
- testabilityCapacity for verification
- version controlTracks changes to files
peer review · debugging · error handling · technical debt · changeability · extensibility · backwards compatibility · deprecation
Standards for assigning labels
- self-documentingDescribes its own function
- commentsSpoken or written reactions
- indentationInward cut or setback
- formattingStructuring visual presentation
whitespace · consistency · clarity · legibility · comprehension · structure · annotations · readable
Distilling to essential qualities
- encapsulationSurrounding on all sides
- decouplingRemoval of interdependence
- cohesionTendency to bind together
- polymorphismMany forms, one interface
Maximizing efficiency or performance
- performanceCarrying out a task
- algorithmFinite problem-solving procedure
- runtimeProgram execution duration
- memory managementCoordinating program RAM usage
Design philosophy favoring simplicity
- fail fastTest early, adjust sooner
- broken windows theoryDecay signals tolerance for crime
refactoring
Code improvement, same behavior
- modularityDivisibility into independent units
- documentationWritten proof or instructions
- testabilityCapacity for verification
version control · peer review · debugging · error handling · technical debt · changeability · extensibility · backwards compatibility · deprecation
naming conventions
Standards for assigning labels
- self-documentingDescribes its own function
- commentsSpoken or written reactions
- indentationInward cut or setback
formatting · whitespace · consistency · clarity · legibility · comprehension · structure · annotations · readable · understandability
abstraction
Distilling to essential qualities
- encapsulationSurrounding on all sides
- decouplingRemoval of interdependence
- cohesionTendency to bind together
optimization
Maximizing efficiency or performance
- performanceCarrying out a task
- algorithmFinite problem-solving procedure
- runtimeProgram execution duration
memory management · caching · profiling · data structures · early return
KISS principle
Design philosophy favoring simplicity
- fail fastTest early, adjust sooner
- broken windows theoryDecay signals tolerance for crime
- software developmentcoding, programming, bug, debug, debugging
- tech resourcestutorials, manuals, user guides, reference books, handbooks
- programmingvariables, functions, for, function, debugger
- code styleindentation, naming conventions, formatting, conventions, consistency
- coding principlesKISS, KISS principle, keep it simple, refactoring, abstraction
- Agile Developmentagile, XP, refactoring, iteration, sprint
clean codedirty code
Poorly structured programming
spaghetti code · bad code · legacy code · code smell · technical debt
clean codetechnical debt
Accumulated coding shortcuts
cruft · bit rot · legacy code · kludge · hack
clean, code, cleaner, unclean, cleanliness, cleans, cleansing, cleanness, cleanup