Ads skipped

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&amp;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

    &quot;For humans who still write code&quot; is crazy

    1.5K

  • @secondengineer9814 · 1 month ago

    June says &quot;VSCode isn&apos;t autocompleting those functions&quot;

    608

  • @nWestie · 1 month ago

    Russian doll type video<br>It&apos;s a 45 min video but you peel off the &nbsp;cover and there&apos;s 2 <b>other</b> hour long talks hiding underneath

    539

  • @Zepalesque42 · 1 month ago

    &quot;for humans who still write code&quot; is sad but also means this video is for me so that&apos;s coole

    639

  • @dalehagglund · 1 month ago (edited)

    This video is brilliant. It&apos;s one of the best attempts I&apos;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 &quot;write the code you&apos;d like to see&quot; and &quot;single level of abstraction&quot; 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&amp;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&amp;t=130">2:10</a> having pseudo assembly code filled with Lorem Ipsum is unhinged behavior and I&apos;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

LIVE

5 Strong Opinions On Everyday Rust

Logan Smith · 101K views

LIVE

Verse: A New Scripting Language? In THIS Economy?

Logan Smith · 145K views

LIVE

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

MSExamLab · 116 views

LIVE

Constructors Are Broken

Logan Smith · 197K views

LIVE

Why Its So Hard To Write A Fast grep

Nathan Baggs · 220K views

LIVE

Introduction to Classical Planning

Thomas Nobes · 8.6K views

LIVE

How the Shell Works

Ryan Baker · 280K views

LIVE

Casually Explained: Evolution VI - Choosing Your Build

Casually Explained · 155K views

LIVE

How I released a game that has no assets

Zanzlanz · 1.1M views

LIVE

The Dark Side of .reserve()

Logan Smith · 259K views

LIVE

Nigel's Most Mysterious Move Isn't Even A Word

Will Anderson · 1.1M views

LIVE

I found a Mathematically Perfect solar array in Factorio

Ipsen's Adventures · 296K views

LIVE

Large Language Models explained briefly

3Blue1Brown · 7.8M views

LIVE

AI made me doubt everything about programming by Felienne Hermans - DDD Europe 2026

Domain-Driven Design Europe · 114K views

LIVE

The most beautiful formula not enough people understand

3Blue1Brown · 1.5M views

LIVE

Why You Cannot See a Watermark in AI Text

No Hype AI · 986K views

LIVE

Two Ways To Do Dynamic Dispatch

Logan Smith · 137K views

LIVE

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025

Better Software Conference · 902K views

LIVE

One Formula That Demystifies 3D Graphics

Tsoding · 1M views

LIVE

The Fastest Gravity Algorithm You've Never Heard Of: Fast Multipole Method

Keyframe Codes · 135K views

LIVE

Choose the Right Option

Logan Smith · 117K views

LIVE

Cursed C++ Casts

Logan Smith · 113K views

LIVE

The sorting algorithm that shouldn’t.

Stand-up Maths · 2.4M views

LIVE

But what is quantum computing? (Grover's Algorithm)

3Blue1Brown · 4M views

LIVE

The Filesystem is Awesome

Ryan Baker · 360K views

LIVE

How C Really Works

Cave of Programming · 214K views

YouTube, with the door locked.

Aegis plays a clean stream instead of YouTube's player, so pre-roll ads, trackers, and fingerprinting never ride along. Drop Shields any time if you want the official player back.