Skip to content

Lehman's law of increasing complexity

Observe that the structural, behavioral, and conceptual complexity of an evolving software system rises monotonically under unmanaged change — an entropy-positive default that only deliberate, non-feature restructuring can bend back down.

Core Idea

Lehman's second law is the empirical observation that the structural, behavioral, and conceptual complexity of an evolving E-type software system grows monotonically as the system changes, unless work is explicitly and continuously expended to reduce it. Each change adds code paths, coupling, special cases, and conceptual surface; absent deliberate restructuring these increments compound. The directional claim is thermodynamic: unmanaged change is entropy-positive, and reversing the direction requires non-feature restructuring — refactoring, modularization, deprecation, interface simplification.

How would you explain it like I'm…

The Messy Room Rule

When you keep adding new toys to your room and never tidy up, it gets messier and messier. Soon it's hard to find anything or to fit anything new in. Big computer programs are like that: every change makes them a little messier unless someone stops to tidy up.

Tangles Grow Unless Tidied

Lehman's law of increasing complexity says that as people keep changing a program, it gets more complicated unless someone works on purpose to keep it simple. Each change adds new paths, special cases, and connections between parts. Over time those pile up, and the program gets harder to understand, fix, and test. Cleaning it up, called refactoring, doesn't add new features, but it makes future changes easier. If nobody cleans up, adding new features gets slower and slower.

Software Entropy Law

Lehman's law of increasing complexity observes that the complexity of real-world software grows steadily as it evolves, unless effort is continuously spent to control it. Every change adds code paths, coupling between modules (parts depending on each other), special cases, and more ideas a developer must keep in mind. These effects compound: more paths mean more possible interactions, and more coupling makes it riskier to change nearby code. It's a bit like entropy in physics, where the default direction is toward more disorder. Refactoring and modularization can reverse it, but that work adds no visible features. Because systems also need to keep growing, projects that never clean up eventually spend most of their effort just coping with complexity.

 

Lehman's second law, the law of increasing complexity (1974, formalized with Belady in 1980, restated in 1996), holds that the structural, behavioral, and conceptual complexity of an E-type system increases monotonically as it evolves, unless work is explicitly spent to maintain or reduce it. Each change adds code paths, inter-module coupling, special cases, and conceptual surface. Without restructuring such as refactoring, modularization, dead-code removal, and interface simplification, these compound and shrink the safe change envelope. The claim is thermodynamic in flavor: unmanaged change raises entropy. Reducing complexity requires non-feature-bearing work that lowers coupling density and cognitive load for future changes. Belady and Lehman measured the trend on OS/360 releases with Halstead and McCabe metrics. Later Linux kernel studies (Israeli and Feitelson, 2010), along with work on GNU utilities and GCC, confirmed it. Combined with the sixth law's need for growth, unrefactored growth leads to collapsing feature velocity as complexity eats engineering capacity.

Scope of Application

Increasing complexity lives within software engineering — the empirical-software-evolution, architecture, and maintenance subfields where long-lived codebases accumulate structure.

  • Empirical software evolution — the home; quantified on OS/360, then Linux, GNU utilities, GCC with coupling and modularity metrics.
  • Software architecture and design — fixes the sign of the complexity trend, independent of team skill.
  • Refactoring and technical-debt management — reframes non-feature restructuring as the only curve-bending force.
  • Project and capacity planning — read with conserved-throughput and growth laws, forecasts velocity collapse.
  • Software-metrics research — supplies the Halstead/McCabe/modularity operationalization of the trajectory.

Clarity

The law's clarification is that complexity has a direction — monotonically up under unmanaged change — independent of the team's intent or skill. This separates complexity-as-carelessness (fixable by trying harder) from complexity-as-default-trajectory, in which each clean change still adds a path, a coupling, a special case. It reframes accumulating cruft from negligence into the expected outcome of any change history, and non-feature restructuring from optional tidiness into the only corrective force.

Manages Complexity

Change by change, complexity accumulation looks like a vast bookkeeping problem. The law compresses it into one directional statement about a single quantity: complexity rises monotonically under unmanaged change, so the analyst reads the state off two things — accumulated change history and whether restructuring kept pace. Read with the growth and conserved-throughput laws, it makes a slow failure mode legible: feature velocity is silently reallocated toward navigating an ever-larger structure until it collapses on schedule.

Abstract Reasoning

The law licenses a sign-fixed trend reading (inferring high, rising complexity from much-change/little-restructuring without auditing increments), a negligence-versus-entropy diagnosis (classifying cruft as evolution's default, ruling out the "good team, controlled complexity" branch), a restructuring-rate-versus-growth-rate comparison, and a velocity-collapse forecast that reads an old system's decline as a destination reached on schedule rather than a surprise.

Knowledge Transfer

Within software engineering the law transfers literally across every long-lived E-type system, because its precondition — an evolving codebase whose complexity accumulates per change — holds in each case; the trend reading, the entropy diagnosis, and the velocity-collapse forecast move without translation from OS/360 through Linux to enterprise monoliths. Beyond software the portable claim is essentially the second law of thermodynamics generalized to evolving systems, recurring in legal codes, organizations, and genomes. That lesson is carried by Entropy (Thermodynamic Sense), Complexification (Lie group), and Temporal Decay and Degradation, not by Lehman's named law, whose home-bound cargo is the software-specific operationalization in code paths, coupling, and feature-velocity collapse.

Relationships to Other Abstractions

Local relationship map for Lehman's law of increasing complexityParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Lehman's law ofincreasing complexityDOMAINDomain-specific abstraction: Software Entropy — is a kind ofSoftware EntropyDOMAIN

Current abstraction Lehman's law of increasing complexity Domain-specific

Parents (1) — outgoing typed relations

  • Lehman's law of increasing complexity is a kind of Software Entropy Domain-specific

    Lehman's second law is the E-type-system specialization of software entropy's change-driven structural-disorder gradient.

Hierarchy paths (4) — routes to 3 parentless roots

Neighborhood in Abstraction Space

Lehman's law of increasing complexity sits in a crowded region of the domain-specific corpus (38th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Software Evolution Laws & Code Smells (17 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25