Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Stop Writing Classes

    Next Day Video

    8 HN recommenders · recommended in 19 months, 2012–2025

    YouTube

    27:29 · 962K views · Mar 15, 2012

    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.

    Software Engineering & LanguagesPython, Ruby & scripting languagesSoftware architecture & design
    1. 38:47
      RailsConf 2014 - All the Little Things by Sandi MetzConfreaks190K views • 12 years ago
    2. 49:54
      The Clean Architecture in PythonNext Day Video114K views • 12 years ago
    3. 48:51
      Transforming Code into Beautiful, Idiomatic PythonNext Day Video1.1M views • 13 years ago
    4. 44:35
      Object-Oriented Programming is BadBrian Will2.6M views • 10 years ago
    5. 51:37
      Google Python Class Day 1 Part 1Google for Developers3.7M views • 16 years ago
    6. 45:08
      Raymond Hettinger - Dataclasses: The code generator to end all code generators - PyCon 2018PyCon 2018130K views • 8 years ago
    7. 1:01:39
      "Simple Made Easy" - Rich Hickey (2011)Strange Loop Conference220K views • 5 years ago
    8. 49:55
      How Python was Shaped by leaky Internals, Armin Ronacher, Flask frameworkВидео с мероприятий {speach!20K views • 10 years ago
    9. 1:54:11
      James Powell: So you want to be a Python expert? | PyData Seattle 2017PyData508K views • 9 years ago
    10. 28:06
      MountainWest RubyConf 2014 - But Really, You Should Learn SmalltalkConfreaks27K views • 12 years ago
    11. 31:38
      Cory Benfield - Building Protocol Libraries The Right Way - PyCon 2016PyCon 201615K views • 10 years ago
    12. 44:03
      Google Developers Day US - Python Design PatternsGoogleDeveloperDay90K views • 19 years ago
    13. 35:53
      RailsConf 2015 - Nothing is SomethingConfreaks84K views • 11 years ago
    14. 30:52
      What nobody tells you about documentationPyCon AU105K views • 9 years ago
    15. 1:01:45
      A Talk Near the Future of Python (a.k.a., Dave live-codes a WebAssembly Interpreter)David Beazley26K views • 7 years ago
    16. 38:25
      "The Clean Code Talks -- Inheritance, Polymorphism, & Testing"Google TechTalks438K views • 17 years ago
    17. 28:03
      Object-Oriented Programming is Embarrassing: 4 Short ExamplesBrian Will2.2M views • 10 years ago
    18. 1:03:31
      Brian Goetz - Stewardship: the Sobering PartsClojureTV39K views • 11 years ago
    19. 42:44
      Armin Ronacher - A Python for Future GenerationsEuroPython Conference6.2K views • 9 years ago
    20. 54:10
      Design Patterns vs Anti pattern in APL by Aaron W Hsu at FnConf17ConfEngine7.7K views • 8 years ago

    20 comments from Hacker News

    1. @VaskivoDec 2014· in “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 all fell into place. Class based OOP have specific uses, but It's a shame how heavily enforced the paradigm is. “Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function.” – John Carmack Now, for scripts or not-to-big programs in Python, I mainly use NamedTuples for passing data around and (mostly) pure functions. P.S. Another funny thing: At my job I use J2EE aka "lots of hinheritance and classes and boilerplate". Sometimes I just have to go home and write some code in python or lua to "cleanse my palate". It helps me get motivated for my personal projects. [1] [LINK]

      Strongly recommendsView on HN
    2. @michelppMar 2020· in “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."

      Strongly recommendsView on HN
    3. @inglespOct 2012· in “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

      Strongly recommendsView on HN
    4. @kyleperikApr 2018· in “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

      Strongly recommendsView on HN
    5. @1penny42centsMay 2022· in ““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".

      RecommendsView on HN