August 25, 2012
Poignant Advice from Rob Pike

“After a while I noticed a pattern: Ken would often understand the problem before I would, and would suddenly announce, "I know what’s wrong.” 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 *how* that problem could happen, he’d intuit where the model was wrong or where our code must not be satisfying the model.

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.“


http://www.informit.com/articles/article.aspx?p=1941206

  1. triptagupta posted this
Blog comments powered by Disqus