Defensive Default
A substituted value that papers over a missing input and hides the misconfiguration that produced it.
A defensive default is a value supplied when a real one is missing, so the program can continue. Used well it is ordinary hygiene; used on identity or configuration values it is a way of converting a loud, local failure into a quiet, distant one.
The tell is whether the default can be wrong. An empty array standing in for an absent list cannot be wrong — nothing downstream misbehaves. A hostname, port, tenant identifier, API key, or feature-flag value absolutely can be, and a default silently supplies a plausible answer to a question the environment failed to answer. The environment stays broken; only the symptom moves.
Defensive defaults also distort verification. A fallback branch that is unreachable in one environment and reachable in another produces coverage numbers that differ by machine, and a test that never exercises the real path. Removing the fallback often removes the untestable branch along with it — see Unreachable Code and Branch Coverage.
A related shape is the defensive guard: a null check protecting against a state the surrounding invariant makes impossible. It reads as caution and behaves as noise, since no input can reach it and no test can cover it.
See also8
Environment Variable
A named value in a process's environment, inherited by its children — the standard configuration channel.
Systems & Tooling23 connections
Coverage Gate
A build check that fails when coverage falls below a threshold, and what that pressure produces.
Testing & Verification16 connections
Schema Validation
Checking data against a declared shape at runtime, and using the result as the typed value.
Agents & Language Models22 connections
Fail Fast
Crash at the point of misconfiguration rather than degrading quietly into a wrong state.
Method27 connections
Silent Failure
A failure that produces no signal, so the absence of an error reads as success.
Method73 connections
Secret Management
Storing, distributing, and rotating credentials without embedding them in code or history.
Systems & Tooling33 connections
Chesterton's Fence
Do not remove something whose purpose you cannot explain.
Method23 connections
Fail-Safe
A design principle in which a system that breaks falls into a safe state rather than a dangerous one, as when a railway signal drops to stop or a train's brakes apply if their air line is cut.
Testing & Verification6 connections
Linked from14
- Branch CoverageTesting & Verification
The proportion of conditional outcomes exercised — the strictest ordinary coverage metric, and the most informative.
- Branch ProtectionVersion Control & Delivery
Server-side rules that stop people from pushing straight to important branches, requiring reviews, passing checks, and intact history instead.
- Chesterton's FenceMethod
Do not remove something whose purpose you cannot explain.
- Environment VariableSystems & Tooling
A named value in a process's environment, inherited by its children — the standard configuration channel.
- Fail FastMethod
Crash at the point of misconfiguration rather than degrading quietly into a wrong state.
- Fail-SafeTesting & Verification
A design principle in which a system that breaks falls into a safe state rather than a dangerous one, as when a railway signal drops to stop or a train's brakes apply if their air line is cut.
- FirewallNetworks & Distribution
A filter that allows or blocks network traffic by rule, the oldest perimeter defense, and less sufficient on its own than it used to be.
- MonadComputation & Algorithms
A wrapper type with a way to lift a value in and a way to chain functions that return more wrappers.
- Postel's LawMethod
Be conservative in what you produce, liberal in what you accept — a design rule for interoperating systems.
- Secret ManagementSystems & Tooling
Storing, distributing, and rotating credentials without embedding them in code or history.
- Silent FailureMethod
A failure that produces no signal, so the absence of an error reads as success.
- Time ZoneSystems & Tooling
Civil time is a political layer over solar time, and its rules change often enough to be data.
- Unreachable CodeTesting & Verification
Code no input can execute — usually a guard against a state the surrounding invariants forbid.
- Web StorageWeb Platform
The browser's built-in ways to keep data on the user's device, from the simple string store localStorage to the transactional database IndexedDB, and their limits on size, persistence and security.