Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Writing Beautiful Code

EuroPython Conference via YouTube

Overview

Explore the art of crafting elegant and maintainable Python code in this 25-minute EuroPython Conference talk by Anand Chitipothu. Discover practical techniques for enhancing code readability, including proper variable naming, minimizing nesting, effective use of whitespace, and strategic commenting. Learn how to apply time-tested principles of beautiful code writing through real-world Python examples. Gain insights into avoiding common pitfalls, handling errors efficiently, and suppressing unnecessary implementation details. Master the skills to create code that is not only functional but also a joy to read, understand, and maintain.

Syllabus

Intro
Who is speaking?
Avoid Generic Names
Avoid Abbreviations
Avoid using datatype as name
Nouns & Verbs
Use plural for a list
Reserve Loop Indexes
Example 1
Similar names
Don't say the obvious
Explain why you made that choice
Document special cases
Make Comments Redundant
Divide & Conquer
The 7
Avoid too many nested levels
Handle errors separately
Suppress the implementation details
Summary

Taught by

EuroPython Conference

Reviews

Start your review of Writing Beautiful Code

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.