Ubiquitous Language – Accuracy Vs. Relevance

by bsatrom June 21, 2010 15:38

This post is third in a series on Ubiquitous Language and Domain-Driven Design.

Part 1 - Communication Vs. Jargon

Part 2 - Every Misunderstanding, a Bug

In part one of this series, I argue that the prevalence of jargon in the problem and solution spaces necessitates a clear and contextualized language that all project stakeholders actively use. In part two, I discuss the most common side-effect of misunderstandings in software projects: the defect.

Photo courtesy of shaman-j

Perhaps its odd that I’m spending so much time talking about and making the case for a ubiquitous language, especially since the concept receives little intensive treatment in DDD circles compared to the classic building-block patterns and new innovations, such as CQRS and Event Sourcing. A simple Google search on DDD-related blogs, or a quick perusal of the DDD Yahoo! Group will reveal that most of the time and effort spent reasoning about the art of Domain-Driven Design is spent on technical patterns and implementation strategies, as opposed to the “softer side” of DDD: language, context and strategic design patterns.

I recognize that my multi-post treatment of Ubiquitous Language may come off as a “Duh” moment for an experienced DDD practitioner. After all, Evans’ treatment of the idea of language and its importance in the creation of software-intensive systems is concise and well-reasoned, leaving out little in the way of justification. And while my goal is partly to reinforce that justification with some of my own, lesser reasoning on the subject, I also wish to illuminate some of the differences between the language of domain experts and development teams so as to underscore those areas most critical to unify into the new, shared language that Evans proposes. These are areas not covered explicitly by Evans that, in my opinion, can aid the DDD practitioner in the actual hands-on creation of a Ubiquitous Language; something not given in-depth treatment in the book.

To be completely transparent, I believe that Ubiquitous Language holds value even where a project is too simple to necessitate a DDD-style approach.

As such, I discuss communication and jargon in part one to underscore the need to confront domain jargon head on, either eliminating it in favor of alternate terminology, or formally bringing it into the new language. My second post on software defects serves to reinforce the idea that a shared language favors clarity and, as such, tends to result in software that does exactly what it was meant to do.

In this post, I’d like to discuss accuracy and relevance and, through this discussion, point out that the creation of a Ubiquitous Language is not the wholesale adoption of the language of the business, but rather, a unification of key concepts from both domain experts and the development team.

Sundials and digital Watches – The art of Time vs. the science of telling time

Sit in a room with domain experts and a development team for any length of time, and you’ll see one of the key differences between these two groups at play almost instantly. Let’s assume a meeting has been called by a technical project manager. Its purpose is to reason about an important feature for a new piece of software that the team is preparing to build.

As the project manager begins to question the domain expert about the feature, you’ll notice that the manager is looking for information that reveals exactly what should be estimated and built. Call them requirements, use cases, scenarios or user stories; the development team is looking for something tangible to construct. But a close listen to the domain expert reveals that their default behavior is not to communicate what needs to be built, but rather, their general thoughts on how they will use the thing when built. Most of the customers I have worked with over the years want to tell me a story, either about the system they currently have or the one they want me to deliver. That story will reveal some of what the domain expert actually wants to see, yes. But if you’ve spent any amount of time on a software project, you’ve likely had had least one meeting later in that project where the customer asks for something new, or changes their mind about the utility of something you’ve already started building. The domain expert’s understanding of their need evolves and is refined over time.

This is frustrating to most traditional development teams. In many projects, the development team wants the problem domain to function like a digital watch. You tell me the hour, minutes and the meridian, and I can tell you what time it is, as well as whether or not the sun is out.

The reality is often more like a sundial. As long as the sun is out, and not obscured behind a cloud, I can give you a loose approximation of the time, within about 15 minutes.

This kind of attitude annoys development teams to no end. We are of the digital watch. We tend to favor accuracy over elegance. A sundial, to us, is nothing more than a decorative garden piece; perhaps a decent perch. Why use one when we can know exactly what time it is, down to the second, or better?

