../_images/book_cover.jpg

This notebook contains an excerpt from the Python Programming and Numerical Methods - A Guide for Engineers and Scientists, the content is also available at Berkeley Python Numerical Methods.

The copyright of the book belongs to Elsevier. We also have this interactive book online for a better learning experience. The code is released under the MIT license. If you find this content useful, please consider supporting the work on Elsevier or Amazon!

< 9.3 Summary and Problems | Contents | 10.1 Error Types >

Chapter 10. Errors, Good Programming Practices, and Debugging


Motivation

Regardless of how proficient, diligent, and careful a programmer you are, writing code with errors is unavoidable, and this can be one of the most frustrating parts of programming. As such, dealing with errors preemptively, mentally, and emotionally is a critical part of becoming a proficient programmer. In this chapter, we give a formal definition of errors, provide good programming practices that will help you avoid making errors, and show you some Python tools to help you find errors when you make them.