LessWrong (30+ Karma)

“Debugging for Mid Coders” by Raemon


Listen Later

I struggled with learning to debug code for a long time. Exercises for learning debugging tended focus on small, toy examples that didn't grapple with the complexity of real codebases. I would read advice on the internet like:

  • Try to create a reliable replication of the debug
  • Create a minimal demonstration of the bug
  • Read error messages carefully
  • Use a debugger

I'd often be starting from a situation where the bug only happens sometimes and I have no idea when, the error log is about some unrelated library I was using and had nothing to do with what the bug would turn out to be. Getting to a point where it was even clear what exactly the symptoms were was a giant opaque question-mark for me.

I didn't improve much at debugging until I got generally serious about rationality training. Debugging is a nice in-between difficulty between "toy [...]

---

Outline:

(02:40) Be willing to patiently walk up the stack trace (but, watch out for red-herrings and gotchas)

(03:09) Gotcha #1: X does not exist, cant read X, X is undefined, etc, are often downstream symptoms, rather than the bug itself.

(03:55) Gotcha #2: Notice abstraction boundaries, and irrelevant abstractions.

(06:54) Binary Search

(09:36) Notice confusion, and check assumptions.

(09:41) Also, look at your data, not just your code

(11:39) Things I dont know

The original text contained 1 footnote which was omitted from this narration.

---

First published:

August 16th, 2025

Source:

https://www.lesswrong.com/posts/zvisSDFPLWofyFxEQ/debugging-for-mid-coders

---

Narrated by TYPE III AUDIO.

...more
View all episodesView all episodes
Download on the App Store

LessWrong (30+ Karma)By LessWrong


More shows like LessWrong (30+ Karma)

View all
Making Sense with Sam Harris by Sam Harris

Making Sense with Sam Harris

26,311 Listeners

Conversations with Tyler by Mercatus Center at George Mason University

Conversations with Tyler

2,461 Listeners

The Peter Attia Drive by Peter Attia, MD

The Peter Attia Drive

8,597 Listeners

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas by Sean Carroll | Wondery

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas

4,170 Listeners

ManifoldOne by Steve Hsu

ManifoldOne

97 Listeners

Your Undivided Attention by The Center for Humane Technology, Tristan Harris, Daniel Barcay and Aza Raskin

Your Undivided Attention

1,608 Listeners

All-In with Chamath, Jason, Sacks & Friedberg by All-In Podcast, LLC

All-In with Chamath, Jason, Sacks & Friedberg

10,041 Listeners

Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

Machine Learning Street Talk (MLST)

97 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

528 Listeners

Hard Fork by The New York Times

Hard Fork

5,529 Listeners

The Ezra Klein Show by New York Times Opinion

The Ezra Klein Show

16,055 Listeners

Moonshots with Peter Diamandis by PHD Ventures

Moonshots with Peter Diamandis

570 Listeners

No Priors: Artificial Intelligence | Technology | Startups by Conviction

No Priors: Artificial Intelligence | Technology | Startups

138 Listeners

Latent Space: The AI Engineer Podcast by swyx + Alessio

Latent Space: The AI Engineer Podcast

93 Listeners

BG2Pod with Brad Gerstner and Bill Gurley by BG2Pod

BG2Pod with Brad Gerstner and Bill Gurley

473 Listeners