Hacker News new | ask | show | jobs
by Qualadore 1391 days ago
Recording yourself debugging, then possibly reviewing the video later, is a good way to improve.

Maybe during debugging I consider the strategy of writing a minimal reproduction, but decide it's too time consuming. Then after reviewing the video, I can see that it would've been much faster if I had just written the reproduction to begin with.

Taking breaks does interfere with this, but I still think it's often a good idea.

Another strategy is to add assertions for your hypotheses, which can sometimes be preferable to logging.

1 comments

Many decades ago I spent a few days with a colleague in one exhausting days-long continuous session, debugging a generational garbage collector. The nature of those (essentially a global graph rewriting) is such that failures will be greatly separated from their causes.

I really learned to appreciate an abundance of asserts; the sooner you catch the issue, the less time you have to spend chase it around. Of course, asserts are in essence filtering the allowable state at a point and it's always more powerful when you can express that in the type system, which is why I love languages with rich static type systems, like Rust and Haskell.