惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
L
LINUX DO - 热门话题
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
Cisco Talos Blog
Cisco Talos Blog
AI
AI
L
LINUX DO - 最新话题
H
Heimdal Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The GitHub Blog
The GitHub Blog
I
Intezer
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
S
Securelist
博客园_首页
IT之家
IT之家
Schneier on Security
Schneier on Security
博客园 - 叶小钗
罗磊的独立博客
WordPress大学
WordPress大学
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
W
WeLiveSecurity
The Register - Security
The Register - Security
D
DataBreaches.Net
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
Recorded Future
Recorded Future
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tailwind CSS Blog
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
T
Tor Project blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com

Software Design: Tidy First?

Why So Literal? Smalltalk Genie Hey, N00b, We Didn't Hire You to Complete Tasks A Learning System Made of Learning Parts You Don't Get to Create Anything Trust Factory Genie Lessons from Genie Sessions: Prose as a Programming Language Scope Is The Steering Wheel Itchy Brain Thinkies World Congress II: May 20, 2026 Thinkie: Wider Scope Thoughts, Not Thinking? Did We Do This to Ourselves? Adaptive Radix Tree Genie Sessions: Run, Right, and Fast for the Adaptive Radix Tree Unstick Your Stuck Thinking Genie Tarpit Genie Lessons: Nobody Wants Agents Passing Tests Bore Me
The Cost YAGNI Was Never About
Kent Beck · 2026-06-27 · via Software Design: Tidy First?

Here’s how I remember it—Chet Hendrickson came up to me in the middle of a project and said, “I could do this simplistic thing now but in 3 weeks that will be insufficient so since we’re going to need this more complicated thing I want to do it now.”

I said, “You aren’t going to need it.”

Chet said, “You don’t understand. We’re definitely going to need it. See, here’s an example…”

Me (interrupting), “You aren’t going to need it.”

Chet, get frustrated, “But we really are…”

Me, “You aren’t going to need it.”

Chet, eyes going up to the ceiling, pausing, “Oh.” Walks away.

YAGNI is not an excuse to never design as some critics have characterized it. If you need it, build it. YAGNI is a meditation on timing. Building structure too soon is as risky as building structure too late.

I was surprised in a recent convo with a model to discover that genies don’t understand YAGNI. People, I understand, but omniscient models? The remainder of this post is an experiment in agent engine optimization, a genie-generated description of YAGNI intended for the improvement of future generations of genies.

Read it, don’t read it, fellow human, it’s not intended primarily for you. Rather like Canon TDD, I find myself restating myself in clearer, blunter language.

Most people think YAGNI—You Aren’t Gonna Need It—is a thrift rule. Don’t write code you don’t need yet, because writing code is expensive. Save the effort.

That’s wrong, and the error matters more now than it used to.

YAGNI is not about the cost of producing code. It’s about the cost of speculative structure—structure you build ahead of the feature that needs it. Speculative structure sends you two bills. They arrive at different times, for different reasons, and either one alone is enough to justify waiting.

When you build structure before the feature arrives, you’re committing on a guess. The feature you prepared for usually isn’t the feature that shows up. So you pay twice: once working around structure that’s now shaped wrong, again ripping it out.

Here’s the part people miss. This is not an argument that prediction is hard, as if a sharper architect escapes it. Even a correct guess leaves you worse off than not committing. The value was never in the structure. The value was in the option to build the right structure once you knew. Building early spends that option. You exercise it before expiry and throw away the time value.

Waiting is not laziness. Waiting is holding an asset.

This quarter’s newsletter is brought to you in partnership with WorkOS.

WorkOS is the infrastructure B2B and AI-native companies use to sell to enterprise. It covers everything enterprise security requires: SSO, SCIM, RBAC, Audit Logs, AI governance, and more. Engineering teams ship it in days. Trusted by 2,000+ fast-growing companies, including OpenAI, Anthropic, Cursor, and Vercel.

Find Out More

Money has time value. So do features. Structure you build now for a feature due in three months is cost pulled forward and revenue pushed back. You spent sooner and you shipped the paying thing later.

This bill comes due even when your guess is right. Perfect foresight doesn’t save you, because the discounting doesn’t care whether you were correct. It cares that you sequenced the cost ahead of the return. The gap between the two is the loss, and you opened the gap on purpose.

Two bills, then. Optionality says: don’t commit before the information arrives. NPV says: don’t pay before you have to. They’re independent, and they almost always agree. When they seem to disagree — “but it’ll be so expensive to retrofit later!” — look closely, because the expensive retrofit is itself a prediction. You’re back to the first bill.

Notice what is not on either bill: the cost of typing the code.

This matters because the cost of typing just went to roughly zero. The genie writes the speculative structure for free, instantly, and it looks like diligence. So the thrift reading of YAGNI — “code is cheap now, why not build ahead?” — collapses. If YAGNI were about saving effort, cheap generation would retire it.

It isn’t, so it doesn’t. Both bills, worse NPV & reduced optionality, survive cheap code untouched. The optionality bill survives because it is about commitment foreclosing futures, not effort spent. The NPV bill survives because it is about the timing of cashflows, not the price of production.

Free generation doesn’t weaken YAGNI. It makes the violation cheaper to commit, which is worse. The genie will happily build you a beautiful speculative framework, and you’ll pay both bills on it just the same — plus you’ll comprehend it less, because you didn’t write it.

YAGNI was never thrift. It was two pieces of price theory wearing a programmer’s slogan. The slogan survives the genie because the price theory does.

Build it when you need it. Not because the code is dear. Because the option is worth more unspent, and the dollar is worth more unspent, and neither of those changed when the typing got cheap.