© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.