liveBook · Manning

YAGNI principle

The YAGNI principle is a software design discipline of avoiding functionality or structure until a concrete need for it arises.

How 5 Manning books explain it

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.

Read how The Coder Cafe explains YAGNI principle →

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

Related concepts

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.