flâneur — a map of the web's best reading

Reading 9: Debugging

web.mit.edu · 11,730 words · saved by 1 readers

First, we’re going to look at how to avoid debugging – ways to write code that either avoids debugging entirely, or at least makes it easy when we have to do it. But sometimes you have no choice but to debug – particularly when the bug is found only when you plug the whole system together or reported by a user after the system is deployed, in which case it may be hard to localize it to a particular module. For those situations, we can suggest a systematic strategy for more effective debugging. A good book about systematic debugging is Why Programs Fail by Andreas Zeller. Much of this reading is inspired by that book. Also related is “How to Debug” by John Regehr, a lecture from an embedded systems course, which is more low-level than 6.102 but with the same general principles for systematic debugging. Finally, Debugging: The Nine Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems by David Agans is a readable, eminently practical guide to debugging in a

Reading 9: Debugging > hide Snapdown help Snapdown is a language for drawing snapshot diagrams. Click on the links below to see examples of Snapdown in action! In each example, you'll see a snippet of Snapdown syntax and the corresponding diagram side-by-side. Primitives (click to expand) In this example, we have two variables: i points to the value 5 , and s points to the value "abc" . i -> 5 s -> "abc" Objects (click to expand) In this example, f points to a MyFloat object with the value 5.0 , s points to a MyString object with the value "abc" . f -> (MyFloat 5.0) s -> (MyString "abc") Field

Explore this link on the map →

related reading