Accuracy vs. Relevance – Picking one over the other

Much of this, I suspect, has been imprinted upon us by the science of our profession. The computers we program tend to do exactly what we tell them to. Accurate inputs yield consistent outputs. As such, accuracy is of the utmost importance, and when we interact with domain experts and customer groups, we expect accurate information to lay the foundation for the software systems we build. When we interact with domain experts, we pepper them with requirements documents and milestones requiring signoff in an attempt to force them into giving us accurate information.

Contrast this with most of the businesses we serve and support, where historical success is often owed more to relevance than accuracy. Of course, the need for accuracy exists in many facets of a business, but outside of finance and accounting, most businesses change and adapt quickly to address a competitive landscape. They shift to remain relevant, often leaving a legacy of inaccuracy. As I stated in my post on jargon and communication, a cursory analysis of most business domains reveals conflicting, inaccurate, and overlapping information. A businesses ability to move with agility, while often a attribute of success, also creates a wasteland of information that stymies technological innovation.

With two competing ideas sitting at either end of the design table—accuracy as represented by the development team, and relevance as represented by the domain expert—there is often a subconscious push to favor one approach over the other.

If the domain expert possesses the most leverage, relevance wins out, and the development team is forced to manage inaccuracy in its code base. The result is a tangled mess, a digital manifestation of the incomplete, inaccurate and overlapping ideas of the business. Change in any software project should be embraced and expected, and Agile methods are designed to accommodate the need of the domain to refine its needs, but a business-dominated domain can cause the rate of change to become constant, resulting in unproductive thrashing.

If, on the other hand, the development team holds the leverage, accuracy wins out, and the domain expert is forced to propose only those features that can be wholly defined prior to construction. The result is well-architected system with a login screen, role-based security and zero useful functionality. When a domain expert is forced to codify a concept or need prior to engaging with the team, he or she is forced to table those ideas with the most value to the business because, invariably, these are the ideas that change most often as the company evolves.

Combining Value – Creating an accurate, relevant language

image

Creating a Ubiquitous Language is an approach that preserves the relevance of the business domain, while  encouraging the accuracy needed by the development team. More than simply choosing terms or ideas from one group or the other, a Ubiquitous Language (within a bounded context) creates a new vocabulary that domain experts and developers share to craft a solution that can be accurately represented by the software, while remaining flexible and relevant to the evolving needs of domain experts.

When setting out to create and refine a Ubiquitous Language for your project, keep in mind that your domain experts will provide you with the relevance you need to make your system valuable. As you walk them through your process, watch for valuable ideas, and the inaccuracies that surround them. Work with the domain expert and the development team to refine those ideas into something that the software can support, and document those ideas by creating software and models that expresses those ideas clearly and completely. As the language is created, use it. Map old ideas to new ones, and be disciplined enough to “dogfood” the new language in your conversations and design sessions. As ideas are refined—as they evolve—refactor the code. Keep the system tied to the language at all costs.

Sounds like common sense, right? And yet, it’s the hardest, most vital aspect of any software-intensive system.

At least, that’s my opinion.

Tags: , , ,

ddd | design | architecture | ubiquitous language

New Article in The Architecture Journal

by bsatrom March 26, 2010 13:49

Last night, I got word that the article on Domain-Driven Design (DDD) and Emergent Architecture that Paul Rayner and I wrote for The Architecture Journal has been published.

The issue is titled “Architecture Modeling and Processes,” and I’m looking forward to digging into the other articles this weekend. In particular, “UML or DSL: Which Bear Is Best?” fascinates me, both for it’s subject and reference to The Office. I’ll be grabbing the PDF of the issue and loading it up on the Kindle straightaway.

Our article, titled “Keeping Architectures Relevant: Using Domain-Driven Design and Emergent Architecture to
Manage Complexity and Enable Change
,” looks to have been chosen as the featured article in the issue, which is exciting and an honor. Click here for an online version (also posted below), here to read the forward with a description of each article and the issue’s theme, and here for a PDF version with all the fancy post-production.

