YAGNI: Don't Build What Nobody Asked For Yet
A developer easily imagines future scenarios and starts preparing for all of them at once. Settings, extensions, and universal connection points appear in the code. Most of them are never used, but each has to be understood and maintained - and each slows down reading the part that actually works.
YAGNI - "You Aren't Gonna Need It" - doesn't forbid design. It proposes separating known requirements from fantasies about the future. A known requirement is confirmed by a task or a real scenario. A fantasy is "what if it's ever needed." The first is worth building in; the second is almost always cheaper to add later, once it becomes a fact.
Flexibility with no request is a debt, not a reserve. Every "for the future" interface and flag has to be explained to a new person and dragged through every change. If there's no requirement, the most flexible code is the code that isn't there yet.
What does YAGNI propose?
KISS and YAGNI work together and earliest of all. Let's look at them on our example - and see that they check something other than line count.