Walk Through Each Section
To walk through code, you have to learn how to “think like a computer”—that is, how to walk through source code while tracking the exact state that the computer is in and thus, hopefully, trigger the “Eureka” moment when you realize where the actual state diverges from the intended state. In other words, you find the bug.
Emulating a computer might seem obvious, but in practice, it can be quite hard.
It can be difficult, especially after reading through lots of code, to avoid simply sliding over statements that look reasonable. Remember that the computer devotes its full attention to each statement as it is being executed, and you need to do the same. No matter if a statement seems obvious, if a constant definition looks ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access