Paul and I would love to hear your thoughts, so feel free to comment here or over at his blog, if you are so inclined. We’d also appreciate it if you’d pass the article along to others in your network whom you think might be interested.

Enjoy, and have a great weekend!

Links:

The Architecture Journal, Issue 23

PDF Version of Issue 23

Keeping Architectures Relevant: Using Domain-Driven Design and Emergent Architecture to Manage Complexity
and Enable Change

Tags: , , ,

architecture | agile | ddd | design | writing

Ubiquitous Language – Every Misunderstanding, a Bug

by bsatrom February 16, 2010 17:46

This post is the second in a series on Ubiquitous Language and Domain-Driven Design.

Photo courtesy of Lukjonis Bug

Last week, I wrote about the difference between jargon and communication and how, in the context of a software-intensive system, jargon necessitates either translation between domain experts and developers or the creation of a new, shared language that all parties exercise.

Translation is time-consuming and expensive--an increased communication cost that lengthens software development efforts. Creating a Ubiquitous Language has a cost as well--an up-front investment in creating and exercising the language--but that cost is quickly recouped in the increased velocity of the development team.

The truth is that the communication cost incurred by translation has other ripples throughout our systems. The phrase “Lost in Translation” is not only true in cultural language, but in the jargon-filled domains of our customers and clients. When we allow the need for translation to embed itself in our projects, we invite misunderstanding and, as a result, a far greater cost than just the time it takes to mediate between conflicting terminology.

Beyond the mounting cost of translation, I propose that every misunderstanding between domain experts and developers will ultimately propagate into our software as a bug.

Every Misunderstanding is a Bug in the System

Let’s consider this by way of an example.

Our development team is working on an event management dashboard for a marketing company. Metrics are important to this company, because the success of events is measured in impressions, touches and exposure. As a result, the domain expert would like to ensure that the dashboard includes metrics that give the on-site marketing teams a real-time count of relevant information.

Sounds simple? Consider this:

Domain expert: So we’ll need to provide the marketing teams with the number of opt-ins, the number of players in the game, the number of winners in the game and the total number of times the game has been played.

Technical expert: Ok, so each MARKETING TEAM will need to see those EVENT METRICS on their DASHBOARD.

Domain expert: Yeah, and each of those numbers is a feed for each team.

It’s a common occurrence in a conversation with a domain expert to hear terms that are ambiguous, overloaded in meaning or even brand new to the domain expert. In this example, the domain expert has chosen the term “feed” to represent a number on a marketing dashboard screen. To most development teams, the term feed is quite overloaded in meaning. Could the domain expert possibly mean that each number should be an RSS or Data feed? If so, does the expert expect that these numbers will be published to the dashboard, and should also be consumable via a public service or RSS/ATOM feed? Or does the expert mean something else entirely?

The only way to know for sure is to ask. But the truth is, we often don’t. I’ve been guilty many times in the past of not asking the next series of questions. Many of us have, either because we think we understand “the business” better than we actually do, or because we only have two weeks to get our project out the door when we really needed two months.

So we make an assumption. In this case, we assume that the domain expert wants that RSS feed delivered by a fancy RESTful service when the truth is much simpler:

Technical expert: Feed?

Domain expert:  Yeah, a feed.

Technical expert: Do you mean that each number should available for anyone to see via a public URL?

Domain expert: Oh, no. I just mean that the numbers should be real-time.

Technical expert: Ah, ok. And each number will be a count for only that MARKETING TEAM and EVENT, right?

Domain expert: yes, exactly. And I’d like for those numbers to really be real-time. My MARKETING TEAMS should trust that they are up-to-the-minute and not have to refresh the page.

Technical expert: Ok, that’s important. So you want those numbers to refresh automatically, without initiation by a  MARKETING TEAM MEMBER.

