YAGNI principle
The YAGNI principle is a software design discipline of avoiding functionality or structure until a concrete need for it arises.
Build High Value Software Systems
A software design discipline that delays adding structure until a concrete requirement demonstrates the need for it.
- How it is used
- Guides legacy-system changes by letting real requirements pull abstractions rather than adding speculative structure.
- How deep it goes
- Works through notification iterations from one function to a conditional to multichannel selection.
- Examples
- Contrasts unused notification plugins with email-only, email-and-SMS, and multichannel implementations.
- What you can do after
- Practice/perform it by making the smallest current change and deferring extension points until a requirement justifies them.
Read how Build High Value Software Systems explains YAGNI principle →
The Coder Cafe
The YAGNI principle, meaning “You Aren’t Gonna Need It,” advises against implementing functionality until it is actually required.
- How it is used
- Guides decisions about whether to add functionality now or defer speculative work in a maintainable codebase.
- How deep it goes
- Defines the principle, lists five warning signs, and discusses benefits and exceptions without prescribing a formal decision procedure.
- Examples
- Uses an online ordering delivery interface to contrast item-specific methods with a method accepting a domain object.
- What you can do after
- Evaluate proposed features, abstractions, and optimizations against current needs while recognizing cases that warrant planning ahead.
Machine Learning System Design
YAGNI is a software design principle that advises implementing functionality only when it is actually needed.
- How it is used
- Limits complexity and maintenance burden by discouraging functionality or abstraction that current requirements do not justify.
- How deep it goes
- Defines the principle and illustrates its tradeoff, but stops short of a formal decision procedure or implementation checklist.
- Examples
- Uses a metric pipeline, contrasting repetitive code with metaprogramming, and an overkill model that consumes business resources.
- What you can do after
- Apply YAGNI by choosing the simplest design that satisfies current requirements and resisting speculative abstractions.
Read how Machine Learning System Design explains YAGNI principle →
Build Financial Software with Generative AI (From Scratch)
YAGNI is the software-development principle of avoiding functionality and complexity until they are actually needed.
- How it is used
- Guides incremental project decisions by limiting unnecessary implementation and infrastructure during MVP development.
- How deep it goes
- Defines the principle and applies it to database setup, but stops short of a formal decision checklist.
- Examples
- Uses ACH-file storage, PostgreSQL, CloudBeaver, file or in-memory alternatives, and generated Docker Compose configurations.
- What you can do after
- Evaluate proposed features and infrastructure, then implement only the complexity justified by current project requirements.
Read how Build Financial Software with Generative AI (From Scratch) explains YAGNI principle →
Unit Testing Principles, Practices, and Patterns
YAGNI is the principle of avoiding implementation of functionality until it is actually needed.
- How it is used
- Guides decisions about speculative functionality, interfaces, and future-proofing during implementation.
- How deep it goes
- Explains the principle through opportunity cost, changing requirements, ownership cost, and the limits of single-implementation interfaces.
- Examples
- Uses single-implementation interfaces and hypothetical future functionality as examples of premature design.
- What you can do after
- Evaluate proposed abstractions and defer code whose need has not yet emerged.
Read how Unit Testing Principles, Practices, and Patterns explains YAGNI principle →
Also covered in
What to know first
- abstractionAbstraction is a simplified representation that preserves relevant properties or behavior while omitting details unnecessary at a given level or for a given purpose.
- microservice architectureMicroservice architecture is a software architectural style that structures an application as independently deployable services, typically organized around focused capabilities and communicating through defined interfaces.
- wasteWaste is activity or resource consumption that does not contribute useful value to an intended product, process, customer, or organizational outcome.
Related concepts
- pull modelkind of · A pull model is a communication pattern in which a consumer initiates requests to retrieve data, messages, or work according to its needs or readiness.
- overengineeringaddresses · Overengineering is designing or implementing a solution with more complexity, structure, or capability than its requirements justify.
- pull-based designkind of · A design pattern in which concrete requirements pull only the structure needed to satisfy them into a codebase.
- scalabilitycontrasts with · Scalability is the ability of a system or process to accommodate growth in workload, size, or demand while maintaining acceptable operation.
Questions about YAGNI principle
What is YAGNI principle?
The YAGNI principle is a software design discipline of avoiding functionality or structure until a concrete need for it arises.
Which Manning books explain YAGNI principle?
Build High Value Software Systems, The Coder Cafe, Machine Learning System Design, Build Financial Software with Generative AI (From Scratch) and Unit Testing Principles, Practices, and Patterns.
What should I know before learning YAGNI principle?
Manning books that teach YAGNI principle usually introduce abstraction, microservice architecture and waste first.
What is the difference between YAGNI principle and scalability?
The YAGNI principle is a software design discipline of avoiding functionality or structure until a concrete need for it arises. Scalability is the ability of a system or process to accommodate growth in workload, size, or demand while maintaining acceptable operation.
What is YAGNI principle a kind of?
YAGNI principle is a kind of pull model. A pull model is a communication pattern in which a consumer initiates requests to retrieve data, messages, or work according to its needs or readiness.
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.




