If you ask just about any British person, they'll be able to tell you about Jaffa Cakes.

For those who aren't British, Jaffa Cakes are a sweet snack comprised of a thin layer of cake, an orange flavoured jelly on top, and coated in a crisp chocolate layer. They are the size and shape of a standard British biscuit and are sold in packs that resemble biscuit packets. They are clearly a competitor to biscuits in every reasonable way, but as any Brit will tell you, they are actually cakes. This is more than branding too; there was a court ruling that declared them to be cakes.

A lot of people don't pay much attention to the story beyond this point. Some British people find glee in the apparent absurdity where a court of law ruled on the nature of a cheap snack. Most are just tired of hearing the story. It's often told with the sort of British whimsy that is easy to get sick of. For the average person, the formal designation of a Jaffa Cake is irrelevant, maybe a fun little footnote in the story of unimportant things to know.

However there's a reason why I bring this up, which is that the Jaffa Cake story is a really good demonstration of the role in which language plays in rule based systems.

-

Indulge me for a moment. I'm sure that there are many people in the world who made the transition from tax consulting to technology. I know many of them. Yet, it's still niche enough that I take a particular glee whenever I can bridge between the two worlds. Around 15 years ago I worked as a tax consultant, in fields that ranged from US income tax for expatriates, transfer pricing to indirect taxes. The Jaffa Cake story falls into that last category, and although I did not work on that case in particular, it's actually not particularly unique or special (sorry to fans of British whimsy).

In the UK there is a value added tax (VAT), similar to a sales tax, which is charged at three different rates: standard, reduced and zero. Essential products are zero rated (they have a 0% VAT charge), some products are reduced rated (5%), and everything else is standard (20%). However, what constitutes an "essential" product? What should be reduced? These decisions are made by politicians. Books are considered essential, for example, presumably because politicians like books and want to encourage reading.

However, "books" is actually quite a broad concept. There are fiction books, and non-fiction ones. There are activity books. Some books have no words in them at all, like colouring books. Are they all "essential"? Well, if they're children's colouring books, they remain zero rated - we don't want to take away fun from little children, after all. Adult colouring books, on the other hand, are standard rated at 20%. This distinction presents a problem in the eyes of the law: how do we define the difference between an adult colouring book and a childrens one?

The Jaffa Cake story is an argument over VAT as well. Cakes are considered essential and are zero rated. So too are biscuits, provided that they're "plain". On the other hand, biscuits with chocolate on them are not considered essential and have a 20% VAT applied. Jaffa Cakes have chocolate, so if they were considered a biscuit in the eyes of the law (after all, they're presented as such), they'd have to pay this tax. There was an incentive for the manufacturer to define their product as a cake, not for the sake of whimsy but rather for a tax exemption.

This ended up in court because most of these indirect tax cases do. There are a nearly infinite number of potential goods and services that can be traded, but the laws written are rarely that specific. It would be impossible to cover every eventuality in a tax code, no matter how big the UK tax code is (and I assure you, it's very big). I sometimes use the example of a table - how do we define the concept of a "table"? Often people will discuss materials, or say that it's a flat surface on legs. I point out the tables on the back of airplane seats, which have no legs, and we arrive back at square one. Colloquially, we understand what a table is. In raw definition, however, there's not always a clear agreement.

This same issue exists in IT systems. IT systems are designed by humans who communicate their thoughts and ambitions in very human ways. If you speak to someone who isn't an IT professional and they tell your their idea for an app or other software product, their description is always full of ambiguity, insinuation and other non-specific language. This is fine for an elevator pitch, but when we begin the systems design process defining these terms in specific, measurable ways becomes essential to the success of that system.

This is the true skill of the business analyst, systems analyst and architect roles, among many others. Unfortunately, even among these skilled professions gaps can appear, due to inherent biases and blind spots. When defining functional requirements for a system, whereever an ambiguity exists will be where defects occur. Where a developer is left to make an assumption about a task or feature, that assumption is likely to be wrong and is potentially the root of any number of issues, from functional bugs, to scalability issues, to maintenance problems and more.

I'm reminded of the "Civic musical road" built by Honda for an advertisement in California. The road has grooves engineered into it so that, when a car drives over it at 55mph, the vibrations caused by the grooves make a sound that resembles the William Tell Overture. Except, it doesn't; the music is out of tune. This was a requirements issue - the gap between the grooves should be measured from the centre-to-centre of each consecutive groove. When it was installed, however, engineers placed them at the distance as measured edge-to-edge, producing a different vibration and therefore the wrong sound. And, to make matters worse, the road was rebuilt a distance away following complaints by the locals about the noise. The engineers for the new version made the exact same assumption as the first set, and therefore the new road features the exact same bug. Yeesh.

-

In tax, courts are often left to make judgements on what rating a good or service should receive. In the Jaffa Cake world, a test was developed that identified a clear physical difference based on the state produced after the item went stale - biscuits go soft, cakes go hard. I'm oversimplifying for effect, but broadly the argument held and Jaffa Cakes continue to enjoy a zero rating for VAT. This process keeps the legal and tax system in order. Established case law guides future claims and the court system processes new ones all the time. In software, we do not have the same luxury. Instead we need to rely on vigilance, skilled professionals, documentation, and above all a good sense of humour. Language is important and specific, descriptive and measurable language is key to high quality outcomes.