Domain expert: yes.

As it turns out, by “feed,” the domain expert meant a real-time count of a metric for an EVENT and MARKETING TEAM. By assuming anything else, we run the risk of introducing at least two bugs in the system:

  1. An over engineered solution – Overproduction, also a serious waste in Lean terminology, can be considered a bug in the sense that the system yields an “unexpected result.” This is not “exceeding expectations,” it’s wasting the customer’s time and money. It’s YAGNI, plain and simple.
  2. A missed requirement – By assuming that the customer wanted a RSS feed, we likely missed the fact that what he really wanted was a real-time count of the data, and one that updated on the screen automatically. By not delivering such functionality, we’ve missed a key requirement and as such, introduced another bug into the system.

It’s common in language for us to use a term that means one thing when we really mean something else. Because we are intelligent and adaptive creatures, we can absorb these ambiguities and inaccuracies in speech without our brains boiling inside our skulls. But computers are different. A computer program is nothing more than a representation, in code, of how a computer should provide a solution to a business-driven problem domain. Computer programs will do exactly what we tell them to do, every time, with no variation. When we misunderstand anything relevant to the problem domain, and then codify that misunderstanding in how we instruct a computer to act, we are introducing bugs into the system.

Every Misunderstanding? Really? Every. Single. One?

Perhaps I’m being pithy and hyperbolic. I’m willing to admit that we might be right by accident, and avoid a bug as a result. The first time around, at least. But what happens when that feature is revisited or expanded upon later? Or what about when the domain expert requests some additional functionality that, had the team properly understood the problem space, would have been a simple extension to functionality, but is now a rewrite? My statement might be pithy, but I would argue that most of us find it to be experientially true.

I’ll admit that this is all speculation; even anecdotal. But it’s been my own experience in the past that even if I dodge a bullet the first time, I can be assured that there are more rounds in the chamber.

The Bottom Line: Misunderstanding, Like Translation, Has a Cost

As if the cost of translation weren’t enough, misunderstandings between domain experts and development teams results in the added cost of bugs in the system. A Ubiquitous Language, while no guarantor of success, places the right emphasis on eliminating translation and cementing understanding, both of which will drive down cost over time.

Next time, I’ll talk about accuracy and relevance, and how the importance of each in problem and solution spaces underscores the need for a Ubiquitous Language even further.

Tags: , , ,

architecture | ddd | ubiquitous language

Ubiquitous Language – Communication Vs. Jargon

by bsatrom February 09, 2010 15:55

Words have meaning. Language is important.

These statements are true, and we tend to pay them their proper lip service in both life and in the realm of software development. Sometimes, we even recognize the importance of language in software, and we seek to canonize our internal vernacular through the creation of lexicons, data dictionaries, service catalogs, SLAs, OLAs or wikis.

More often than not, though, these artifacts serve more as historical proof of our best intentions than as living documents that anchor a software development effort. The canon of our language, at least as represented on paper, falls out of phase with the realities of our software and, as a result, collects dust, only warranting mention when someone on the team recalls how useful such a resource might have been to resolve their current struggles with ambiguous and conflicting knowledge.

We know that language is important in software, or we’d never spend the time early on in our efforts to tame it. But do we know how important it is? Do we believe that success in codifying a language is key to success in the creation of a software-intensive system?

Communication

Let’s consider the difference between Communication and Jargon. Communication is the art of using language to convey meaning consistently and clearly. The goal of communication is shared understanding through unambiguous meaning. Consider the following:

Domain expert: When a check payment is sent in, we need verify that the check is legit and then send it to the bank for processing.

Technical expert: What makes it legit?

Domain expert: Valid routing number. Valid account number scheme. And it has to have a signature.

Technical expert: Ok, so we check to make sure those things exist. Then we send to the bank.

Domain expert: Yeah, though I think they only process once per day. So can we hold onto these and only send them once a day?

Technical expert: Sure. We’ll collect these in a batch and fire them off at a set time each day. When do they process?

