YAGNI
easy 40 minYou aren't gonna need it: build a feature when somebody needs it, and not when you imagine that somebody will.
Watch lesson4:35
Where it shows up
The same pattern appears across everyday software.
Go generics
Go was released without them. The FAQ says they did not seem essential to the goals at the time and were left out for simplicity. They came with Go 1.18 in March 2022, as the most requested feature, after the design had matured.
Python's match statement
PEP 3103 (a switch statement) was rejected: a poll at PyCon 2007 showed no popular support. Structural pattern matching, another shape, came with Python 3.10 (PEP 634).
Flask
Its design page explains what a microframework leaves to extensions, so that the core does not decide for every application.
Monolith first
Martin Fowler (2015) gives yagni as the first reason to begin with one program: first find out whether the product is useful.
Kubernetes API policy
Deprecated beta versions are served for at least 9 months or 3 releases. A published API is an expensive promise, so features begin as alpha, which may be removed.
Rust feature gates
New language features and APIs are marked unstable and are available only on the nightly channel, by explicit choice. They become a promise only after use.
Semantic Versioning
In major version 0 anything may change. The stable promise begins with 1.0.0, when the interface is known.
Knip
A tool that finds unused files, exports and dependencies in JavaScript and TypeScript projects.
webpack tree shaking
Removes exports that nobody imports from the bundle. Users do not download them, but developers still have to carry them.
Unleash feature flags
Its documentation treats flags that outlive their purpose as technical debt, and shows which are potentially stale.