CodeFaster

CodeFaster

Share this post

CodeFaster
CodeFaster
A primer on debugging

A primer on debugging

Tyler Adams's avatar
Tyler Adams
Nov 30, 2021
∙ Paid
1

Share this post

CodeFaster
CodeFaster
A primer on debugging
Share

I had to teach someone about debugging today, thought I’d share my thoughts here too.

What is debugging?

First and foremost, debugging is fixing your brain. The code does exactly what it was told to do. It’s YOU that doesn’t like what it does and doesn’t understand why it does that. As such, all debugging is about helping YOU figure out WHY the code behaves in a way that YOU don’t like.

Notably, it has nothing to do with fixing bugs. Just understanding their existance. This means “randomly changing code until something works” is not debugging, it’s poorly and randomly bug fixing.

How does one debug? Science!

Debugging is not “a science”, it is science. Science is how you figure out the rules behind a system and why it works the way it does. Doesn’t matter if that’s why apples fall from trees or why your app fails to display trees. The only way to figure it out is to create a model and run experiments until that model breaks or your model explains the bug.

Narrowing down the problem

When you …

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Tyler Adams
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share