SolarNorth
Resources / Category definition

What is dark code?

4 min read

Dark code is production logic that runs, affects outcomes, and is no longer understood, documented, or owned by anyone currently accountable for the system. The term is narrower than legacy code, which describes age but not comprehension. It is narrower than dead code, which describes logic that no longer executes. Dark code is specifically the subset of active, running code whose behavior is no one's current responsibility to explain.

How systems accumulate it.

Dark code accumulates through ordinary organizational events. An engineer who wrote a subsystem leaves the company. Their context leaves with them. A contractor who integrated a third-party service finishes their engagement. Their documentation was informal or missing. An acquisition brings in an unfamiliar codebase, and the team that understood it was not part of the acquisition. A reorganization moves ownership of a service to a team that has never opened it. Most of these events are not catastrophic in isolation. They are the normal friction of a long-running engineering organization.

The accumulation is what makes them consequential. A system that has been in production for seven years has experienced dozens of these events. The result is not chaos; the result is a system that functions, correctly or correctly enough, while containing substantial regions that no one can explain.

Why existing tools miss it.

Static analysis tools find bugs. They do not answer the question of whether anyone understands the code they are scanning. Security scanners find vulnerabilities. They do not surface the code that is running safely but is nobody's current responsibility. Observability platforms find performance problems. They do not produce ownership maps. Code coverage tools find untested code. They do not identify the tested code that is nonetheless opaque to the current team. Each of these tools was built to answer a specific question, and each answers its question well. None of them were designed to answer the question at the center of dark code, which is a question about knowledge rather than code.

The business cost.

The cost of dark code is not hypothetical. Breach exposure increases through unknown integrations, every undocumented external call is a surface the security team does not know to protect. Compliance exposure increases through undocumented data flow. Operational exposure increases through single-point-of-knowledge dependencies that have already walked out the door.

Beyond specific exposures, dark code carries an underlying cost: the inability to make confident architectural decisions. A replatforming project, a migration, a security audit, or an acquisition due diligence all require answers to the question of what the system actually does. Dark code is the portion of the system that cannot answer that question.

What to do about it.

The first step is surfacing. A complete inventory of what is running, who owns it, who last modified it, and where the documentation diverges from reality is tractable in weeks, not quarters. SolarNorth's Illuminate engagement is built specifically for this phase. The second step is maintenance, continuous observation against the baseline to prevent re-accumulation. This is Plumbline. The combination is the SolarNorth method.

Naming the category.

Dark code is not an acceptable state of affairs. It is, however, a common one. Naming the category is the first step toward treating it as an addressable engineering discipline rather than an inherited condition.

The category has a name. The instrument is available.

Request a Diagnostic