3 ms·
In software engineering certain ideas that sound neat can undeservingly gain a lot of popularity and endorsment. OO and design patterns are among those ideas. T
by kubb 5y ago
In software engineering certain ideas that sound neat can undeservingly gain a lot of popularity and endorsment. OO and design patterns are among those ideas. The promise is tempting - we'll give you a template to solve problems, and that will prepare you for most of the situatuons that you encounter. This appeals to inexperienced programmers who don't know how to approach real-world tasks.
The idea will probably remain popular as long as programming is a thing, with an ecosystem of blog posts, tech talks and expert books to grant it credibility.
But let me tell you this: there are principal engineers at FAANGs that wouldn't be able to name more than one design pattern (the one being Singleton).
DP might help in your career, but only if your bosses also believe in them. Many things in our profession are based purely on belief.
- thedracle 5y agoLet me begin with saying I'm happy the design pattern fetishism of the 90's is long dead. But that I think the pendulum has swung the other direction a bit too far to say the promise of OOP and design patterns is somehow a failed avenue only practiced by inexperienced engineers. It's hard for me to understand this perspective when a large portion of the foundation of modern software is built on OOP and design patterns. If you crack open the Chromium source code, you're going to see Factory mentioned hundreds of times: https://github.com/chromium/chromium/search?q=factory https://github.com/chromium/chromium/search?q=factory As well as singleton: https://github.com/chromium/chromium/search?q=singleton https://github.com/chromium/chromium/search?q=singleton Visitor: https://github.com/chromium/chromium/search?q=visitor https://github.com/chromium/chromium/search?q=visitor And the list goes on, and on. This is true for V8, which underlies NodeJS, and is the engine that powers most modern JavaScript: https://github.com/v8/v8/search?q=factory https://github.com/v8/v8/search?q=factory V8 was designed by the same engineers who built the Java Virtual Machine, and what techniques did they employ to build this massive piece of software that runs the modern web? Object oriented design, and design patterns. It's very probable people designing modern web applications for the FAANGs are not particularly aware of design patterns, or even maybe that MVC is a design pattern even if they are using it. It's possible many design patterns aren't useful for the types of problems they are solving, or could complicate matters if they used them haphazardly. But the engine driving every single JavaScript program, is built on top of a behemoth of object oriented, design pattern laden, software, written by FAANG engineers that I promise you understand design patterns extremely well. I'm not saying this is the end all, be all, of software design. Or that "modern" functional takes on software design (most functional languages and ideas predate OOP) aren't perfectly valid, or successful. Or even that they couldn't solve many of these problems. I'm just contesting any dogmatic rejection of what has actually been one of the most successful branches of software design.