3 ms·
To be fair to the design patterns people, a lot of them got baked into pieces of infrastructure like web servers and frameworks, while others are part of freque
by jrumbut 3y ago
To be fair to the design patterns people, a lot of them got baked into pieces of infrastructure like web servers and frameworks, while others are part of frequently included libraries.
If I went through and inspected any Node, Rails, Django, etc app I would find many Gang of Four design patterns, but very few of them would be in the project-specific code. They got implemented well, and now programmers can build new things that would have taken too long to do before.
And that was the intent of the Gang of Four book, not to teach you patterns you should copy mindlessly, but to give examples of how to identify and extract useful patterns from the software you've already written and describe them to others. Since that is a lot more difficult than memorization, very few took up that work.
- greiskul 3y agoDesign patterns are missing language features. http://norvig.com/design-patterns/ http://norvig.com/design-patterns/
- bluGill 3y agoPeople who say that don't understand design patterns and have never worked on a very large project with code dating back a few decades. Design patterns are what let you deal with the mess that results from that.
- kristjansson 3y agoGood _design_ improves long term maintainability. Design Patterns (in the GoF sense) are basically orthogonal to good design. Besides, Peter Norvig, even as of 1996, is not not the sort of neophyte you’re referring to.
- bb88 3y agoSo, here's something I hate on this site. Arguments that are made in the fashion "People who disagree with me must not understand X". When in fact you're often talking to some of the smartest people in programming on here (though, maybe not in other things.) It's possible to understand design patterns and work in a language that doesn't require them as much. Here's a talk about it from 2009 with regards to python. https://www.youtube.com/watch?v=kSQFZrTDaQ0 https://www.youtube.com/watch?v=kSQFZrTDaQ0
- bluGill 3y agoSome design patterns work around a bad language, but most are about complex problems. They are a way of describing abstraction, and that is what languages are about.
- rottc0dd 3y agoEven GoF says that class and interface are part of language for C++ or Java can be a design pattern for languages like C. I think in some ways AspectJ can make the observer design pattern obsolete in Java. I have arguments against doing it in aspect way, but it was revelation nonetheless.
- ivan_gammel 3y agoThis. As a hiring manager I noticed on interviews that many engineers when asked about patterns, do not even realize how much they rely on them in standard libraries and rarely understand that it’s not a fixed collection of templates, but rather a way of working with code. If you identify a common design and give it a name, you can save a lot of time explaining solutions based on it.
- nivertech 3y agothis. Back in the day (before open sourse became so prevalent), lots of software was designed from scratch with the minimal use of outside components and frameworks. Today OSS frameworks (especially web frameworks) and libraries, PaaS, and Cloud provides you with an already baked-in design patterns. So there is less need in SW Architect and proper design. Also, most of the Gang of Four patterns are just addressing the deficiences of OOP and older PLs, so if you're using a modern PL with closures/etc. there is no need in them. EDIT: Novadays a vast majority of design patterns are dealing with the complexities of microservices architecture, so if your product is a monolith then there is no need in them. IMO the most useful design patterns are the ones dealing with error handling, reliability, and the essential complexity comming from the real world and human actors, not the self-inflicted accidental complexity comming from the bad design decisions. The good SW Architect should be able to help in avoiding that.