Back to Academy
coding principles
YAGNI - You Aren't Gonna Need It
YAGNI is a principle of extreme programming that states a programmer should not add functionality until it is deemed necessary. Implementing features "just in case" wastes development time, adds code that must be maintained, and often guesses wrong about future requirements. Instead, implement the simplest thing that works for the current requirement. When the need genuinely arises, you will have better context to design the right solution.
Use Cases
- •Avoiding premature abstraction — writing a concrete implementation before creating a generic framework
- •Not building admin dashboards, caching layers, or complex config systems until they are actually needed
- •Deferring database optimization (indexes, denormalization) until profiling shows a bottleneck
- •Skipping support for formats, protocols, or providers that no current user has requested
Visualization
Implementation
Output
Click "Run Code" to see output...