Stop Writing Classes
Channel:Next Day Video · Length:27:29 · Published:2012-03-15 · Views:962068
Summary
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.
Why HN 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.
Jack Diederich has a great video called Stop Writing Classes: It's about Python, but the observation can apply to several languages. — HN, 2020
Python, Ruby & scripting languages · Software architecture & design
Subtitles (excerpt)
introduce Jack drick uh a core developer uh who's going to talk to us about how to stop writing classes Jack [Applause] drick I don't mean to disappoint but I'm actually going to agree with everything Raymond just said wrestling so you've all read the zenap python probably many times um couple items simple is better than complex FL is better than nested readability counts if the implementation is hard to explain it's a bad idea if the implementation is easy to explain it may be a good idea um this is written by Tim Peters um he's smarter than you are he's smarter than I am uh how many people do you know with a sorting algorithm named after them that's the guy who wrote this and all of these points say don't do hard things do easy things and that's what this talk about is about so don't do hard things in the first place when you can avoid it um classes as Raymond knows well are can be very complicated he laid out some principles uh how you should figure out what you shouldn't be doing uh this talk is mostly about all the places where people go wrong and how you can just not do that at all um you end up doing that anyway even when you're trying to avoid it so this talk is actually going to be be uh rehashing some code uh how to notice when you've gone down the
On Hacker News
I also tend to avoid writing many classes (in Python). Jack Diederich has a great video called Stop Writing Classes: [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." — michelpp, 2020-03
Stop writing classes is one of my favorites. Also many pycon talks are great, or any talks by Brandon Rhodes. [VIDEO] — kyleperik, 2018-04
Stop writing classes - Jack Diederich - [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 d… — Vaskivo, 2014-12
I think you're thinking of Jack Diederich's talk "Stop Writing Classes". You can (and should!) watch it online here: [VIDEO] — inglesp, 2012-10
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, [VIDEO] . — zahlman, 2025-10
Related videos
- Special Topics - The Kalman Filter (1 of 55) What is a Kalman Filter? · Michel van Biezen · 5:55
- Lower Latency Graph Queries in Cypher with Redis GraphRoi Lipman, Redis LabsTim Davis, Texas A&M U · Redis · 46:05
- Noether's Theorem and The Symmetries of Reality · PBS Space Time · 13:01
- Your dishwasher is better than you think (tips, tricks, and how they work) · Technology Connections · 27:46
- Renting vs. Buying a Home: What People Get Wrong · Ben Felix · 18:52
- I messed up. You're using too much detergent. · Technology Connections · 48:24
- Detergent packs are kinda wishy-washy (Dishwashers Explained) · Technology Connections · 32:34
- Jordan Peterson - Controversial Facts about IQ · Bite-sized Philosophy · 13:10
- Why Western Designs Fail in Developing Countries · Design Theory · 27:36
- Yehuda Katz - Why Rails is Hard (Railsberry 2012) · applicake · 53:11
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- The spelled-out intro to neural networks and backpropagation: building micrograd · Andrej Karpathy · 2:25:52
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- RailsConf 2014 - All the Little Things by Sandi Metz · Confreaks · 38:47
- "Simple Made Easy" - Rich Hickey (2011) · Strange Loop Conference · 1:01:38
- What the heck is the event loop anyway? | Philip Roberts | JSConf EU · JSConf · 26:52