jargon

Architecture & practice·Risk, blast radius and change

you added a null check for a case the caller promised could never happen, and it happened.

Defensive programming

Writing code that survives inputs and states it believes to be impossible. It is right at trust boundaries, where the caller cannot be trusted, and it is expensive everywhere else: checks in the interior hide bugs, complicate reading and multiply the paths under test. The senior version of this argument is about where the boundary is, not about whether to check.

Commonly confused with