In the conversation above, the domain expert is attempting to explain a set of needs in their area of concern, the problem space. The technical expert is attempting to understand those needs--the nouns and verbs that “make up” how the domain expert delivers value to the business and their customers—and frame them into how technology will be brought to bear to better enable the domain expert, or the solution space.

Because shared understanding and clarity is a prerequisite to working software, communication is key to the success of any software-intensive system. Clear communication speeds up the creation of working software.

Jargon

Jargon, on the other hand, slows it down.image

Jargon, a style of communication, is the practice of using certain words and phrases in a way that assumes known context, and thus, can serve as a shortcut in communication. When both parties have a shared understanding of the terminology in play, jargon serves as a valuable shortcut for individuals short on time (read: everyone). The propensity of technologists for three-letter acronyms (TLAs) illustrates our tendency towards and the value of jargon. When it works, it works well.

The problem is, when it doesn’t work, it fails miserably. It necessitates translation, clarification and it slows down the whole process of communication. Here’s an example:

Domain Expert: We need to make sure that our support staff can change the rules that we use to create policies for customers.

Architect: ok, so we’ll use a Strategy pattern and make that config-driven…

Developer: we could just use IoC, build strategies for each implementation and let the users swap out implementations whenever they need to change them.

Architect: That’s an option too. We’ll figure it out offline.

Domain Expert: (confused) So will the support staff be able to change those?

Architect: Sure, they’ll change config and it will just work.

Developer: Or swap out an implementation for the container in config.

Expert: What’s IoC?

Architect: well…

When technical experts and domain experts come together to solve a business problem, each brings a certain amount of jargon from their vernacular. Each party is used to spending much of their time with other individuals who understand that jargon. But between domain and technical experts, there is often little overlap between the jargon of the business and the jargon of technology. As a result, when one party leans too heavily on the jargon of their concern, communication stalls.

To keep communication clear, we need a language that assigns meaning to the terminology we use in our contexts.

Ubiquitous Language – The Jargon Killer?

In Domain-Driven Design, Eric Evans advocates for the establishment of a Ubiquitous Language on any complex software project. According to Evans, a Ubiquitous Language is, “A language structured around the domain model and used by all team members to connect all the activities of the team with the software.” (DDD Community emphasis mine)

The purpose of that language is to provide clarity and consistency all the way down to the code. The language is continuously exercised, defined and refined through speech, documentation and, most importantly, code. Accuracy in speech is emphasized, because the words we use when sitting around the requirements table will be the same words that manifest the problem space in code.

So then how do we cope with jargon in our problem and solution spaces? Do we eliminate all jargon and force both parties to come up with new, creative ways to explain themselves and what they know?

Actually, no. I would argue that while some jargon should be jettisoned--especially that jargon that tends to be used as verbal filler (think empty business phraseology like “open the kimono” or “at the end of the day.”)—some should be embraced and formalized into our language.

The fact is that some jargon, technical and business, has the potential to be quite valuable and, once consistently established in the minds of both domain and technology experts, can continue to be a powerful shortcut while remaining clear and consistent.

For example, take Multimedia Messaging Service (MMS) and Short Message Service (SMS) in the context of a project with a mobile-marketing company. Both terms are technical in nature and filled with jargon, yet both domain and technical experts have some level of mainstream understanding of these terms, thanks to the popularity of mobile messaging. Ambiguities exist--many business experts might think, due to carrier branding, that MMS supports picture messages only, as opposed to other forms of multimedia like audio and video—but an overlap in understanding makes these terms perfect candidates for language adoption. Once formal meaning (in the context of the business domain) is brought to these terms, they can be used clearly, and provide the benefit of communicating additional details (acceptable message length, transport technologies, media types supported, etc.) to all parties.

Choosing which pieces of jargon are relevant, which are not, and then formalizing terminology is one of the many aspects of creating and growing a Ubiquitous Language.

