News for hackers. Stuff that matters.
Re:Parse, Don’t Validate by smt88 on Friday November 08, 2019 @01:55AM (#21480429)
> Actually, not encountering this style in code-base which is solving a complex problem is a massive warning sign for me.

This is very narrow-minded. DDD as a broad concept is good and something I practice.

DDD in enterprise is a disastrous nightmare. When people on your team are wasting time Googling lingo to try to figure out what kind of object they need, where to put a file, or where a method should go, it's a huge red flag.

I was on a team that seemingly spent all its time trying to figure out what the hell DDD was prescribing, let alone trying to figure out how to do it.

Re:Parse, Don’t Validate by Doxin on Friday November 08, 2019 @04:03AM (#21480841)
> When people on your team are wasting time Googling lingo to try to figure out what kind of object they need, where to put a file, or where a method should go, it's a huge red flag.

I agree, but for a different reason. If you've got a team of programmers on a project without any understanding of what the client is doing you're bound to implement stuff ass-backwards from the clients perspective.

DDD is fine in enterprise, but the domain does need to be communicated to all involved parties. You can't just dump a codebase on someone and expect them to get to work, that only barely works for non-DDD codebases let alone DDD codebases.

Re:Parse, Don’t Validate by monoideism on Friday November 08, 2019 @07:06AM (#21481520)
The kind of DDD this article is describing is totally different from Java-world enterprise DDD. It's DDD done right, with no 50-member OOP classes. Just a single function that can only take a type that describes your domain in a way that prevents whole classes of errors.
Re:Parse, Don’t Validate by smt88 on Friday November 08, 2019 @11:07AM (#21483517)
I think we're on the same page.

When inheriting a purist DDD project written in C#, I came across several... interesting... charts, including this one:

https://jj09.net/wp-content/uploads/2018/12/ddd-diagram-exam...

A lot of members of my team couldn't figure out where things were "supposed" to go (or what most of the terms mean) after weeks of working on the code, so they just started slapping methods anywhere and worrying about it later.

Re:Parse, Don’t Validate by MrGilbert on Friday November 08, 2019 @02:34AM (#21480543)
> [...] trying to figure out what the hell DDD was prescribing, let alone trying to figure out how to prescribe it.

Well... If the carpenter needs to Google how to use a hammer and nails while at the construction side, something went terribly wrong, didn't it?

Re:Parse, Don’t Validate by btschaegg on Friday November 08, 2019 @03:11AM (#21480657)
I would actually agree with you there, but I suspect that wasn't your point.

A hammer is such a simple and obvious concept that it should not need to be googled. If anybody needs to do that anyway, you should not put the blame on the carpenter, but on the guy who "designed" the hammer.

On a related note, I still very much am convinced that Don Norman's Design of Everyday Things is a great read for anyone who designs APIs; types in this argument function both as affordances and force functions, which are the exact reason why a hammer is such an obvious tool.

Re:Parse, Don’t Validate by smt88 on Friday November 08, 2019 @03:28AM (#21480709)
You seem to be implying that a dev who doesn't understand enterprise DDD is unqualified.

That's not like a carpenter who can't use a hammer. It's like a carpenter who asks for a sketch of a project and instead receives a phone-book sized list of vague instructions that no one can agree on.

Re:Parse, Don’t Validate by MrGilbert on Friday November 08, 2019 @04:33AM (#21480946)
> You seem to be implying that a dev who doesn't understand enterprise DDD is unqualified.

I imply that a dev who doesn't understand DDD in a enterprise environment, is unqualified for working with DDD in an enterprise environment.

As much as a carpenter is unqualified to be a carpenter if he doesn't know how to handle a hammer and nails.

And I appreciate all the downvotes coming in.

Re:Parse, Don’t Validate by hmottestad on Friday November 08, 2019 @05:12AM (#21481068)
I don't think people agree with your analogy. To me your analogy is too simple. I have 6 years of java development experience and a masters in informatics. I have yet to work with enterprise DDD. There were no classes at university that taught it.

In most of my projects I have had to learn a lot of new stuff, it's a blessing if someone on the team knows how to use it already. However I have found that on most projects we've struggled to hire people with substantial experience with the tech stack and methodology that the customer had chosen.

We still wouldn't find an entire team that had experience with everything we needed even if we paid them ten fold the amount of every other company.

On the other hand I reckon every carpenter learns to use a hammer and nails in school.

Re:Parse, Don’t Validate by MrGilbert on Friday November 08, 2019 @07:35AM (#21481655)
> There were no classes at university that taught it.

So? You don't leave university and expect to be "done", right? You learn, learn, and learn - your whole software dev life. Even better, your whole life.

And no - nobody teaches you how to professionally handle a hammer in school. Now you are simplifying here. In school, they show you a hammer and nails. That's it. As much as they show you a compiler, a programming language and a basic architecture in university.

There are a ton of different hammers and nails out there, each with their own special attributes. You have an engineer's hammer, a tiling hammer, a rubber hammer, a roofing hammer, a splitting maul, a sledgehammer and so on... And I won't start talking about nails.

It's up to you to gain knowledge when to use what, and how to use it. That doesn't mean it's useless per se. Or overly complicated. It might just no "be your thing", which is fine.

Re:Parse, Don’t Validate by hmottestad on Friday November 08, 2019 @10:47AM (#21483274)
This was exactly my point. Not all carpenters would know how to use some specialised hammer and specialised nail. Just like most developers wouldn’t know how to use a specialised language and framework. So developers that don’t know how to develop with DDD would just learn as part of joining a project and they would still be qualified to be on the project. Just like how a junior carpenter might not know everything needed to erect a hose by themselves, but as part of a team of carpenters they would learn the things they didn’t know from school including those specialised hammers and nails for that specific house because the owner wanted something unique or what not.

FYI a carpenter in Norway needs 4 years of education to become a carpenter. 2 years in school and 2 years as an apprentice. If they don’t know how to use a bog standard hammer by that time they are not passing the final examination.

Re:Parse, Don’t Validate by MrGilbert on Friday November 08, 2019 @05:52PM (#21487766)
I see - maybe I got your point wrong at first. Sorry for the confusion.

Here in Germany, it's basically the same: A carpenter goes to school and work in a dual system for 3 years, and can then put a master on top of it after several years of working experience. This takes another 2 - 4 years and a ton of money.

Re:Parse, Don’t Validate by ewngzen on Friday November 08, 2019 @07:17AM (#21481561)
My take is that DDD is actually a convinient intuitive way to work with, if it is not, probably something needs to be discussed and refactor ed