I Don't Like Debuggers (2000)
I loved what Rob Pike had to say about what he learnt from Ken Thompson:<p>```A year or two after I&#x27;d joined the Labs, I was pair programming with Ken Thompson on an on-the-fly compiler for a little interactive graphics language designed by Gerard Holzmann. I was the faster typist, so I was at the keyboard and Ken was standing behind me as we programmed. We were working fast, and things broke, often visibly—it was a graphics language, after all. When something went wrong, I&#x27;d reflexively start to dig in to the problem, examining stack traces, sticking in print statements, invoking a debugger, and so on. But Ken would just stand and think, ignoring me and the code we&#x27;d just written. After a while I noticed a pattern: Ken would often understand the problem before I would, and would suddenly announce, &quot;I know what&#x27;s wrong.&quot; He was usually correct. I realized that Ken was building a mental model of the code and when something broke it was an error in the model. By thinking about <i>how</i> that problem could happen, he&#x27;d intuit where the model was wrong or where our code must not be satisfying the model.<p>Ken taught me that thinking before debugging is extremely important. If you dive into the bug, you tend to fix the local issue in the code, but if you think about the bug first, how the bug came to be, you often find and correct a higher-level problem in the code that will improve the design and prevent further bugs.<p>I recognize this is largely a matter of style. Some people insist on line-by-line tool-driven debugging for everything. But I now believe that thinking—without looking at the code—is the best debugging tool of all, because it leads to better software.&#x27;&#x27;&#x27;<p><a href="http:&#x2F;&#x2F;www.informit.com&#x2F;articles&#x2F;article.aspx?p=1941206" rel="nofollow">http:&#x2F;&#x2F;www.informit.com&#x2F;articles&#x2F;article.aspx?p=1941206</a>