paulund

YAGNI

YAGNI

YAGNI stands for "You Aren't Gonna Need It." It is a principle in software development that tells you to implement features only when you actually need them, rather than trying to anticipate future requirements.

Key Points of YAGNI

  • Avoid Over-Engineering: Do not add functionality or features until they are needed.
  • Focus on Current Requirements: Implement only what is necessary to meet the current specifications.
  • Simplicity Over Complexity: Keep the codebase simple and avoid unnecessary abstraction.
  • Refactor When Necessary: If new requirements arise, refactor the code to accommodate them at that point.
  • Avoid Premature Optimisation: Optimise code only when you have identified a concrete performance problem.
  • Iterative Development: Embrace an iterative approach, adding features incrementally as they are required.
  • Avoid Speculative Development: Do not build features based on speculation or hypothetical future needs.
  • Maintainable Code: Following YAGNI keeps the codebase maintainable by preventing the accumulation of unused code.