Stop Writing Classes

Next Day Video · 961K views · 2012 · 27:29

Open on YouTube

Python, Ruby & scripting languagesSoftware architecture & designtalk

Why Hacker News recommends it

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.

What it is

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.

Recommended by 8 HN commenters across 8 different months, 2012 to 2025.

What Hacker News said

Strong rec inglesp · 2012-10 · on “An Object is not a Hash”

I think you're thinking of Jack Diederich's talk "Stop Writing Classes". You can (and should!) watch it online here: [this video]

Strong rec Vaskivo · 2014-12 · on “Ask HN: What do you think about using classes in Python?”

Stop writing classes - Jack Diederich - [this video] Show them this. I'm still grateful for the moment I grew dissatisfied with OOP, or at least OOP in the Java/C# way. I was almost getting to an intermediate level in python (by myself) and had been thinking about a video game architecture problem I just couldn't solve. I was still "indoctrinated" in the gang-of-four patterns and inheritance. When I discovered the solution, Entity Component Architectures[1], I also discovered the "composition over inheritance" philosophy. My mind was blown! Coupled with some Python's characteristics (duck-typing, everything is public, first-class functions) I was having a blast. Then I saw the video above, and al

Strong rec kyleperik · 2018-04 · on “Ask HN: What is your favourite tech talk?”

Stop writing classes is one of my favorites. Also many pycon talks are great, or any talks by Brandon Rhodes. [this video]

Strong rec michelpp · 2020-03 · on “I Don't Use Classes”

I also tend to avoid writing many classes (in Python). Jack Diederich has a great video called Stop Writing Classes: [this video] It's about Python, but the observation can apply to several languages. Pithy quote: "I hate code and I want as little of it as possible in our product."

Recommends gingerlime · 2013-04 · on “Ask HN: What's the best technical talk you've heard?”

Hickey gives great talks, but I also really liked Jack Diederich's talk "stop writing classes" at PyCon 2012 [this video]

Recommends jmielkeway · 2021-08 · on “Ask HN: What has improved You as a Developer?”

I read this book: [LINK] While doing these labs: [LINK] Also a colleague made me watch this from Jack Diederich: [this video]

Recommends 1penny42cents · 2022-05 · on ““What if it changes?””

Reminds me of this talk, "Stop Writing Classes": [this video] Changed my perspective on this newfound tool I'd learned to use called "indirection". My favorite quote is something like "don't waste 10 minutes now to save yourself 2 minutes later".

Recommends zahlman · 2025-10 · on “Why Is Python So Popular in 2025?”

Yes, the standard library has a lot of questionable design (some inspired by Java, some by C), and many programmers overuse classes. I'm a fan of (former core dev) Jack Diederich's talk, [this video] .