HN Debrief

The cost YAGNI was never about

  • Programming
  • AI
  • Developer Tools
  • Hardware

Kent Beck’s post argues that YAGNI is usually misunderstood as a warning about wasted implementation time. His actual target is earlier commitment. When you build scaffolding for a feature that has not arrived yet, you are freezing one guess about the future and paying ongoing costs to carry, read, test, and preserve that guess even if reality lands somewhere else. Several commenters sharpened that framing by translating the "option" metaphor into everyday software work. Unwritten code stays flexible because it does not bloat the codebase, test suite, or the context humans and coding agents have to keep in their heads. That landed as the most useful reading of the piece.

Treat YAGNI as a risk-management tool, not a blanket ban on planning. If your product lives in a domain with stable table-stakes requirements or expensive changes, invest in structure deliberately and validate it with domain experts before code hardens around the wrong assumptions.

Discussion mood

Mixed but engaged. Most people accepted the core warning against speculative abstractions, yet many were annoyed by how universal the post sounded and insisted the advice only works in domains where future needs are genuinely uncertain and changes are cheap enough to absorb later.

Key insights

  1. 01

    Unwritten code avoids cognitive and test overhead

    The most useful way to read Beck’s "option" metaphor is not as finance cosplay. It is a reminder that code you have not written does not need to be read, held in working memory, explained to an agent, or dragged through every test run. That makes YAGNI less about saving implementation hours and more about slowing codebase growth until reality forces the extra surface area.

    When deciding whether to add scaffolding now, count the permanent reading and testing burden, not just the one-time coding effort. This is even more important if your team uses AI tools that work worse as irrelevant context piles up.

      Attribution:
    • skybrian #1 #2
    • skydhash #1
  2. 02

    AI changes restructuring economics unevenly

    Several comments converged on a sharper AI point than the article made. AI may reduce the cost of refactors, migration code, and test backfilling, but only if the codebase already supports safe change. In brittle systems it does the opposite and speeds up "premature aging" by helping teams generate more debt than they can confidently ship. The bottleneck is still trust, not typing speed.

    Optimize for safe large-scale edits before you optimize for AI-assisted throughput. If you cannot prove changes with tests, rollout controls, and clear architecture, AI will amplify your cleanup queue faster than it amplifies delivery.

      Attribution:
    • phamilton #1 #2 #3
    • cassianoleal #1 #2 #3
    • mohamedkoubaa #1
    • rednb #1
    • rzmmm #1
  3. 03

    Speculative builds can expose requirements early

    There is a legitimate use for building ahead when the goal is learning, not shipping. A spike can force hard conversations about edge cases and reveal missing requirements sooner than abstract planning will. The warning attached to that idea was blunt. Keep the learning artifact disposable, because productionizing exploratory code is how a useful experiment turns into long-lived slop.

    Use throwaway spikes to discover requirements in murky domains, then rebuild the real version with what you learned. Do not let experimental scaffolding become the production architecture by inertia.

      Attribution:
    • passive #1
    • MoreQARespect #1
  4. 04

    Trust in running software is a real asset

    A useful reframing was that software is not just code. It is code plus accumulated trust. A specific version in production has earned confidence through use, operations, and known behavior. Rewrites and broad restructures reset that capital even when the new code looks cleaner on paper. That is the cost teams often ignore when they talk casually about rebuilding or generalizing later.

    Treat production confidence as something you can spend down. Before a rewrite or major restructuring, ask how you will preserve operational trust through tests, migration plans, and staged rollout, not just whether the new design is prettier.

      Attribution:
    • turlockmike #1
    • sebastianconcpt #1
  5. 05

    YAGNI does not travel cleanly to hardware-like work

    Comments from chip-industry experience drew a hard boundary around Beck’s framing. In physical systems, change is constrained by silicon, pins, heat, power, long validation cycles, and expensive downstream mistakes. Teams can still use iterative practices inside subsystems, but the overall program often looks much closer to real waterfall because late changes are genuinely costly. Advice built for cheap software iteration breaks when the medium itself resists change.

    Do not import software maxims unchanged into domains with physical or regulatory constraints. If changes are expensive after a certain point, invest more in front-loaded architecture and independent validation.

Against the grain

  1. 01

    Abstract-first can reduce commitment too

    One commenter flipped the usual YAGNI intuition and argued that concrete implementations often lock you in more than carefully chosen abstractions. A generic Store may commit you less than a UserStore if the exact shape of "user" is still unsettled. The point is not to spray patterns everywhere. It is that some abstractions preserve optionality instead of destroying it.

    Do not assume every abstraction is speculative waste. If a generic interface genuinely shrinks the number of assumptions embedded in the code, it may buy flexibility rather than consume it.

      Attribution:
    • mrkeen #1
  2. 02

    Domain ignorance is a bigger risk

    The strongest anti-YAGNI argument was that many teams invoke it while lacking domain knowledge, then mistake their own ignorance for prudent restraint. In products with obvious table-stakes capabilities or stable data requirements, refusing to build enough structure up front can burden users for years or corrupt the system in ways developers do not even notice. Several comments argued that domain experts, not coding maxims, should decide what is actually speculative.

    If engineers are weak on domain knowledge, do not let YAGNI make product decisions by default. Pull domain experts into architecture and data-model choices early, especially where omissions are hard to repair later.

      Attribution:
    • Scubabear68 #1
    • cauch #1 #2
    • esafak #1

In plain english

AI
Artificial intelligence, a broad term for computer systems designed to perform tasks that seem to require human intelligence.
Waterfall
A development process that emphasizes up-front planning and sequential phases with limited late changes.
YAGNI
"You Aren't Gonna Need It," a software design principle that says not to add features or abstractions until they are actually needed.

Reference links

Background references