Debugging - Lesson 9

Questions

  • How can I debug my program?

Objectives

  • Debug code containing an error systematically.
  • Identify ways of making code less error-prone and more easily tested.
  • Understand the concept, and benefits of, rubber duck debugging

Lecture



Alternate video link.


Jupyter Notebook File

Please use the Jupyter notebook named "09Debugging.ipynb" for this lesson. If you haven't downloaded them already, you may find them here.

Key Points

  • Know what code is supposed to do before trying to debug it.
  • Make it fail every time.
  • Make it fail fast.
  • Change one thing at a time, and for a reason.
  • Keep track of what you’ve done.
  • Be humble.