Contribute Media
A thank you to everyone who makes this possible: Read More

Logging and Testing and Debugging, Oh My!

Description

Logging messages, unit tests, and using the debugger are best practices, but often left out of introductory programming tutorials. As a result, beginners come away with the idea that these time-saving features are somehow "advanced" or things to be learned later on. In this presentation, Al Sweigart dispels these notions by providing quickstart guides to Python's logging, doctest, and pdb modules.

Abstract

Logging messages, unit tests, and using the debugger are best practices, but often left out of introductory programming tutorials. As a result, beginners come away with the idea that these time-saving features are somehow "advanced" or things to be learned later on. In this presentation, Al Sweigart dispels these notions by providing quickstart guides to Python's logging, doctest, and pdb modules, including:

Why beginners (incorrectly) avoid these programming best practices. The "if you're doing this" signs that you aren't using these best practices. The 4 lines of code you need from the logging module. The 4 lines of code you need from the doctest module. The 2 lines of code you need from the pdf module. How much time you'll save, not spend, by using these not-so-advanced modules.

Bio

Al Sweigart is the author of several programming books, including Automate the Boring Stuff with Python. He releases all of his books online for free under a Creative Commons license. He lives in San Francisco, and his cat weighs 12 pounds.

Details

Improve this page