Abstraction
Abstraction is a simplified representation that exposes relevant properties or behavior while omitting lower-level details unnecessary for a given purpose.
Get Programming: Learn to code with Python
An abstraction is a simplified representation that preserves essential characteristics while hiding unnecessary implementation detail.
- How it is used
- Helps organize larger programs by letting code use smaller tasks and objects without following every implementation detail.
- How deep it goes
- Defines abstraction through inputs, behavior, and outputs, then applies it to function docstrings and classes.
- Examples
- Uses online ordering, attendance documentation, a stack of pancakes, and card-game objects to show hidden details in use.
- What you can do after
- Build it from scratch by dividing a task into modules, documenting function behavior, and using classes to separate gameplay from object definitions.
Read how Get Programming: Learn to code with Python explains abstraction →
Simple Object-Oriented Design: Create clean, maintainable applications
An abstraction is a simplified model that exposes relevant behavior or structure while hiding unnecessary implementation details.
- How it is used
- Controls complexity by adding variable functionality without repeatedly modifying existing classes.
- How deep it goes
- Defines abstractions, contracts, extension points, decision triggers, and maintenance tradeoffs, while deferring implementation and design-pattern instruction.
- Examples
- Uses bookstore discount rules, growing conditional classes, databases, remote services, caching, and file storage.
- What you can do after
- Apply it by identifying variability or leaking details, then introducing a small stable contract and concrete implementations.
Deep Learning with R, Third Edition
An abstraction is a compact, reusable representation of underlying structures, principles, or invariants extracted from experience or data.
- How it is used
- Uses reusable ideas to explain how unfamiliar situations can be understood through prior experience.
- How deep it goes
- Defines acquisition and recombination, compares two forms of abstraction, and identifies a deep-learning limitation without providing an implementation.
- Examples
- Illustrates abstraction with beetle prototypes and analogies such as describing a jet plane as a metal bird.
- What you can do after
- Evaluate/understand why similarity-based recognition differs from structural reasoning and why familiar-input performance does not guarantee adaptation to novelty.
Read how Deep Learning with R, Third Edition explains abstraction →
100 Go Mistakes and How to Avoid Them
A software design technique that represents essential behavior or structure while hiding implementation details.
- How it is used
- Uses abstractions to make Go behavior reusable and to decouple callers from concrete implementations.
- How deep it goes
- Explains implicit interface satisfaction, works through I/O and storage examples, and diagnoses premature interfaces without developing interface internals.
- Examples
- Uses a reader-to-writer copy test, a sortable collection, and a customer storage dependency.
- What you can do after
- Build it from scratch by defining a small Go interface when a caller needs interchangeable behavior, rather than predicting future needs.
Read how 100 Go Mistakes and How to Avoid Them explains abstraction →
Unit Testing Principles, Practices, and Patterns
An abstraction is a representation that captures common behavior across multiple implementations while hiding implementation-specific details.
- How it is used
- Guides interface design, dependency boundaries, and extraction of complex logic for maintainable unit tests.
- How deep it goes
- Distinguishes genuine from speculative abstractions and demonstrates extraction, but stops short of formal abstraction theory.
- Examples
- Uses single-implementation interfaces and extracts Order.GetPrice into PriceCalculator.
- What you can do after
- Apply abstraction by recognizing real variation, avoiding speculative interfaces, and extracting complex logic into independently testable classes.
Read how Unit Testing Principles, Practices, and Patterns explains abstraction →
BDD in Action, Second Edition
Abstraction is the software design practice of separating an interface or high-level behavior from the details of its implementation.
- How it is used
- Improves automated acceptance tests by separating readable business rules from volatile UI and integration details.
- How deep it goes
- Explains layered decomposition and reusable abstractions, stopping short of a general software-design treatment beyond test automation.
- Examples
- Uses flight-search scenarios, sign-up task decomposition, Page Elements, and Serenity/JS interactions such as Click.on and Text.of.
- What you can do after
- Build it from scratch by modeling business tasks as reusable layers that keep acceptance scenarios readable and implementations maintainable.
Read how BDD in Action, Second Edition explains abstraction →
LLMs in Production
An abstraction is a generalized representation that captures relevant properties while omitting particular details.
- How it is used
- Frames language modeling as a sequence of representational layers whose omissions affect how meaning reaches a working model.
- How deep it goes
- Traces abstraction from cognition through programming representations and meaning-making, but stops short of fully developing semiotic philosophy.
- Examples
- Uses feelings, language, mathematics, binary, assembly, C, Python, Java, and recursive semiotic triangles as layered examples.
- What you can do after
- Evaluate how information loss and failure points accumulate between human experience, language, programming, and model output.
Learn Haskell by Example
A programming abstraction is a simplified interface or representation that hides implementation details while exposing useful behavior.
- How it is used
- Uses abstraction to turn complexity into reusable functionality and model domain problems without irrelevant implementation details.
- How deep it goes
- Explains abstraction through Haskell constructs, practical use cases, and a music-modeling design, while leaving low-level implementations behind the interface.
- Examples
- Uses reusable sorting, UNIX-style tools, document conversion, and a digital music box modeled with types, values, functions, and transformations.
- What you can do after
- Evaluate/understand when to hide irrelevant details and organize reusable Haskell models around a problem domain.
Machine Learning System Design
Abstraction is a technique for managing complexity by exposing higher-level operations while encapsulating lower-level implementation details.
- How it is used
- Uses abstraction to manage software complexity and shape simple, predictable APIs for machine learning systems.
- How deep it goes
- Defines abstraction, contrasts upfront architecture with agile change, and works through leaky interfaces, defaults, overrides, and model versioning.
- Examples
- Uses black-box software blocks, prediction functions, configurable parameters, and versioned model interfaces.
- What you can do after
- Apply it via API design by hiding unnecessary internals, choosing useful defaults, and preserving targeted controls for debugging.
Read how Machine Learning System Design explains abstraction →
The Art of Code
Abstraction is the representation of essential behavior or properties while concealing implementation details that are not necessary to a given user or level of reasoning.
- How it is used
- Separates system behavior from implementation to reduce cognitive load and keep growing code organized.
- How deep it goes
- Demonstrates interface-based refactoring and tradeoffs, but stops short of formal abstraction theory or debugging techniques.
- Examples
- Uses PDF, CSV, and Excel report generators to contrast conditional branching with a shared interface.
- What you can do after
- Apply abstraction via interfaces and polymorphism, while containing unavoidable complexity behind focused boundaries and documentation.
Python Workout, Second Edition
Abstraction is the representation of functionality at a level that hides lower-level implementation details.
- How it is used
- Reduces repetition and cognitive load by packaging behavior behind names, functions, objects, and interfaces.
- How deep it goes
- Explains the purpose and maintenance benefits of abstraction through functions and objects, but does not develop formal abstraction theory.
- Examples
- Uses repeated code, named programming actions, a bookshelf, and a replaceable average calculation to illustrate abstraction.
- What you can do after
- Apply abstraction by packaging repeated behavior in functions and separating object interfaces from changeable implementations.
Read how Python Workout, Second Edition explains abstraction →
Shipping Go: Develop, deliver, discuss, design, and go again
An abstraction is a simplified interface or representation that exposes essential behavior while hiding implementation details.
- How it is used
- Uses abstractions to isolate integrations, support testing, and choose how much deployment infrastructure developers manage.
- How deep it goes
- Explains interfaces and deployment trade-offs with analogies, but stops short of detailed implementation code.
- Examples
- Uses electrical outlets, integration stubs and mocks, cloud service layers, buildpacks, and containers as concrete examples.
- What you can do after
- Apply it via interfaces to modularize code, substitute test dependencies, and evaluate deployment trade-offs.
Read how Shipping Go: Develop, deliver, discuss, design, and go again explains abstraction →
Deep Learning with Python, Third Edition
An abstraction level that exposes simpler interfaces while hiding low-level implementation details.
- How it is used
- Explains how intelligence extracts reusable structures and recombines them to handle uncertainty, novelty, perception, and reasoning.
- How deep it goes
- Distinguishes acquisition from recombination and develops similarity-based prototypes versus exact structural matches, without implementation details.
- Examples
- Uses beetle clustering and prototypes, ARC-AGI, mathematical proof, and object recognition to contrast abstraction modes.
- What you can do after
- Evaluate unfamiliar problems by separating reusable abstraction acquisition from on-the-fly recombination and choosing similarity or structural comparison.
Read how Deep Learning with Python, Third Edition explains abstraction →
Platform Engineering on Kubernetes
An infrastructure abstraction is a simplified interface that hides the implementation details of underlying infrastructure resources.
- How it is used
- Reduces developer cognitive load by presenting infrastructure as simple platform resources instead of underlying cloud tooling.
- How deep it goes
- Defines interfaces, parameters, and JSON representation, but does not detail the complete provisioning implementation.
- Examples
- Uses Conference development environments with infrastructure installation and frontend debugging as configurable parameters.
- What you can do after
- Build it from scratch by defining a small environment API and encoding requests as JSON or YAML.
Read how Platform Engineering on Kubernetes explains abstraction →
The Art of Unit Testing 3e
A simplified boundary that hides implementation details while exposing a controlled interface to underlying behavior or dependencies.
- How it is used
- Stabilizes application code and tests by placing third-party dependencies behind controlled internal APIs.
- How deep it goes
- Demonstrates adapters, injected fakes, and reset functions, without detailing broader architectural implementation.
- Examples
- Uses logging through an adapter and date checking through an injected `moment` fake.
- What you can do after
- Apply controlled adapters and injected fakes to reduce upgrade risk and make dependency-focused tests less brittle.
Related concepts
- leaky abstractionincludes · A leaky abstraction is an abstraction whose behavior, limitations, or interface exposes details of its underlying implementation to its users.
- object-oriented programmingpart of · Object-oriented programming is a programming paradigm that organizes software around objects combining state and behavior, commonly using encapsulation, classes, inheritance, or polymorphism.
- dependency inversionused by · Dependency inversion is a design principle in which high-level policy and low-level implementation depend on abstractions rather than directly on each other.
- contractincludes · An API contract is a specification of the operations, data, and behavioral expectations that govern interactions between software components.
- Entity Framework Coreincludes · Entity Framework Core is a cross-platform object-relational mapping framework for .NET that enables applications to query and persist data through .NET objects and APIs.
- vendor lock-inaddresses · Vendor lock-in is dependence on a provider, product, or technology that makes switching to an alternative difficult, costly, or impractical.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.














