I once spent an entire afternoon reading one function, certain the bug lived inside it. I read it so many times the lines stopped meaning anything.
The bug was three files away, in a value I had decided was clean and never checked.
That afternoon rewired how I debug. If a bug were where you’re looking, you’d have found it already. The hard ones always hide in the assumption — the input you trusted, the call you were sure fired, the state you were sure got reset.
Now, when I’m stuck, I don’t reread the suspect. I go find the thing I’d bet money on and I check it anyway. Nine times out of ten, that’s the liar.
Debugging turned out to be less about intelligence and more about humility — the willingness to verify what I already “know.”
– Serguey Asael Shinder
Leave a comment