AntiPatterns

DEVELOPMENT · LAVA FLOW

Lava Flow

CATALOG ENTRY
The Lava Flow of obsolete technologies and forgotten extensions leaves hardened globules of dead code in its wake.

On a data-mining expedition through a research-originated system, the authors asked developer after developer what a given class did. The answer, again and again: "I don't know what that class is for; it was written before I got here." Between 30 and 50 percent of the code in that system was unowned, and no one would delete it for fear of breaking something no one understood.

Fig. 5.10 — the Lava Flow
Fig. 5.10 — the Lava Flow
"Oh that! Well Ray and Emil (they're no longer with the company) wrote that routine back when Jim (who left last month) was trying a workaround for Irene's input processing code (she's in another department now, too). I don't think it's used anywhere now, but I'm not really sure. Irene didn't really document it very clearly, so we figured we would just leave well enough alone for now. After all, the bloomin' thing works doesn't it?!"
The kind of comment that starts a Lava Flow
The kind of comment that starts a Lava Flow

Lava Flow is common in shops where proof-of-concept or prototype code moves into production without a clear architecture behind it. The dead sections are expensive to analyze, expensive to test, and expensive to load, and they cost the project the reuse and modularity an object-oriented design was supposed to buy in the first place.

Refactored Solution

Sound architecture has to precede production code, backed by a configuration management process that keeps the system compliant with that architecture as requirements change. Where Lava Flow already exists, the fix means a system discovery activity: find out what is actually used, delete the rest, and expect a few bugs to surface as dependencies you didn't know about get removed.

Specification
Also Known As
Dead Code
Most Frequent Scale
Application
Root Causes
Avarice · Greed · Sloth
Unbalanced Forces
Management of Functionality, Performance, Complexity
Refactored Solution
Architectural Configuration Management
© Copyright 2017–2026 William Brown, Raphael Malveau, Hays McCormick, Thomas Mowbray, and Scott W. Thomas. All rights reserved.
For problems or questions regarding this web contact [Web Master].
Last updated: September 12, 2026
View the 1999 site — Nostalgia ↗