rudiHammad said:
ps: there are also youtube videos that prove earth is flat. Just saying…something to think about.
The same thing could be said about things written in books. Especially on topic as fuzzy as software design. This isn't exactly calculus we're dealing with. ?
SOLID isn't a scientific fact. It's a vague - and frequently poorly-taught, judging by how often I see people having to re-explain them - set of ideals for how software should be structured based on what some people who were prominent in the early '00s valued at the time. They're guidance, not rules that you have to follow, apart from perhaps on a few (misguided) software engineering exams. SOLID is fair game for rebuttal and if you don't find the principles helpful in your circumstances you are free - in fact, I encourage you - to discard them. I have found them helpful from time to time, personally, but I find they require some degree of exegesis to apply to the circumstances I usually find myself in - not exactly ideal in a guiding principle. I'm also not confident that reducing my values as a software engineer down to a mnemonic acronym is actually all that helpful, so I've resisted the urge to try to come up with a replacement for use in the times when I'm ignoring them.
You shouldn't treat the GOF or any other pattern book as a Bible, either - in fact, I very much discourage this, and the use of design patterns in your thinking while doing the actual design (using them to talk about your code after the fact is fine). I just pick on the GOF's terminology as much as I do because if we're going to be talking about GOF concepts, then we should be on the same page about what the authors meant.
rudiHammad said:
I encourage you to read books
I have. ?I increasingly find the ones you're citing unconvincing the more experience I gain in the software industry, and the video game industry in particular. Video games have their own context and requirements and SOLID was not invented in a gamedev context, but an enterprise software context. I have also come to see “pattern-think” - the structuring of software in terms of design patterns, as if they were LEGO elements to be clicked together - as problematic because it leads to overengineering and sometimes even magical thinking. You don't magically infuse your program with correctness by using the right design patterns. Just because a thing worked for someone else doesn't mean it'll work for you…
You can start by Design patterns head first, where it explain how every single solid principle is reflected in each pattern when applicable.
This does not mean design patterns were designed to follow SOLID. In fact, the GOF book came out in 1994. 6 years before Bob Martin's paper on the subject that introduced SOLID principles. Books of this sort are exactly the kind of “exegesis” I describe above. Looking for connections between things that were not intended to be connected, but accidentally reinforce each other. There are other paradigms than SOLID and there are other design patterns that emerge from the values that inform such paradigms.
I assume you haven't read that book, neither GOF, otherwise you would not have such little knowledge on how solid feed deeply the design patterns.
You assume poorly. In fact, I had to write an exam on design patterns for my undergrad. ?
I just hope new programmers dont actually believe some of the things you say, for their own good.
And I hope they think critically about your design patterns books and don't take them as the word of software God, for the same reason. The GOF in particular are frequently misunderstood to be saying “these are patterns you should be using” instead of what they actually said, which is “these are some patterns we repeatedly see other devs using.” Go back and re-read the forward to that book.