Chapter 22: Further Reading

Annotated Bibliography

1. "Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems" by David J. Agans (2002)

A classic text on systematic debugging that remains relevant despite predating AI tools. Agans distills decades of debugging experience into nine clear rules, including "Understand the System," "Make It Fail," and "Change One Thing at a Time." These rules form an excellent foundation for the structured approach to AI-assisted debugging taught in this chapter. The principles apply regardless of whether you are debugging alone or with AI assistance.

2. "Why Programs Fail: A Guide to Systematic Debugging" by Andreas Zeller (2nd Edition, 2009)

Zeller provides a scientific approach to debugging, treating bug finding as a hypothesis-testing exercise. The book introduces techniques like delta debugging (automatically minimizing failure-inducing inputs) and covers program analysis tools. Particularly relevant to this chapter are the sections on isolating failure causes and understanding cause-effect chains in stack traces.

3. Python Documentation: "The Python Debugger (pdb)"

URL: https://docs.python.org/3/library/pdb.html

The official documentation for Python's built-in debugger. Essential reading for Section 22.5 on interactive debugging with AI. Understanding pdb commands enables you to capture meaningful debugger sessions to share with AI assistants. Covers breakpoints, stepping, variable inspection, and conditional breakpoints.

4. "Effective Python: 90 Specific Ways to Write Better Python" by Brett Slatkin (3rd Edition, 2024)

Several chapters address debugging-related topics: Item 80 covers pdb for interactive debugging, Item 78 covers profiling before optimizing, and multiple items cover common Python pitfalls (mutable default arguments, late binding closures) that frequently appear as debugging challenges. The book provides Python-specific context for many of the bug patterns discussed in Section 22.10.

5. "The Art of Readable Code" by Dustin Boswell and Trevor Foucher (2011)

While not a debugging book per se, readable code is easier to debug. The authors' advice on naming, commenting, and structuring code directly reduces the incidence of bugs and makes the remaining bugs easier to find. Particularly relevant when preparing code snippets to share with AI — well-structured code leads to better AI analysis.

6. Python Documentation: "Logging HOWTO" and "Logging Cookbook"

URL: https://docs.python.org/3/howto/logging.html

The official guide to Python's logging module. Essential background for Section 22.4 on log analysis. Covers logging levels, formatters, handlers, and best practices for structured logging. The cookbook section provides practical patterns for common logging scenarios like logging from multiple modules and configuring logging for libraries.

7. "High Performance Python: Practical Performant Programming for Humans" by Micha Gorelick and Ian Ozsvald (2nd Edition, 2020)

Comprehensive coverage of Python performance profiling and optimization. Chapters on profiling with cProfile, line_profiler, and memory_profiler provide the technical foundation for Section 22.6. The book also covers performance anti-patterns that AI frequently identifies in profiling output, such as unnecessary object creation and inefficient data structures.

8. "Python Cookbook" by David Beazley and Brian K. Jones (3rd Edition, 2013)

A practical reference with recipes for common Python tasks. Chapter 14 on testing, debugging, and exceptions contains particularly relevant recipes for debugging decorators, tracing program execution, and profiling memory usage. The recipe format aligns well with presenting specific debugging techniques to AI assistants.

9. Real Python: "Python Debugging With Pdb"

URL: https://realpython.com/python-debugging-pdb/

An accessible tutorial on Python debugging that covers pdb, breakpoint(), and IDE debugging features. Includes practical examples with screenshots and step-by-step walkthroughs. Good supplementary material for readers who want more hands-on practice with interactive debugging before combining it with AI assistance.

10. "Release It!: Design and Deploy Production-Ready Software" by Michael T. Nygard (2nd Edition, 2018)

Covers stability patterns and anti-patterns in production systems. The chapters on cascading failures, timeouts, and circuit breakers provide context for understanding the production errors discussed in Sections 22.3 and 22.4. Especially valuable for understanding why certain error patterns appear in logs and how to present production issues to AI.

11. pip Documentation: "Dependency Resolution"

URL: https://pip.pypa.io/en/stable/topics/dependency-resolution/

The official documentation for pip's dependency resolver. Essential background for Section 22.8 on dependency conflicts. Explains how pip resolves version constraints, what causes resolution failures, and how to interpret conflict error messages. Understanding this helps you provide better context when asking AI about dependency issues.

12. "Fluent Python: Clear, Concise, and Effective Programming" by Luciano Ramalho (2nd Edition, 2022)

Deep coverage of Python's data model and runtime behavior. Understanding concepts like descriptor protocol, metaclasses, and the GIL helps debug subtle issues that surface in advanced Python code. The chapters on iterators, generators, and coroutines are particularly relevant for debugging async stack traces discussed in Section 22.3.

13. Sentry Documentation: "Error Monitoring Best Practices"

URL: https://docs.sentry.io/

Sentry is a widely-used error monitoring platform. Their documentation covers best practices for error capture, grouping, and analysis that complement the log analysis techniques in Section 22.4. Understanding how production error monitoring tools work helps you present real-world error data to AI assistants more effectively.

14. "Working Effectively with Legacy Code" by Michael Feathers (2004)

A foundational text on understanding and modifying code you did not write — a common debugging scenario. Feathers introduces the concept of "characterization tests" (tests that document existing behavior) and techniques for safely modifying unfamiliar code. These concepts directly support the approach of using AI to understand error patterns in codebases you are not familiar with.

15. The Twelve-Factor App: "XI. Logs"

URL: https://12factor.net/logs

A concise guide to treating logs as event streams. This methodology underpins modern logging practices and helps explain why structured logging (JSON format, key-value pairs) makes AI-assisted log analysis so much more effective. Short but highly influential reading for anyone building systems that need to be debuggable.