HackerTube / Video

Stop Writing Classes

Next Day Video

Stop Writing Classes

Jack Diederich's PyCon 2012 talk argues that classes are overused in Python and walks through real code, refactoring away unnecessary classes, exceptions and modules. It popularized the heuristic that a class with two methods, one being __init__, should be a function.

HN returns to it repeatedly as the canonical argument for simplicity and against premature abstraction, and several commenters say it changed how they write code.

20 Hacker News mentions · 2012–2025

Topics

Watch on YouTube

Explore more videos