frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

The cost YAGNI was never about

https://newsletter.kentbeck.com/p/the-cost-yagni-was-never-about
53•kiyanwang•1h ago

Comments

phamilton•1h ago
The cost of restructuring has also gone down.

The cost of shoring up behavior with tests ahead of a restructure has gone down because of AI.

The cost of implementing a zero downtime migration has gone down because of AI.

A big part of the rust hype has been the low cost of restructuring within an application, even before AI. And now even more so.

The opportunity cost of not being able to safely restructure has gone up substantially.

This is the number one thing I optimize for now: the ability to quickly and safely change significant parts of the code and product.

cassianoleal•1h ago
> This is the number one thing I optimize for now: the ability to quickly and safely change significant parts of the code and product.

This was always a good thing. Its value has nothing to do with the advent of AI coding.

> The opportunity cost of not being able to safely restructure has gone up substantially.

This bit is contradictory with everything else you said. Prior to AI coding it would take a lot longer to perform restructures. If anything, the thing you're now optimising for has gone down in value. It's still valuable, but perhaps a little less.

phamilton•52m ago
I'm not talking about time. I'm talking about safety. The amount of times I've seen "I refactored it, but I'm not confident enough to take it to prod" is significant. Being able to go faster but still not ship it is the huge opportunity cost.
sebastianconcpt•1h ago
Seeing running software as an asset is the right approach.

But the costs of executing and even re-doing things went significantly down.

The costs that didn't went down are the ones of breaking the chain of trust to a predictable outcome. A specific version of some running software accumulated trust. If you rewrite it from scratch that capital is reset on release.

zephen•50m ago
Nothing I have read by Kent Beck has ever suggested that he would be useful in a chip company, where lots of people toil for a long period of time in order to produce something that no customer can possibly see until it's finished, and that must be sold in quantities of millions in order to make money.
marifjeren•47m ago
Interesting. How do chip companies plan such projects? Do they use agile, waterfall, or some other non-software-industry frameworks?
ajb•30m ago
They (or at least some of them) use waterfall - the real waterfall, not the bogeyman invented by agile consultants.
zephen•21m ago
(Some) chip companies have jumped on the agile bandwagon for (some) tasks.

It's always interesting to read about some chip company or another making some agile move, when the reality is that they were already doing about as many agile things as possible before agile was a thing. (For example, a management commitment to "shift left" when they have always been about significant up-front testing and feedback.)

In many, if not most, cases, the testing software is so huge that at least some of it needs to be tested itself. That can certainly benefit from agile.

But the overall process more resembles traditional waterfall. You have several definite final endpoints, and although you can make subsequent changes, those are expensive. Also, you have a silicon budget, and a pin budget, and a heat and power budget. At the end of the day, you are producing something physical with real-world physical constraints that (a) cost real money, and (b) can't be altered by just telling your customer to add more RAM or a bigger processor.

Also, in general, although designers will write their own little unit tests for a few things, it is best practice to insure that the real tests are performed by internal organizations that are different than the organization the designer is in.

I think that subconsciously, he truism that it is easier to work with and reason about a system that is already working, and to keep it working, than to get it working at all to begin with, drives a lot of the methodology.

The designer might focus on tests to insure that things work well enough to see some results, so things can be hooked up and system tests performed earlier. In one sense, this is a shift left -- the validation people and the people writing software for the chip can get started sooner than they would have otherwise, even if it's a bit frustrating because not everything works off the bat.

But the real torture tests are typically written by the dedicated verification and validation teams. Those are really different skills than design.

geetee•49m ago
I can't tell if my brain is decaying or if this is just drivel. It's happening more and more, not just this article. Maybe I'm just burnt out and my brain rejects any attempts at comprehending software articles.
mh2266•43m ago
I fed it into Pangram and it came back as "70% AI generated".

