Boring Object Orientation
summary
Argues that making classes boring improves robustness and testability by showing concrete patterns and tools rather than vague principles. Verifies interfaces with zoop.interface instead of duck typing, moves slow or fallible work out of __init__ into named constructors, uses utters with frozen=True for immutable data and evolve to produce modified copies, and replaces many methods with functools singledispatch functions to keep concerns separate and avoid brittle inheritance.
AI-written summary · about
chapters (12)
- 0:00Start
- 0:44Boring object orientation
- 2:50Explicit interfaces in Python
- 6:19Simplify object initialization
- 11:38Automate object construction
- 13:25Prefer immutable objects
- 15:31Avoid private methods
- 17:55Single dispatch
- 20:00Avoid inheritance in Python
- 21:44Lessons from large systems
- 22:45Boring code for maintainability
- 23:08Q&A
related talks
46mBetter code through boring(er) tests
46mOn Being Pythonic
34mBetter Code Through Boring(er) Tests
32mEasier Classes: Python Classes Without All the Cruft
01h 30mPython Design Patterns
28mPracticality Beats Purity: The Zen of Python’s Escape Hatch?
32mRethinking Objects
48mDesign patterns to boost your test automation
