Skip to content

Software Decay & Debugging

Abstractions about why code degrades and resists diagnosis — accreted cruft like lava flow and comment-as-deodorant, elusive defects like Heisenbugs and Mandelbugs, and processes that catch or repair problems, from formal verification and Linus's Law to merge conflicts and repairability.

10 abstractions in this family — domain-specific abstractions that sit near one another in structural-signature space (k-means over structural-signature embeddings). Each is shown with its short description.

  • Adaptive Reuse — Retain an existing building's physical substance — structure, envelope, site, silhouette — while replacing the function it serves, fitting a new program into the inherited constraint envelope rather than designing a building around the program.
  • Comments as Deodorant — Read the need for an explanatory comment as a diagnostic signal, not a virtue — a clear paragraph explaining a confusing function masks a retirable design problem instead of fixing it, so do the rename or split that retires the comment rather than maintaining it.
  • Formal Verification — Establish with the rigor of a theorem that an engineered artifact satisfies a precisely stated specification by producing a machine-checkable proof that holds over every input in scope at once, rather than sampling behavior on tested inputs the way testing does.
  • Heisenbug — Name the software defect whose failure vanishes under observation because attaching a debugger, adding a print, or disabling optimization perturbs the timing window or interleaving it rides on — so disappearance-under-observation is the diagnostic tell, not evidence the bug is gone.
  • Lava Flow (Anti-Pattern) — Explain why obsolete or unused code hardens into a codebase when uncertain dependencies and inadequate verification make deletion seem riskier than indefinite retention.
  • Lava Flow Anti Pattern
  • Linus's Law — Given enough eyeballs, all bugs are shallow: defect discovery scales with the size and diversity of the pool of independent inspectors examining code — provided they are skilled, motivated, and actually reading it, not merely granted access.
  • Mandelbug — Reclassify a chaotic, irreproducible software defect as deterministic-but-undersampled — triggered by a rare joint configuration of hidden state — so effort shifts from finding the right breakpoint to sampling that joint state until the configuration is caught.
  • Merge Conflict — Halt an automatic merge and hand the decision to a human exactly where two branches diverged from their common ancestor on the same region, because a three-way merge over text can rank a one-sided edit but has no syntactic basis to choose between two competing edits whose correctness lives in intent it cannot see.
  • Repairability — The scored design property of a physical artefact measuring how cheaply and reliably a failed instance can be restored by component replacement rather than whole-unit replacement — a conjunction of accessible disassembly, modularity, documentation, parts availability, and software support.