I do feel it's better than some of the pure slop out there, but it still feels pretty sloppy. And I know that this author can write, so if this really was partially done with AI, it's disappointing.

svat•34m ago
I think it's the latter. I find the introduction (written by Kent Beck) easier to understand than the rest of the article (which he says is AI-written: "genie-generated description of YAGNI").

In particular writing like this is just annoying:

> 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.

marifjeren•48m ago
> This is not an argument that prediction is hard, as if a sharper architect escapes it.

I disagree with this. The argument _only works_ if prediction is hard.

disfictional•31m ago
> Even a correct guess leaves you worse off than not committing.

Similarly, this is also confusing. If I scaffold a highly-likely feature and everything lines up, I ship the feature faster. My team isn't guaranteed to grow or even maintain our headcount, so scrambling to account for YAGNI close to the deadline feels worse than congratulating ourselves on our restraint.

skybrian•44m ago
Kent Beck compares unwritten code with a financial option to buy something at a given price.

But that's just an analogy, and it can be taken too far. If you haven't written any code, do you have infinite options? You haven't spent any time yet, but still, that doesn't seem quite right. It might be used to justify staying in the planning stage and putting off writing code indefinitely, to avoid committing to anything.

Why might the analogy work anyway?

Maybe the cost is reading the code? Code that hasn't been written doesn't need to be read. And if you're using a coding agent, it doesn't clutter up the context with irrelevant detail.

Also, code that hasn't been written yet doesn't need testing. Tests you haven't written yet don't take any time to run.

These are good reasons to try to keep a project as small as possible. By putting off features, you delay codebase growth as long as you can.

This suggests that you can avoid a lot of costs by running someone else's code. If you can use a standard API then you don't need to understand the implementation in detail or run its tests. But there are risks to adding dependencies.

Scubabear68•42m ago
What Beck misses over and over again is there are many domains where there are “table stakes” that simply have to be done.

I think a huge amount of technical debt goes straight to YAGNI - devs pretending they are not going to need something that, yeah, they need.

YAGNI and related tenets were all excuses for “we are consultants in a field we don’t understand”.

fmbb•39m ago
All tech debt I have ever seen in my 15 years of professional software development has been someone building too many abstractions or generalizations trying to future proof stuff.
zeroonetwothree•35m ago
That’s the opposite of the typical definition of tech debt.

Usually tech debt is debt—-ie something you take on to ship faster now at the expense of paying it in the long run.

cauch•28m ago
I would say: if the feature is from a developer, high probability of YAGNI, if the feature is from a user, medium probability of YAGNI.
ajb•27m ago
That's interesting, because it's not my experience. A lot of the technical debt I see is that someone half-assed something thinking it would be easy to improve later, but the layer violations and inadequate tests make doing so a massive project.
gofreddygo
turlockmike•17m ago
My general principal is the cost of deleting code should be as low as possible and that includes the entire application as long as the data is around and easy to repurpose then the program itself should be as deletable as possible
passive•5m ago
(In general, I think we don't do enough to emphasize best practices in the era of AI, but...)

What Kent completely ignores here, as far a I can tell, is that there is significant value in finding out sooner what the needed features are. Building speculative structure can be a forcing function to establish requirements, because at least you start exposing failure modes. It might be more expensive than waiting, so hopefully you don't do it for most of your requirements, but sometimes it's your best option.

Building the wrong thing is now a much less expensive option, and that means the calculation around YAGNI is different. But it's still a calculation, and for now, each team needs to figure out how it has changed for them.

fmbb•33m ago
Well he makes software and writes about software development doesn’t he?

Hardware has some hard limitations. The reason software was even invented at all was precisely to escape those limitations.

zephen•12m ago
> Well he makes software and writes about software development doesn’t he? Hardware has some hard limitations.

Right.

> The reason software was even invented at all was precisely to escape those limitations.

But the methods which are useful for hardware are also often useful for software. Most of the useful parts of agile were already practiced well before that was a name for anything. And the demonization of the straw-man version of waterfall in order to sell more agile consulting has led to some serious misconceptions of what waterfall really is and what it is really capable of and useful for.

The initial impetus for what became known as TDD was software maintenance, and it makes sense there.

But most TDD practitioners are nowhere near as good at real testing as the waterfall test practitioners who understand that a single missed testcase could delay a $10 million project by six months.

And this is why, even in the realm of software you still see serious efforts for aviation and nuclear power plants, and other things with real-world consequences, using more traditional methods.

toast0•12m ago
> no customer can possibly see until it's finished

I'm sure lots of chip companies don't share their work in progress, but it's not impossible. Sharing simulations and prototypes and engineering samples can and does happen. You've typically got to be a big customer, of course.

But yes, insights for an industry with relatively small costs for change don't apply easily to an industry with large costs for change, and often vice versa.

•
36m ago
> we are consultants

This is the key insight. Design patterns were developed by a set of consultants. Promoted by other consultants. Consultants have perverse incentives, like bankers.

Realizing this made me critical of the design pattern kool aid. I've come to terms that these are going to be around longer than I'm going to be employed writing code. i keep the criticism to myself and avoid them when i dont see fit. Works ok.

As Hoare said:

    There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.
  The first method is far more difficult.
actionfromafar•11m ago
I still prefer the upsides of a shared vocabulary for talking about programming.
dang•34m ago
"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

https://news.ycombinator.com/newsguidelines.html

cauch•29m ago
I agree.

Nothing is all black or white of course, but I have personally observed situations where software engineers started with YAGNI and then said "that will require too much restructuring, we went into another direction, so, no, we cannot do it anymore". The worst part is that software engineers are not even in a good position to understand when YAGNI fails: when they don't plan for a useful feature, the solution is often for the users to just shrug it off and use a suboptimal solution rather than fighting and dying on a hill that they cannot win (at the end, the software developers can just say "nope, it's technically impossible" even if it was possible, they have a huge advantage). I also saw users just assuming there were good reasons why the feature did not exist ("well, I guess if they did not did it, it's technically impossible") and just don't even say it. And as the developers are not the users, they never notice anything.

100% with the way of illustrating: YAGNI is "we are consultants in a field we don't understand": sometimes, users are asking for too much, sometimes, they are asking for something reasoning, and the developers have no experience to distinguish between the two.

Rescued from the flames: the Cotton Genesis restored to life

https://www.bl.uk/stories/blogs/posts/rescued-from-the-flames-the-cotton-genesis-restored-to-life
1•bryanrasmussen•5m ago•0 comments

Productivity up 0.3 percent in first quarter 2026

https://www.bls.gov/opub/ted/2026/productivity-up-0-3-percent-in-first-quarter-2026.htm
2•mattas•8m ago•0 comments

Homemade 3D printed metal watch using vintage LED matrix displays

https://old.reddit.com/r/3Dprinting/comments/1ui3ndq/my_brother_and_i_designed_our_own_3dprinted_...
1•dgellow•13m ago•0 comments

Software Architecture Is More Important [video]

https://www.youtube.com/watch?v=k4xHQpKyLWY
1•fallinditch•14m ago•0 comments

How to Use Claude Code: A Complete Beginner's Guide (2026)

https://dest.host/b/how-to-use-claude-code/
2•snorbleck•16m ago•0 comments

Australia doubles the maximum penalty for its social media ban

https://www.engadget.com/2203358/australia-doubles-maximum-penalty-social-media-ban/
3•01-_-•19m ago•0 comments

Show HN: Bash4LLM+ – A lightweight, dependency-free Bash wrapper for LLM APIs

https://github.com/kamaludu/bash4llm/
3•kamaludu•19m ago•3 comments

1M Passports Leaked Online

https://www.schneier.com/blog/archives/2026/06/one-million-passports-leaked-online.html
5•garo-pro•19m ago•3 comments

Show HN: NanoEuler – GPT-2 scale model in pure C/CUDA from scratch

https://github.com/JustVugg/nanoeuler
3•vforno•24m ago•1 comments

TOP500 at ISC'26: We Have a New Number 1 – By George Cozma

https://chipsandcheese.com/p/top500-at-isc26-we-have-a-new-number
5•rbanffy•24m ago•0 comments

Ante: A New Way to Blend Borrow Checking and Reference Counting

https://verdagon.dev/blog/ante-blending-borrowing-rc
4•g0xA52A2A•24m ago•0 comments

Researchers Set Hybrid Bonding Records

https://spectrum.ieee.org/hybrid-bonding-2677022836
2•rbanffy•25m ago•0 comments

Nourish: A New Wayland Compositor Powered by Vulkan with Infinite Scrolling

https://www.phoronix.com/news/Nourish-Wayland-Compositor
3•okso•26m ago•1 comments

Ford rehires 'gray beard' engineers after AI falls short

https://techcrunch.com/2026/06/28/ford-rehires-gray-beard-engineers-after-ai-falls-short/
23•rbanffy•26m ago•8 comments

Enough Numbers to Build a Universe

https://www.stephendiehl.com/posts/universe/
2•tmach32•28m ago•0 comments

Cloudflare cut 1,100 jobs and then grew its engineering team by 45 percent

https://thenextweb.com/news/cloudflare-builders-sellers-measurers-engineering-surge-ai-layoffs
4•karlmush•28m ago•0 comments

Show HN: Use-zerostack – delegate any task to a lightweight coding agent

https://github.com/gi-dellav/use-zerostack/
2•gidellav•29m ago•0 comments

Cold War Erosion Simulation

https://github.com/ajsbsd/ajsbsd-jwst-cli
2•ajsBSDdotnet•30m ago•1 comments

Asciigraph: Go pkg to make lightweight ASCII graph in CLI with zero dependencies

https://github.com/guptarohit/asciigraph
2•atkrad•32m ago•0 comments

Mercury – Open-source, local-first agentic harness for Android

https://github.com/Yene96/Mercury
2•yene96•34m ago•0 comments

Release v1.27.0 · go-delve/delve

https://github.com/go-delve/delve/releases/tag/v1.27.0
2•atkrad•37m ago•0 comments

The Curious Case of Aa.ns.charter.com

https://mikehowells.com/2026/06/21/the-curious-case-of-aa-ns-charter-com/
2•sashk•37m ago•0 comments

A conversation with Marc Andreessen (2000-10-02)

https://charlierose.com/videos/5018
2•andreyazimov•40m ago•0 comments

Show HN: I built an opinionated minimalist ePub/pdf online reader

https://epub.mirror.forum
2•Imustaskforhelp•41m ago•0 comments

A wire-faithful, browser-based re-creation of the Atari ST game MIDI Maze

https://github.com/diegoparrilla/midi-maze-js
6•logronoide•44m ago•0 comments

WinPE as a stateless harness for Windows driver testing and fuzzing

https://bednars.me/blog/winpe-harness
3•piotrbednarsalt•44m ago•0 comments

Your Kids’ School Bus Is About to Become a Roaming Surveillance Vehicle

https://www.thedrive.com/news/your-kids-school-bus-is-about-to-become-a-roaming-surveillance-vehicle
3•voxadam•49m ago•0 comments

Show HN: Snarl – Fast Shacl Validator

https://github.com/trivyn/snarl
2•jcadam•49m ago•0 comments

SISU: The Feeling of Perseverance

https://finland.fi/emoji/sisu/
1•jruohonen•53m ago•1 comments

The US Used to Demand the Best Tech. Now We Ban It

https://www.pcmag.com/opinions/the-us-used-to-demand-the-best-tech-now-we-ban-it
13•mwexler•54m ago•2 comments