by hsn915 · 5y ago · 0 comments
The author is just trading one set of hyped buzzwords (microservices/k8s/devops) for another (oop/solid/ddd).
It doesn't help when he claims that his approach is proved by science!!
There's no approach to software development that has been proven by science.
As far as I can tell, the search for the right methodology is part of the problem.
Instead of just writing the most sensible and simple code that would work, you have to adhere to some methodology.
Object Oriented Programming is not going to solve your maintenance problems and development speed. In my experience, it only makes it worse.
As far as I can tell, the author acknowledges that his methodology is not working for a lot of people, but he attributes that to "you're not doing it correctly" which is typical of advocates of OOP/SOLID/etc.
But this same excuse can be said about microservices. So what is the point?
The author spends a lot of time talking about how to talk to stake holders to understand the requirements.
OK. I'm totally behind the developers having complete understanding of what they are working on and what the expected results roughly should be like.
But as far as I can tell, this has nothing to do with domain driven design _per se_.
You can have complete understanding of the project, and implement the project successfully, without ever bothering with DDD.
I guess for some it is simply hard to grasp that one can have good understanding of software development without cramming endless design patterns and methodology acronyms.
It’s like saying „write good software” without any advice how to do it.
Design Patterns are not a catalog of recipes that you can use to put together a functioning system. They are instead an attempt at creating a "common language" of sorts for some common concepts. They don't really teach you anything about good software: they only allow experienced people to communicate well. The authors themselves have stated: "design patterns are descriptive, not prescriptive".
What one has to learn, instead, is the foundational knowledge that was used for building those "patterns and guidelines", and even for other things like SOLID. And dare I say and even functional programming, OOP and procedural programming itself. For example:
• Why you don't want tight coupling (foundation of lots of patterns and architectures)
• How to make program state predictable and why it's important (foundation of both OOP and FP, including encapsulation and immutability. And also of some patterns like CQRS)
• How to design good interfaces/APIs on all levels (functions, classes, modules, libraries, services, programs, companies)
• How to understand the cost of hidden dependencies (not talking about libraries, more like "functions that call other functions" or "classes that depend on other classes". This is Joe Armstrong's banana-gorilla-jungle problem)
• How to make functions/classes/modules that you can change without requiring cascading code changes in the rest of the program (again this has to do with coupling)
• How to make programs predictable in general (the most important business wise)Write code in a way that everybody can understand it, even managers.
That's it. There's no magic. Code is read MUCH more often than it's written. You have to optimize for it being readable.
This does NOT mean the shortest possible code. I've seen people go to that extreme and it never ends well. But it also doesn't mean every variable has to be called "user_in_a_context_of_private_temporary_login" either.
Truth is, writing understandable and readable code as a skill goes well beyond programming. You will find the same skill in well-articulated presenters, book authors and lawyers.
So just this one advice should be your guiding star: write your code as if you will have a stroke tomorrow and will suffer amnesia and you would still be able to understand your own code very quickly afterwards.
It’s easy to say „just write simple code”, but how do you do it? It’s not an advice someone can follow. Complex domains have many challenges where having patterns helps.