58
Maintainability
YAGNI
You aren't gonna need it — build for the case in front of you.
The article
If
Speculative generality is paid for three times: writing the abstraction, carrying it while it is unused, and unpicking it when the anticipated requirement finally arrives in a different shape. Predictions about future requirements are usually wrong in exactly the details the abstraction fixed.
Then
“Implement the case you actually have. When you feel the pull to generalise, name the second concrete case first — if you cannot, you do not have a pattern, you have a guess.”
Unless
Chesterton's Fence — YAGNI licenses you not to build something; it never licenses you to delete something whose purpose you have not established
Source
Ron Jeffries, Extreme Programming practice notes; named "You Aren't Gonna Need It" and popularised in Kent Beck, Extreme Programming Explained (1999).
Go to the sourceSee also