Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M0245

The Law of Leaky Abstractions

The Law of Leaky Abstractions
TechnicalHigh supportSoftware Engineering
Included
account_tree

Updated 2026-07-30

Loading revision record…

Summary

All non-trivial abstractions leak details.

Definition

Any abstraction layer inevitably exposes some of its underlying details to the user; when the underlying layer fails or behaves abnormally, the abstraction 'leaks', forcing the user to understand the implementation beneath it.

How to use

All non-trivial abstractions leak details.

Mechanism

The Law of Leaky Abstractions (also known as Spolsky's Law) states that all non-trivial abstractions leak underlying details in some situations, forcing users to still understand the lower layers. It reminds us that abstractions can reduce but not eliminate complexity, especially at boundaries.

Practice

In progress 0/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • TCP abstracts reliable transmission, but timeouts and retransmissions still leak into application experience. ORMs hide SQL but expose it when slow queries occur.

Common pitfalls

  • Blindly trusting that abstractions are fully transparent, only to be forced to understand the underlying details when problems occur, often too late. Or, to avoid leakage, abandoning all abstractions and reverting to writing everything from scratch.
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Leaky_abstractionZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS