Hacker News

Favorites Setup
Casey Muratori – The Root of the Root of All Evil – BSC 2026 [video] (youtube.com)
2026-08-27 Thu | 167 points by surprisetalk | original
[−]kshallvari · 2026-08-30 Sun 13:03 UTC · link
THE LEGENDARY GAME PROGRAMMER
[−]nchmy · 2026-08-30 Sun 13:07 UTC · link
Isn't that Jonathan blow?

(to be clear, I'm a big fan of Casey)

[−]dgellow · 2026-08-30 Sun 13:11 UTC · link
They are both legendary game programmers
[−]inigyou · 2026-08-30 Sun 15:23 UTC · link
Are they? Casey programmed the walk monster for Jon's game, a brute force tester to make sure you could always walk both ways and never get stuck, instead of building the walking system using a nav mesh. There was one place you could walk where you weren't supposed to, despite the walk monster, that would have been obvious if it was a nav mesh.
[−]dgellow · 2026-08-30 Sun 15:27 UTC · link
He’s known for his Handmade hero series (unfortunately archived now) where he developed his game over 500+ episodes: https://hero.handmade.network/

I’m sure you can find bugs in the work of any game dev you would consider legendary, game implementation is generally very messy

[−]3eb7988a1663 · 2026-08-30 Sun 15:39 UTC · link
John Carmack is a legendary game programmer. If I can identify a superior algorithmic approach to something in Doom, does that disqualify Carmack's credentials?
[−]arnorhs · 2026-08-30 Sun 13:16 UTC · link
I believe this is referencing a meme on the primeagen's standup podcast, where Casey is referred to as legendary while he feels undeserving of this title.

Titles aside, his talk is really insightful and it is super interesting to do a deep dive on these old computer/programming topics as the modern concepts were being discovered

[−]nchmy · 2026-08-30 Sun 13:30 UTC · link
Hah, I wasn't aware of that. I was sort of referring to what seems to be not such a meme that jblow is always introduced like that. It just seems weird, even if true...

Yeah Ive been meaning to watch that talk - I love listening to pretty much anything Casey says/does. He's extremely thoughtful and fair.

[−]kshallvari · 2026-08-30 Sun 13:38 UTC · link
> I believe this is referencing a meme on the primeagen's standup podcast

Exactly!

[−]frou_dh · 2026-08-30 Sun 13:54 UTC · link
I see it 3-4 times already in this comment section, so must conclude that modern programmer culture = parroting YouTube/X devfluencer catchphrases
[−]ModernMech · 2026-08-30 Sun 14:00 UTC · link
> devfluencer

Thank you for bringing a term to a thing that has been bugging me: people who purport to be devs but spend most of their time on podcasts and blogs talking and writing about being devs, rather than just being devs.

[−]miyoji · 2026-08-30 Sun 14:12 UTC · link
Yes, programmers are exactly like everyone else in this way.
[−]dist-epoch · 2026-08-30 Sun 14:02 UTC · link
No, that would be John Carmack
[−]flumpcakes · 2026-08-30 Sun 15:11 UTC · link
Death-frightening scion capable of seeing beyond the illusionary world before our eyes John Carmack?
[−]tialaramex · 2026-08-30 Sun 13:14 UTC · link
tl;dr the saying is that "premature optimisation is the root of all evil", and Casey burrows into contemporary data to show that really although the claim was 3% of the code takes up 90% of the runtime even then it was more likely 4% takes 50%.

The best thing you could take away from this lecture is something a reasonable person should take away from the original "root of all evil" saying anyway. Measure. Measure. Measure. If you aren't measuring that's not optimization it's masturbation.

Ironically in the process of measuring for a third time yesterday I tripped a bug in Bill's language for which I opened an issue. This is not the goal of measuring three times but merely a happy accident.

Along the way Casey discovers (?) that Structured Programming means just what we today call programming†, that software was a lot smaller in the days when 4096 bytes of RAM was a good entry level option and that loads of these famous people from 1970s computer science knew each other.

† And knowing about this is one reason the Structured Concurrency people want that everywhere. Very possibly there's a future where it seems silly that people once wrote programs which did not use structured concurrency.

[−]socalgal2 · 2026-08-30 Sun 14:30 UTC · link
> Measure. Measure. Measure.

The problem is knowing what to measure. There's another saying

"When a measure becomes a target, it ceases to be a good measure."

As an example from memory, there was a game dev company that celebrated they had maxed out the cores on the PS3. That didn't mean anything though, anyone can max out the cores by filing them with bad code. But hey, their "measurement" told them they had maxed out the machine

[−]tialaramex · 2026-08-30 Sun 14:54 UTC · link
> The problem is knowing what to measure.

This can be a problem, but much less so because so often we're doing "easy mode" where we don't need a proxy. The "it ceases to be a good measure" is because you're measuring a proxy. You wanted to deliver happiness, you measured wealth because it was easier to measure but seemed correlated and now you've got rich miserable people, oops. But software engineers can often measure the actual thing they want to improve directly, not a proxy and so it cannot cease to be a good measure.

[−]ahartmetz · 2026-08-30 Sun 15:28 UTC · link
With a few caveats, though they do tend to get fixed over time. For example, frame rate. Higher frame rate is better, the end, right? Wellll...

Latency and hitching are annoying to measure, so for a long time, they were pretty much ignored. That has improved and hopefully will continue to improve. There is the bufferbloat initiative, gaming magazines take frame time histograms now, input devices and screens commonly have their latency measured. But latency is still under-measured - for GPUs / GPU drivers, for all software, for games and particularly for websites.

[−]inigyou · 2026-08-30 Sun 15:28 UTC · link
Casey generally, across all his material, advocates for non-pessimisation. Measurement takes too long to apply it to your entire program. He advocates for thinking about how much work the computer should actually have to do, then not making it do much more than that, at all times. This means avoiding serial dependency chains on the network, and huge towers of abstractions, and redundant work. He allows for writing lazy slow code as an intentional tradeoff that you may revise later if it becomes a bottleneck. He does not allow for inherently slow architecture.
[−]Pannoniae · 2026-08-30 Sun 15:35 UTC · link
Sure, but there are performance issues no profiler will catch in a straightforward flamegraph reading. Some examples:

1. Your hottest loop is spilling registers which only shows up as non-local cache thrashing (i.e. some other random code becomes slow) or randomly slow instructions i.e. "why is this xorps to initialise this int suddenly slow" due to pipeline stalls

2. Your code stops fitting into cache due to the code bloat, there's no one method which is slow, everything is slowed down by a percentage factor

3. A lot of useless work being done like temporary strings being copied everywhere

4. Your code is "I/O bound" because all the data you're accessing is scattered all across memory, leading to completely predictable TLB stalls

It's very easy to make a large program, quite a bit harder to make a small one...

[−]cuechan · 2026-08-30 Sun 13:16 UTC · link
He is just legendary when it comes to game programming
[−]socalgal2 · 2026-08-30 Sun 14:27 UTC · link
What games has he shipped?
[−]dundarious · 2026-08-30 Sun 14:38 UTC · link
He did middleware at RAD, home of a lot of good stuff, and worked directly on at least The Witness
[−]moefh · 2026-08-30 Sun 14:44 UTC · link
He works in the engine/tool side of things. He worked on some widely used libraries, mainly Bink 2 (video codec) and Granny 3D (3D animation) used in a ton of shipped games.
[−]singleshot_ · 2026-08-30 Sun 14:47 UTC · link
Very interesting that the Christmas Disk still has not been released.
[−]sirwhinesalot · 2026-08-30 Sun 15:02 UTC · link
The legendary games programmer thing is a meme.

Casey is professionally best known for his work at RAD game tools (a highly successful middleware provider for game development back in the day), not games he himself developed.

What he is most highly regarded for is his teaching, particularly the Handmade Hero series on YouTube, which various programmers directly attribute as being responsible for their own professional success to a large extent.

He did work on the video games Dungeon Siege and The Witness afaik, but that's not what he is known for.

He also made one of the fastest terminal emulators (refterm), purely out of spite, to show Microsoft they were full of shit in their answer to an issue he posted to the Windows Terminal github. This directly led to performance improvements in Windows Terminal.

[−]inigyou · 2026-08-30 Sun 15:26 UTC · link
He mostly evangelizes non-pessimal software. He advocates that your program should only be a small factor like 3x slower than the hypothetical optimum - instead of 10000x slower as today's software often is. He compared Visual C++ 6's debugger on hardware from the time to current Visual Studio's debugger and found the former much faster when performing the same tasks.
[−]mberning · 2026-08-30 Sun 13:19 UTC · link
Will have to give this a watch after the kids go to bed. I like a lot of Casey’s views even if I don’t agree with them.
[−]torginus · 2026-08-30 Sun 13:25 UTC · link
Personally I'm quite sure this is super interesting, but I don't really have 3 hours to listen to this, even 1.5h at 2x speed is too much.

I would very much prefer something written down, so I could absorb this at my own pace. I know, gift horse, but still.

[−]knollimar · 2026-08-30 Sun 13:30 UTC · link
If you want a spoilery TLDR: It's more about the journey. He tracks down the origin, finds the support, finds the support flawed, and leaves you to your own conclusion rather than make a new flawed one.

The basic idea is that the origin assumes a highly critical inner hot loop, don't assume where it is, and optimize there.

There's some other time spent saying this justifies slower abstractions for maintainability elsewhere.

[−]abainbridge · 2026-08-30 Sun 14:05 UTC · link
Another point I liked was that there was, apparently, an influential book called Structured Programming, whose content was so universally agreed upon, that all programming became Structured Programming. Nobody needs the book anymore.
[−]mrkeen · 2026-08-30 Sun 14:30 UTC · link
Hard to tell if sarcastic, but anyway.

I think the GOTOers just died out.

Some day null, statements (rather than expressions) and side-effects will have always been wrong.

[−]knollimar · 2026-08-30 Sun 14:32 UTC · link
No, they're not sarcastic. It was an interesting point; if an idea succeeds well enough people just do it and make it "common sense". It's a point in the talk.
[−]tialaramex · 2026-08-30 Sun 15:09 UTC · link
It's not the focus of the talk and so it's hard to tell if Casey understands (the choice to separate the words GO TO in several places suggests he does) but the `goto` keyword you've seen in several modern languages is not the problematic "GO TO statement", it's a de-fanged remnant, the toy poodle to GO TO's wolf pack.

The actual GO TO complained of is, like the jump instruction in machine code, just entirely unbothered by context. Want to go from the middle of this code about employee payroll processing to mid-way through initializing a weather simulation? No problem. Well. No problem for the machine, for a human programmer it's a complete nightmare. Actually that's putting it mildly, nightmares have more structure. You cannot do anything like that with for example C's goto.

You compiler can, and in a few cases (that's what the discussion about the tail-call optimisation is about for example) it will, but the program you wrote doesn't do this and so you don't have to try to keep the whole program in your head.

So in that sense GOTO died out with, maybe BASICs? I think the BASICs tend to have that wolf nature GOTO feature, but nothing modern has it.

[−]kshallvari · 2026-08-30 Sun 13:37 UTC · link
There is a 45 min version at Primeagen's "The Standup"
[−]philippta · 2026-08-30 Sun 14:33 UTC · link
Having watched both, they cover completey different topics.
[−]wpm · 2026-08-30 Sun 14:25 UTC · link
Audio transcription has been around for a while, you could solve this problem for yourself quite easily.
[−]andai · 2026-08-30 Sun 14:38 UTC · link
I get the auto-transcript with yt-dlp then ask a cheap LLM like DeepSeek to clean it up.

Though lately I've been uploading the audio to AssemblyAI, I somehow still haven't used up my credits after several years lol

At one point I built a system that would summarize the transcript and I'd be able to ask questions about it, but Gemini can do that natively now so I usually just use that.

[−]andai · 2026-08-30 Sun 14:39 UTC · link
Maybe go for a long drive? Long walk? Whatever floats your boat.

I used to do manual labor and I would work my way through like eight hours of audiobooks per day.

[−]torginus · 2026-08-30 Sun 15:50 UTC · link
I've noticed after starting to doing audiobooks that my retention is horrible compared to reading. For actual complex topics, it's even worse.
[−]pton_xd · 2026-08-30 Sun 14:40 UTC · link
It's worth the listen if you're even mildly interested in the history of computer science. He's a great presenter. I guess at some point you do have to prioritize how to spend your time, though.
[−]xen0 · 2026-08-30 Sun 14:40 UTC · link
Thanks to modern playback technology, you can pause it and resume play later at your convenience.
[−]MobiusHorizons · 2026-08-30 Sun 14:59 UTC · link
It is quite long, but I thought it was worth it if you can find the time. Short of that I think just reading the Knuth article the quote is from might bring similar insights.
[−]gessha · 2026-08-30 Sun 15:57 UTC · link
It’s on YouTube, pull the transcript and format it with an LLM. If there’s no transcript, there’s Whisper. All of this can be done with local models too.
[−]ggdG · 2026-08-30 Sun 15:58 UTC · link
I asked my clanker to summarize it for me:

https://rentry.co/2ttr46r9

[−]jeffrallen · 2026-08-30 Sun 13:36 UTC · link
It's premature optimization, according to the video description.
[−]Almondsetat · 2026-08-30 Sun 13:38 UTC · link
I think Casey is currently the most informed person to make a series of books or articles summarizing the history of SW Engineering, all the lessons learned and forgotten, and all the good stuff that was published and still hasn't gained traction in the practice
[−]JamesSwift · 2026-08-30 Sun 15:10 UTC · link
Ehh I love Casey and have learned a ton by watching how he thinks about things in his handmade hero series, but he is fairly narrow minded in his views of dev. Not that theres anything wrong with that, for the kinds of dev he does his approach is very good. But its not generalizable.
[−]OtomotO · 2026-08-30 Sun 15:28 UTC · link
Absolutely.

Like I agree with most everything he says and I like to optimise my own software, but for my day to day jobs and contracts it's simply not feasible.

That level of performance and rigor is not what is demanded nor paid or appreciated.

E.g. in Enterprise circles it's still OOP from top to bottom.

Mixed with a tad more functional style due to varying adoption of that paradigm in the languages used by enterprise.

But low level optimizations are not interesting to these customers at all, even though they could help them with some problems.

[−]Almondsetat · 2026-08-30 Sun 15:30 UTC · link
How is this relevant? I didn't say he should make a book about his teachings about SWE, I said he could compile a comprehensive review of the foundational literature of compsci
[−]shimman · 2026-08-30 Sun 15:31 UTC · link
Well the comment was about the history of SWE, if you want a comprehensive history you don't focus on the lived memory of one single individual.
[−]Almondsetat · 2026-08-30 Sun 15:52 UTC · link
Where have I said I want his lived memories?
[−]layla5alive · 2026-08-30 Sun 16:00 UTC · link
You think there aren't other people equally or more qualified? I mean Casey may be the most visible person with those qualifications - but lack of visibility doesn't imply lack of competence, plenty of brilliant people work in the background..
[−]perkinsResearch · 2026-08-30 Sun 13:49 UTC · link
Legend
[−]dkersten · 2026-08-30 Sun 13:58 UTC · link
I enjoyed this talk. It’s long, but it’s interesting and goes into a lot of “lost” history.
[−]FacelessJim · 2026-08-30 Sun 14:08 UTC · link
Terrific presentation. But I have a comment:

His dismissal of the argument Knuth makes regarding the hot loops could have been explored a bit better. I found it weird he didn’t mention the difference of types of programs of then vs now. Even today, in scientific code it is still absolutely the case a lot of the time that a huge chunk of the runtime comes from a single very very hot loop. It might be hidden in a library, but it’s there. Instead he focuses only on “program size”. Knuth samples where very small FORTRAN programs (compared to today’s standards). Today’s program are bigger but the fundamental number crunching primitive of “let’s compute stuff in a loop” remains. It’s just buried under a pile of extra cruft (data loading, parallelism, dispatching etc).

Now we just deal with a lot more programs that are of a whole different class compared to what they where doing with computers in the 70s. We have much more I/O involved. And hot loops don’t like being I/O bound.

[−]dundarious · 2026-08-30 Sun 14:35 UTC · link
He has addressed the "hotspot" notion in the past, one example being part of https://youtu.be/x2EOOJg8FkA
[−]collinstevens · 2026-08-30 Sun 14:36 UTC · link
> I found it weird he didn’t mention the difference of types of programs of then vs now.

iirc, in the talk casey in fact does goes on about how he tried to find examples, but couldn't. in the q&a, he was also asked about this further.

[−]Pannoniae · 2026-08-30 Sun 15:25 UTC · link
Being I/O bound is usually a result of bad engineering practices though. If you're I/O bound, that either means the problem doesn't require much computation - which is possible but fairly rare, or more likely that your code is so unoptimised that barely any computation gets carried out while your code is waiting on memory/disk/network.

"I can't do anything because my program is I/O-bound" is more of an excuse / mental justification of why your program is slow instead of an honest reason for so.

[−]orojackson · 2026-08-30 Sun 15:53 UTC · link
ETL processes are heavily I/O bound, especially when you're trying to shuttle data from one enterprise system to another enterprise system. It's also common when the culture of data exchange from the regulator all the way down to the companies doing the actual work is batch processing where large amounts of data are shared once a day as opposed to real time. Excel spreadsheets are the norm, not the exception. Requests for data to be sent over via XML or JSON are mainly because my employer wanted to make it easier to process the data ourselves, but the regulators actually expect spreadsheets.

Most of the stuff I work on is almost exclusively network I/O bound. I wouldn't say it's a _result_ of bad engineering practices, though. One group decided on a particular system that's also public-facing, and the group I actually support prefers a more internal-facing system. It also doesn't help that the budgets for both projects are completely separate and firewalled from each other by law. Growth opportunities don't apply here because I deal with a captive market with legally-forced customers.

[−]Panzerschrek · 2026-08-30 Sun 14:47 UTC · link
It's a common situation for many quotes of such kind. Taken out of context they loose or completely change their initial meaning.
[−]jdw64 · 2026-08-30 Sun 14:53 UTC · link
Do not guess. Measure, but only measure the bottlenecks that threaten the business
[−]fantasizr · 2026-08-30 Sun 15:58 UTC · link
I took notice when he breaks down the ethics of gen ai as it pertains to online theft, that AI broke the natural order of putting content online where you'd trade exposure for use https://youtu.be/bjO-s4rNPlY?si=uAtBTb6V_Sw1puBU&t=2244