liveBook · Manning

Entropy

As explained in Unit Testing Principles, Practices, and Patterns

The increasing disorder and complexity that accumulates in a codebase as it is changed without sufficient cleanup.

Software entropy is the increasing disorder and complexity that accumulates as a codebase changes without sufficient cleaning and refactoring. Development begins quickly, then slows as modifications introduce bugs, break related behavior, and make stability harder to restore. section 1.2 section 1.6

Use these principles to limit entropy:

  • Refactor continuously so new changes do not compound existing disorder. section 1.2
  • Maintain good unit tests as a safety net against regressions during feature work and refactoring. section 1.2 section 1.6
  • Judge tests by positive net value rather than coverage numbers alone; high coverage does not guarantee quality. section 1.6
Figure 1.1. The difference in growth dynamics between projects with and without tests. A project without tests has a head start but quickly slows down to the point that it’s hard to make any progress.

Compare the growth dynamics of projects with and without tests: an untested project starts faster but enters stagnation sooner. section 1.2

How Unit Testing Principles, Practices, and Patterns covers it

How deep it goes
Defines deterioration, explains its effects, and stops short of mathematical treatment or detailed refactoring procedures.
Examples
Uses growth-dynamics figures contrasting projects with and without tests, plus bug cascades caused by changes.
What it assumes
Assumes only familiarity with changing a codebase; defines entropy, regression, and testing rationale directly.
What you can do after
Evaluate maintenance practices by identifying disorder, prioritizing refactoring, and retaining tests with positive net value.
How it connects
Connects software entropy with unit testing, refactoring, regressions, code quality, and sustainable software growth.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Unit Testing Principles, Practices, and Patterns. The section links point to the parts of the book it draws on.