This is a little musing on something I observed in a supermarket the other day. Over here (in the Netherlands) more and more shop payments are handled online. The employee scans the shopping, the counter sums up the amount due and the customer sweeps a card to authorize a payment from her account to the shop’s account. Behind the scenes there is a quite interesting domain with loads and loads of fodder for stories on software design. For the public quite handy and also the older generations, having used cash their entire life, are using it en masse.
The other day there was an old lady next in my counter line. Proudly she was waving her card, feeling all part of modernity. Until the employee told her “The transaction cannot be started until the first article is scanned”. To me this was a very informative piece of domain specific ubiquitous language. But the old lady felt like an alien living in a world she no longer understood and started looking for her purse.
At first it only made me realize that an ubiquitous language may be quite informative and precise for people working inside the domain but that that same jargon and strictness scares a lot of (potential) users of the domain being discussed.
Later on I realized that the employee had made an even bigger mistake. The customer herself is not a part of the domain at all. The shopping’s are a part and her card is a part. But by addressing the customer herself the assumption is made that the shopping’s and the payment are associated with one and the same person. The shop doesn’t care as long as somebody pays. The shopping’s don’t care as long they leave the shop. Who needs a customer ?
The domain does need a customer to use it. But don’t hassle her with language never intended to leak out of the domain.
My 2 e-Cents
<Post scriptum>
The comments on this make it clear there are two ways you can view the situation. Each with different implications. What the real problem was depends on the position of the lady in the story.
1. She is not a part of the domain, only an actor providing some input. Like passing in some shopping and passing in a payment. This actor (or these actors, in case somebody else is going to pay) needs some instructions. In a language which she understands. But even when the terms in the language, like transaction, article and scan are replaced with words of her choice it would be only confusing to her to expose the rules of the domain to her. It would be far better to just tell her “Please wait swiping your card until I tell you to do so”. But that doesn’t really map on the UL spoken inside the domain.
In this scenario there is just no UL which is understood by everybody. It’s just the shop employee uttering impropriate language.
2. The lady is part of the domain. In this case the interface between shopper and counter is not that good. As it exposes behavior which cannot be granted to be understood. Or at least should be expressed in a better language.
In both views the language is the problem. Speak in a language clearly understood by the receiver. Or just keep quiet.
</Post scriptum>