The key is finding the valuable jargon, and then turning it into true communication.

Tags: , , ,

ddd | architecture | ubiquitous language

Keeping Architectures Relevant - ITARC Austin Presentation on Domain-Driven Design (DDD) and Emergent Architecture

by bsatrom February 08, 2010 00:53

Note: Cross-posed from Paul Rayner’s Blog.

Last week, I had the opportunity to co-present with IASA Denver chapter president Paul Rayner, at the IASA Austin ITARC Conference. Our presentation was titled “Keeping Architectures Relevant: Using Domain-Driven Design and Emergent Architecture” and is meant to be a helpful introduction to key ideas around DDD, Agile and Architecture, with an emphasis on how an architect can use principles and practices from each of these to keep themselves and their work relevant.

Our presentation was meant to be a brief overview and introduction to the ideas we’ll be covering in our upcoming article (by a similar name) in the Architecture Journal. See my last post for more information about that article. Watch for a link here in mid-March when the article is released.

As Paul states in his post, we really enjoyed presenting and got some great questions during and feedback after the session. We’re planning to give this presentation again soon, so if you were there and you have any additional feedback to offer, we’d love to hear it. We’ll be cross-posting additional content related to the paper and this presentation over the coming weeks, so keep an eye peeled here and Paul’s blog.

Tags: , , , , ,

architecture | agile | iasa

Upcoming Article in The Architecture Journal

by bsatrom January 12, 2010 02:42

Paul Rayner and I recently submitted (and had accepted) a proposal for an article in an upcoming issue of The Architecture Journal. The issue, #23, will center around Architecture Modeling and the tools, tactics and strategies an architect can leverage in modeling his or her architectures.

We’re knee-deep in drafting the paper right now, and it won’t come out until mid-March, but I did want to share the abstract we submitted so you can see what we’re scheming. We’d love to hear and thoughts, ideas or suggestions you might have. 

“Keeping Architectures Relevant: Using Domain-Driven Design and Emergent Architecture to Manage Complexity and Enable Change”

Abstract

Too many systems seem to become legacy upon release, while some never even have a chance to move into production before they are undermined by the calcification of unmet expectations and mismatched domain needs. Regardless of the design effort early in the lifecycle, neglecting the domain model and producing inflexible design results in the increasing irrelevance of the initial architecture of a system. The accidental complexity of that system rises and communication between developers and customers deteriorates. Changes and new features become more difficult to accommodate as the richness and value of the system's essential complexity is eroded. Sustainable and successful software development is all about managing complexity and enabling change, and successful architects create designs that clearly address both.

Architects, domain experts and developers collaborate to mitigate complexity through strategic modeling and design. This requires a focus on the core domain and the continuous application of germane design patterns. Ongoing effort should be expended on defining and refining the domain model through the establishment and exercise of a language that everyone shares. The development of this ubiquitous language, along with the use of domain-driven design techniques, enables business problems and their solutions to be expressed through rich domain models that are both meaningful to business experts and executable by the development team.

Keeping our architectures relevant also means enabling change. As architecture is allowed to emerge, evolve, and mature, it becomes a true reflection of the deep understanding of both domain experts and developers. Architects who expect their initial design to evolve, and who design with evolution in mind, create architectures that deliver a strong competitive advantage to the business.

Reader Takeaways

1) The establishment of a ubiquitous language, which removes the built-in translation layer between domain experts and the development team, is key to relevant modeling.

2) Domain-driven design enables the articulation of a distilled architecture through models that mitigates complexity while remaining relevant to the business and clear to the development team.

3) Architects must collaboratively drive architectures which emerge, evolve and mature in order to deliver systems that improve in their ability to respond to the changing needs of the business.

Tags: , , ,

agile | architecture | ddd | writing

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant

About me

I am a Developer Evangelist for Microsoft, President of IASA Austin, and a software developer interested in agile, architecture, craftsmanship, ddd and a variety of other topics. Join me as I explore them here.