How to write the perfect function
318K views · Aug 20, 2026 · People & Blogs
Comments · 928
@dennis_sweeney · 1 month ago · pinned
<a href="https://www.youtube.com/watch?v=2OMRWPOSw9s&t=2150">35:50</a> I don’t think that’s right—the magnitude of the cross product of unit vectors is the sine of the angle between them, not necessarily 1.
548
@Airbus33O-743L · 1 month ago
"For humans who still write code" is crazy
1.5K
@secondengineer9814 · 1 month ago
June says "VSCode isn't autocompleting those functions"
608
@nWestie · 1 month ago
Russian doll type video<br>It's a 45 min video but you peel off the cover and there's 2 <b>other</b> hour long talks hiding underneath
539
@Zepalesque42 · 1 month ago
"for humans who still write code" is sad but also means this video is for me so that's coole
639
@dalehagglund · 1 month ago (edited)
This video is brilliant. It's one of the best attempts I've seen for describing how to think about functions, why to use them (reuse is the least important reason, as you say), and how to design them. The "write the code you'd like to see" and "single level of abstraction" guidelines map almost directly onto my own thinking in this area.
226
@tadsmoll · 1 month ago
This is the kind of video that makes me remember why I like programming. Thank you.
69
@rsnively · 1 month ago
key takeaway: the perfect function has a snake case name, got it
286
@katetranscribes · 1 month ago
<a href="https://www.youtube.com/watch?v=2OMRWPOSw9s&t=1110">18:30</a> it always comes back to “functional core, imperative shell”
23
@yahhav345 · 1 month ago
<a href="https://www.youtube.com/watch?v=2OMRWPOSw9s&t=130">2:10</a> having pseudo assembly code filled with Lorem Ipsum is unhinged behavior and I'm absolutely here for it
22
@NotherPleb · 1 month ago
Back when I was learning about programming I spent a lot of time thinking about this topic which I never formalized in my head, it stayed as matter of taste I acquired from experience. You just formalized my taste very accurately.
57
@jamesarthurkimbell · 1 month ago
Learning that code reuse is not the main attraction is also what happened to inheritance. It has to have some semantic value beyond just being DRY.
51
Up next

5 Strong Opinions On Everyday Rust
Logan Smith · 101K views

Verse: A New Scripting Language? In THIS Economy?
Logan Smith · 145K views

🔴 LIVE — DP-700 Series Recap: Episodes 1-6 Score Review & Q&A
MSExamLab · 116 views

Constructors Are Broken
Logan Smith · 197K views

Why Its So Hard To Write A Fast grep
Nathan Baggs · 220K views

Introduction to Classical Planning
Thomas Nobes · 8.6K views

How the Shell Works
Ryan Baker · 280K views

Casually Explained: Evolution VI - Choosing Your Build
Casually Explained · 155K views

How I released a game that has no assets
Zanzlanz · 1.1M views

The Dark Side of .reserve()
Logan Smith · 259K views

Nigel's Most Mysterious Move Isn't Even A Word
Will Anderson · 1.1M views

I found a Mathematically Perfect solar array in Factorio
Ipsen's Adventures · 296K views

Large Language Models explained briefly
3Blue1Brown · 7.8M views

AI made me doubt everything about programming by Felienne Hermans - DDD Europe 2026
Domain-Driven Design Europe · 114K views

The most beautiful formula not enough people understand
3Blue1Brown · 1.5M views

Why You Cannot See a Watermark in AI Text
No Hype AI · 986K views

Two Ways To Do Dynamic Dispatch
Logan Smith · 137K views

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025
Better Software Conference · 902K views

One Formula That Demystifies 3D Graphics
Tsoding · 1M views

The Fastest Gravity Algorithm You've Never Heard Of: Fast Multipole Method
Keyframe Codes · 135K views

Choose the Right Option
Logan Smith · 117K views

Cursed C++ Casts
Logan Smith · 113K views

The sorting algorithm that shouldn’t.
Stand-up Maths · 2.4M views

But what is quantum computing? (Grover's Algorithm)
3Blue1Brown · 4M views

The Filesystem is Awesome
Ryan Baker · 360K views

How C Really Works
Cave of Programming · 214K views