Principles of Data Engineering
Contents
About
Foundations
Creating information
Presenting insights
Quality & reliability
Efficient & stable pipeline
Judgement under ambiguity
Presenting insights/Chapter 1

Affordance

Users don't read manuals.

A concept from design

Affordance is a concept from the psychology of perception, made familiar by product design. Its idea is that a well-designed object shows how it should be used.

Consider a door handle. You do not need instructions to open a door. A handle invites a pull; a flat plate invites a push. You know what to do.

Or consider a lift button. You press the arrow for the direction you want, and when the lift arrives, you press the button for your floor. This can be bewildering in buildings where lifts are centrally assigned in the lobby. There are no floor buttons inside the lift, and a first-time visitor steps in looking for a way to choose a floor.

The latter case is a reminder that affordance is contextual to the user. A regular visitor knows to choose the floor in the lobby. A newcomer has no such cue.

The opposite of affordance is a technical manual. For many products, a manual still exists and needs to exist. But its very use can be considered a failure of design.

A product with affordance is obvious to use.

Affordance in data engineering

Applied to data engineering:

A name, read together with the names around it, should be enough to prompt users what to do with the product.

Consider a column called [Valid]. Valid for what? Valid now, or valid at creation? Does false mean expired, rejected, or never approved? The name gives no direction, so the user must guess. Renamed [Is current name], the same column tells the user that it is a yes-or-no flag, and what a yes means.

Or consider [Last inspection date]. Does it mean the previous inspection or the final one? A user who reads it one way will build a report on it without ever knowing they were wrong.

A data product has many kinds of names: schema names, table names, column names, measure names, and folder names. Users never see them one at a time. They see them together, and they all need to be read together.

Often, names work with other names to create affordance. A user who consistently sees [Days to process], [Days to arrival], and [Days to approve] learns how the family works, and comes to expect a [Days to ...] measure wherever a duration matters. Like the central lift lobby, the pattern only needs to be learned once.

Does that mean that metadata descriptions and documentation are not necessary?

Not at all. But they are subordinate to names. A name should prompt the user where to look and give the general direction. The description needs to be there to explain it.

Metadata descriptions, too, are therefore organised through affordance. A description is only read when a name has led the user to it.

Affordance and expressiveness

Affordance is closely related to the principle of expressive entities, but distinct. Expressiveness means that the data carries business meaning: its tables represent the entities the business recognises, faithfully and in reusable form. Affordance means that the product tells the user, through its names, how it is meant to be used.

A model can have affordance without being expressive. A table called Statistic, with columns [Statistic type] and [Statistic value], has strong affordance. The names alone invite you to sum or aggregate the values. But they say little of what any of it means.

A model can be expressive without having affordance. This is most common in semantic models where a column name appears twice. If there is one 'Current employee'[Name], then all is well. But if there is also 'Employee'[Current name], then the model is asking for trouble.

A model that is both expressive and has affordance is useful, and obvious to use. That is the aim of every data engineer.

Affordance is the organising principle of a data product. It is also the least studied. Data engineers are trained to make data correct, and rarely to make it usable. Affordance requires standing in the user’s shoes: setting aside what the engineer knows about the pipeline, and meeting the model as the newcomer meets the lift lobby.

Affordance over ontology

A rising trend is to supplement semantic models with ontologies and knowledge graphs. The aim is to give AI agents a formal account of what things are and how they relate, so that they can reason about the data.

Ontologies have their place. But at the point of use, an ontology is becoming a new kind of manual, written for machines. It sits beside the model, describing it, rather than in the model, guiding it. An AI agent that must consult an ontology to understand a column called [Valid] is in the same position as a person reading a manual. It may find the answer, or it may guess.

If names are not clear enough to guide, users will not consult a manual, or even know which manual to consult. The outcome is inevitable. They guess.

That is why the principle is:

Instead of leaving users to guess, create affordance.

Key ideas

Affordance is the idea that a well-designed object shows how it should be used.

Affordance is contextual to the user.

The opposite of affordance is a technical manual. Its very use can be considered a failure of design.

In data engineering, a name, read together with the names around it, should be enough to prompt users what to do with the product.

Descriptions and documentation are subordinate to names. A name gives the direction; the description explains it.

A product with affordance is obvious to use. A model that is both expressive and has affordance is useful, and obvious to use.

Affordance is the organising principle of a data product, and the least studied. It requires standing in the user’s shoes.

An ontology is becoming a new kind of manual, written for machines.

Instead of leaving users to guess, create affordance.