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

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 the Chief Architect for Thought Ascent, 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.