~/talk

Oh Python! Where Did We Go Wrong

Talkat ConFoo 2025 · 2025-02-26..02-28· [python, engineering-leadership]
name:Greg Ward
links:none on file
slides:none on file

Python code quality suffers from specific, repeatable choices: top‑level modules execute network calls at import, ORMs that mimic active record hide database effects, and heavy subclassing produces tangled control flow that makes a method call jump up and down hierarchies. A Flask example shows a CRUD API for "fuars" with no input validation leading to 500s and HTML errors; switching to Flask‑RESTful fixes JSON errors but Flask‑RESTful hides URLs and forces extra classes. Excessive decorator use — notably decorator stacking of seven wrappers — breaks debugging; the practical fix is prefer composition over inheritance.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06Python's early strengths
  3. 3:36Unexpected language features
  4. 7:06Dangers of subclassing
  5. 11:40Case study API design
  6. 15:56Flask Restful critique
  7. 21:57Decorators done right
  8. 26:14Decorator stacking anti-pattern
  9. 34:45Clarity over cleverness
  10. 36:36Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.