Oliver Drotbohm Archive About Tags

Reading "Domain Driven Design" again

June 6th, 2008

Currently I read Eric Evans’ “Domain Driven Design” once again. Having done so 3 times already, I discovered a paragraph that reminded me of a blog post written by David Linsin a while ago. Eric writes as follows:

"Well-written code ca be very communicative, but the message it communicates isnot guaranteed to be accurate. Oh, the reality of the **behaviour** caused by a section of code is inescapeable. but a method name can be ambiguous, misleading, or out of date compared to the internals of the method. The assertions in a test are rigorous, but the story told byvariable names and the organization of the code is not. Good programming style keeps this connection as direct as possible, but it is still an exercise in self-discipline. It takes fastidiousness to write code that doesn't just **do** the right thing but also **says** the right thing"

This states that well written code is not about just to look nice in your IDE - it’s about communicating. I e.g. favour an EmailAddress class over a simple String property in a User type cause this simple change distills so much more semantics.

“Domain Driven Design” is a book you can actually start reading from the front if you have reached the end. From time to time I reiterate over the book just to find new influences or judge new knowledge I gained in projects. I can only recommend to take a glance at it. For those of you that shy digging through over 500 pages there is a distilled version at infoq.com that nicely wraps up the book.

There are a few other books that influence my attitude towards coding a lot. Perhaps I’ll find time to provide a Top 5 on my upcoming trip to Antwerp.

blog comments powered by Disqus