I think I have
the knack. I don’t think it’s anything special.
Read the code. Believe the code. Not what you think it’s doing, not what the comments imply, not even what variable/function/class names imply. What is the code actually doing?
Great, now you can fix it.
And remember: when you’ve eliminated the impossible, whatever is left, no matter how weird, is what the code is doing. Don’t be afraid to console log.
I see all the time engineers wasting minutes and hours trying to reason about code when a good print statement could answer their question in seconds.