We will focus solely on how clearly and starkly code presents its intention: its Signal-to-Noise Ratio (SNR).
We will explore this one aspect as a potential replacement for other measures and heuristics of code quality.
When the meaning and mechanics of any passage (paragraph, function, or page) of source code are both apprehended easily, that code is
- faster to skim
- faster to read deeply
- faster to improve
- quickly identified or excluded as the site of a defect
Reaching that point of easy comprehension is trickier. Relying on catalogs of code smells and/or automated code quality metrics can leave a lot of room for misunderstanding:
- One passage of code may strictly have low cyclomatic complexity, low line count, no constants, low operator density, and longer variable names but remain tricky to modify
- Another passage can be terse, dense, and use short names but remain easy to understand and modify until the metrics system requires a developer to make it less dense and thereby less understandable.
Come see some examples of low-signal (or high-noise) software, in a “before and after” format, and let’s discuss how and whether this one aspect makes code craft more learnable and teachable, and deepens your awareness of code quality.