3 ms·
I spent far too much time trying to help confused people understand the Design Patterns book. At the end I knew less than I did at the start. People come to DP
by hinkley 4y ago
I spent far too much time trying to help confused people understand the Design Patterns book. At the end I knew less than I did at the start.
People come to DP thinking they are going to understand the structure and maintenance of 'good code'. None of that is in that book. In fact given how we have demolished a couple of patterns that are laid out in that book (notably, Singletons as harmful), less than none of that is in that book.
I started telling people they should read Refactoring instead. And if they wanted a second recommendation for something to read after Refactoring, that they should read Refactoring a second time.
- outworlder 4y agoDesign patterns don't have much to do with 'good code'. Many(most?) 'design patterns' are just standard ways of coming up with abstractions that your language does not provide. It's no wonder that particular book became popular at around the same time a particular programming language saw large adoption.
- hinkley 4y agoPeople like to read Christopher Alexander because he decomposes problems and you understand why. So many people compared the two but in hindsight I think they were trying to say, "Read this, it's much better" without calling out the GoF book directly. Unfortunately what I felt and observed in others was that some sort of equivalence was being made, adding to and drawing out the confusion.
- john-tells-all 4y agoI've found the OG Design Patterns book to be verbose and opaque. I strongly recommend => Refactoring Guru https://refactoring.guru/design-patterns/python https://refactoring.guru/design-patterns/python It's a lot of patterns with _short_ clear descriptions, and lots of diagrams! Recommended even if you're not doing Python. An excellent investment, and a bunch of it is free.
- hinkley 4y agoThe DP book is a published version of Gamma's PhD thesis, which I learned in a class with someone closer to the story. It's corroborated here: https://www.zdnet.com/article/erich-gamma-a-pattern-of-success/ https://www.zdnet.com/article/erich-gamma-a-pattern-of-succe... On its face that implies that Gamma was a kid, and so the work is purely academic, but he's around 8 years too old to have been starting a PhD in '91 without any prior industry experience. It's still mostly his work (otherwise it's not his PhD) with the other 'authors' consulting and copy editing.