PyCon Lithuania 2025

Coding Aesthetics: PEP 8, Existing Conventions, and Beyond
2025-04-23 , 101

Coding aesthetics, in this context, refers to how code is written. It is essential that programmers also pay attention to the aesthetics and not just the functionality the code aims to achieve. This talk explores several ways to make Python code aesthetically pleasing, such as code refactoring, using static code analysis tools like PyLint to check compliance with PEP8 guidelines, and applying syntactic sugar. In addition, we will discuss the limitations of PEP8 and how we can make more pragmatic choices.


The talk will start with a few questions, and also with Donald Knuth's quote: "Programming is the art of telling another human being what one wants the computer to do."

It will comprise of 4 sections:

A. Intro (1 mins)

B. Donald Knuth's quote and what coding aesthetics means in this context (4 mins)

C. Ways to maintain coding aesthetics (10 mins in total)
- Refactoring: 3 mins
- PEP 8 and Code Analysis Tools ( PyLint, Flake8, Black, etc.): 4 mins
- Syntactic Sugars in Python: 3 mins

D. Beyond PEP8: 5 mins
- Purity vs Pragmatism
- Examples where PEP8 could be limiting
- Beyond PEP8

E. Q&A: 5 mins

Shiva is a Software Engineer based in Bellevue, WA, USA. He has previously presented his works at PyCon-US, PyCon-JP, and PyCon-AU. He has been active with the Python community worldwide and has volunteered remotely at EuroPython and PyCon Sweden. He is passionate about software engineering best practices, including code refactoring, design patterns, and coding aesthetics. In addition to software engineering, he loves reading, writing, and playing cricket.