Weekly Reflection #30 - Think Before You Debug


Each week, I share one insight. One piece of wisdom. One question to reflect on. (and a little Lagniappe)


Insight

My favorite debugging story comes from Rob Pike when he recounted a time he was pair programming with Ken Thompson at Bell Labs. Pike was at the keyboard. When something broke, he'd immediately dive into stack traces, print statements, and the debugger. Ken would simply stand behind him and think, ignoring the code they'd just written. Then, often before Pike had finished reading the trace, Ken would say, "I know what's wrong." And, he was usually right.

Ken was holding a model of the code in his head. When something broke, the bug revealed itself in that model before it appeared in the code. He'd work out how the failure could even happen, and the gap that surfaced was usually a deeper flaw than whatever showed up on screen.

I've never regretted taking the Ken Thompson approach. It feels slower to sit and think before you start poking. But those quiet minutes are how you fix the design instead of patching the symptom it threw off today.


Wisdom

Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?

Reflection

What are you reacting to right now that deserves a step back first?


Lagniappe

Weekly Reflections Newsletter

Practical insights on platform engineering, developer experience, and building teams that ship. Each issue is written to be useful, actionable, and applicable. No filler, no promotions-only emails. Enter your email and sign up for free right now.

Read more from Weekly Reflections Newsletter

Each week, I share one insight. One piece of wisdom. One question to reflect on. (and a little Lagniappe) Insight The T-shaped pattern has been around since the seventies. It argues for going deep in your craft while maintaining broad knowledge across others. World-class knowledge of monolithic SQL databases won't inherently make you good at distributed systems or React websites. Though being broadly familiar with patterns and technologies in other domains makes you a richer database expert....

Each week, I share one insight. One piece of wisdom. One question to reflect on. (and a little Lagniappe) Insight It's well known in our industry that we should favor two-way doors, which are cheap to experiment with, over one-way doors that demand slow deliberation. While true, over time all that optionality can bite us when we try to undo several layers of two-way doors at once. Reversibility itself has a hidden cost. The best way to treat a two-way door is to reverse quickly when a choice...

Each week, I share one insight. One piece of wisdom. One question to reflect on. (and a little Lagniappe) Insight I've been working with someone recently, migrating a manual, multi-step process out of Excel and into a Python workflow. It requires significant upfront work. You have to understand the task before you can automate it. But when you find the right solution, the whole thing runs without you. It's a thing of beauty. Effective automation drives the toil of a task toward zero. Wisdom...