# You Aren't Gonna Need It (YAGNI)

> Do not build a feature until you really need it.

**Field:** Software Development  
**Category:** Programming Concepts  
**Also known as:** YAGNI, You Ain't Gonna Need It, You Aren't Going to Need It

## Think of it like

Think of it like not buying a pram before you have a baby. Wait until you need it.

## Definition

You aren't gonna need it, or YAGNI, is the rule not to build something until you actually need it. Developers often add options or features just in case. Most of those are never used, but they still have to be tested and kept working. YAGNI says build only what today's task asks for. The idea comes from Extreme Programming in the late 1990s.

## Example

Jack wants to make his app support ten languages, though all users speak English. He skips it. A year later still nobody has asked.

## Why it matters

Code for needs you only imagine costs time now. It also needs care forever, often for nothing.

## Common mistake

Using YAGNI as an excuse for messy code. It is about not adding features. It is not about skipping good shape.

## Three principles

- **Build what is asked.** Not what might be.
- **Unused code costs.** Tests and upkeep.
- **Add it later.** When the need is real.

## Related terms

- [KISS Principle](https://learn.benibix.com/term/development/kiss-principle)
- [Don't Repeat Yourself (DRY)](https://learn.benibix.com/term/development/dry-principle)
- [Technical Debt](https://learn.benibix.com/term/development/technical-debt)
- [Clean Code](https://learn.benibix.com/term/development/clean-code)

## Told apart from

- [KISS vs YAGNI](https://learn.benibix.com/compare/kiss-vs-yagni): The KISS principle and YAGNI both push you toward less code, but they answer different questions. KISS asks how to build something: pick the simplest design that works. YAGNI asks whether to build it at all: wait until a real need shows up. You can follow one and break the other, so most teams keep both in mind.

## Taught in

- [DRY, KISS and YAGNI](https://learn.benibix.com/learn/development-concepts/dry-kiss-and-yagni): Programming Basics, 18/18

---

Source: https://learn.benibix.com/term/development/yagni
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
