CSC 151 - Hypothesis-driven debugging
Hypothesis-driven debugging captures the idea that we can use the scientific process to make debugging systematic rather than ad-hoc. In this framework, we are observing and ultimately making predictions about the behavior of our program. There are five steps to hypothesis-driven debugging: In the first step, we gather data about the error that we have encountered. Primarily, this is the indicator that we have encountered an error in the first place. In many cases this is the error message generated by Scheme as the result of faulty syntax, a violated contract, etc. However, in the case of other errors, this may be more subtle, e.g., the output of a function not matching what you expected. Scheme error messages help you narrow down the location and kind of error ultimately plaguing your code. Sometimes the error message is very clear about these things, e.g., this contract violation: Tells me that the second argument, "1", violates the contract of + because a number? was expected. In c
CSC 151 - Hypothesis-driven debugging Hypothesis-driven debugging Due Wednesday, 24 September 2025 --> Summary We present a systematic approach to debugging your code and show you how you can use debugging tools to augment this approach. Hypothesis-driven debugging Hypothesis-driven debugging captures the idea that we can use the scientific process to make debugging systematic rather than ad-hoc. In this framework, we are observing and ultimately making predictions about the behavior of our program. There are five steps to hypothesis-driven debugging: Gather data State assumptions Predict what
Explore this link on the map →saved by
related reading
- CSC 151 - Unit Testingeikmeier.sites.grinnell.edu
- Reading 13: Debuggingweb.mit.edu
- Reading 9: Debuggingweb.mit.edu
- The Debugger's Toolkit - by Addy Osmani - Elevateaddyo.substack.com
- Learning By Writingcold-takes.com
- Computers can be understood - Made of Bugsblog.nelhage.com
- Transcript – Debugging: Techniques for Uncertain Times – Chelsea Troychelseatroy.com
- Reading 9: Avoiding Debuggingweb.mit.edu
- Debugging Misadventures: Down the Rabbit Holejamie-wong.com
- CS106B Backtracking Warmupweb.stanford.edu
- Socratic Ducking, OODA Loops, Frame-by-Frame Debugging — LessWronglesswrong.com
- Some ways to get better at debuggingjvns.ca