liveBook · Manning

YAGNI principle

As explained in Machine Learning System Design

YAGNI is a software design principle that advises implementing functionality only when it is actually needed.

YAGNI—“You aren’t gonna need it”—limits complexity by implementing only functionality that is actually needed. It favors simple designs over speculative abstractions and keeps software and ML systems maintainable. section 16.4

Simple metric code versus overengineering

A metric pipeline may need only functions for reading data, calculating the metric, orchestrating a loop, and saving results. Repeating the steps is simpler than introducing metaprogramming and elaborate patterns for the same job; an overkill model can likewise consume valuable business resources. section 16.4

Figure 16.4 Just like a basic model will end up underperforming and failing to meet the project goals, an overkill solution will devour valuable resources of a business.
figure

Use the figure to contrast an underpowered solution with an overbuilt one that consumes disproportionate business resources. section 16.4

How Machine Learning System Design covers it

How deep it goes
Defines the principle and illustrates its tradeoff, but stops short of a formal decision procedure or implementation checklist.
Examples
Uses a metric pipeline, contrasting repetitive code with metaprogramming, and an overkill model that consumes business resources.
What you can do after
Apply YAGNI by choosing the simplest design that satisfies current requirements and resisting speculative abstractions.
How it connects
Connects YAGNI with KISS, Occam’s razor, DRY, abstraction, entropy, and maintainability.

Also explained in

Compare how 3 books explain YAGNI principle →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.