Repaso
EspaƱol

What does YAGNI ('You Aren't Gonna Need It') advise?

Options

  1. Write every feature that you might need in the future
  2. Don't build a feature until it is actually needed (Correct option)
  3. Never write tests for code that is simple enough
  4. Always apply a design pattern to the code you write

Answer

Don't build functionality until it is actually needed

Why

Code built for imagined future needs costs time now, adds complexity, and is often wrong when the future arrives.

YAGNI says: build what the current requirement needs, keep it simple (KISS), and extend it when a real need appears.

Remember

Build for today's need; keep it simple.

Key terms

Practice this question in Repaso