© Kristian Rother 2017

Kristian Rother, Pro Python Best Practices, 10.1007/978-1-4842-2241-6_4

4. Debugging with the Scientific Method

Kristian Rother

(1)Berlin, Germany

I have a background in IT. I don’t take anything for granted.

—Anonymous

In the previous two chapters, we have seen a few frequently occurring defects in Python. Not only does that help us to recognize and fix similar defects, we also know that defects may propagate through a program, and the diagnosis may not be obvious. It is time we turn our attention to fixing more difficult bugs. How can we fix an error we have never seen before? In this chapter, we will analyze a bug in the game controls of MazeRun systematically.

In any game, there is a mechanism by which the player controls ...

Get Pro Python Best Practices: Debugging, Testing and Maintenance now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.