Skip to content
BENIBIX Learn

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.

Development🧩 Programming Concepts

KISS Principle

The rule to pick the simplest design that does the job.

KISS stands for keep it simple, stupid, and it means choosing the simplest design that works. Simple code has fewer places for bugs to hide. It is also quicker for others to read and change. Fancy patterns and extra layers should be added only when a real need appears. The phrase is said to come from a US Navy engineer in the 1960s.

Example
Lucy needs to store 20 settings. Instead of a database and an admin screen, she uses one small JSON file. It works for two years with no trouble.
Why it matters
Each extra part can break. Each one is also one more thing the next person must learn.
Full entry
Development🧩 Programming Concepts

You Aren't Gonna Need It (YAGNI)

Do not build a feature until you really need it.

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.
Full entry

In one line

KISS Principle
The rule to pick the simplest design that does the job.
You Aren't Gonna Need It (YAGNI)
Do not build a feature until you really need it.