Briefle words · Code & architecture
YAGNI
Also called You Aren't Gonna Need It
The rule of not building features or flexibility until there is a real need for them.
Say it to an AI
TypeScript function sendWelcomeEmail(hire: Employee) that calls mailer.send with the "welcome" template, first name and start date. Email is the only channel, so apply YAGNI and KISS: a plain function, no notifier interface, factory or generics.
How an expert would brief the stronger version of “Welcome email”.
See it
Try it as a puzzle →An HR platform emails every new hire when they're added. Email is the only channel, with nothing else planned.
Why: A's 'create(kind: string)' supports any channel, but the only one that exists is 'email' and the rest just throw.
Related words
Room 3 · Functions & structure
Learn “YAGNI” in a five-minute lesson