Monitor performance issues & errors in your code

Clean Code in Python

Episode #404, published Mon, Feb 20, 2023, recorded Sun, Feb 12, 2023

Clean code is one of those aspects of your programming career that's easy to put on the back burner (sometimes by management more than yourself). But it's important in the short term for writing more debuggable and readable code. And important in the long run for avoiding having your program take on the dreaded "legacy code" moniker. We're fortunate to have Bob Belderbos back on the show. He's been thinking and writing about clean code and Python a lot lately and we'll dive into a bunch of tips you can use right away to make your code cleaner.

Watch this episode on YouTube
Play on YouTube
Watch the live stream version

Links from the show

Bob on Mastodon:
Tips for clean code in Python article:
Refactoring book:
Final type:
Sentinels pattern:
Black formater:
Guarding clauses:
Git Precommit:
#100DaysOfCode in Python course:
#100DaysOfWeb in Python course:
Watch this episode on YouTube:
Episode transcripts:

--- Stay in touch with us ---
Subscribe to us on YouTube:
Follow Talk Python on Mastodon: talkpython
Follow Michael on Mastodon: mkennedy

Want to go deeper? Check out our courses

Talk Python's Mastodon Michael Kennedy's Mastodon