Constraints & Forcing Functions
HCI CORE CONCEPT · WEEK 02
Instead of writing warning labels telling users what not to do, restrict the set of possible actions so errors become impossible.
At a glance
What: Physical, cultural, semantic, and logical cues that limit the range of possible actions on an artifact. Why: Humans encounter thousands of unfamiliar objects; constraints put knowledge into the world so users can operate devices without manuals or mistakes. See it: A captive-key lock that physically traps your key until you lock the door, or a 3-prong electrical plug that only fits one way.
“Constraints are powerful tools for allowing people to know what to do in novel situations, and for preventing errors.” — Don Norman, DOET Ch. 4
1. Definition (my own words, ≤ 3 sentences)
Constraints are deliberate design limitations built into an interface or object to prevent users from making errors before they even happen. Rather than blaming users when things go wrong, designers narrow the set of permissible actions using Physical, Cultural, Semantic, and Logical rules. When safety or data integrity is critical, designers escalate constraints into Forcing Functions (Interlocks, Lock-ins, and Lockouts) that mechanically or programmatically enforce safe execution sequences.
2. Core Architecture: Norman’s Four Classes of Constraints
┌────────────────────────────────────────────────────────────────────────┐
│ NORMAN'S 4 CLASSES OF CONSTRAINTS │
├──────────────────┬─────────────────────────────────────────────────────┤
│ 1. PHYSICAL │ Geometry, mechanics, or disabled states physically │
│ (Hard Bounds) │ block invalid movements. │
│ │ • Ex: 3-prong socket, flat push plate, SIM notch. │
├──────────────────┼─────────────────────────────────────────────────────┤
│ 2. CULTURAL │ Shared societal conventions and learned symbols. │
│ (Social Norms)│ • Ex: Driving on the right side of the road; red │
│ │ for danger/stop; universal power icon (⏻). │
├──────────────────┼─────────────────────────────────────────────────────┤
│ 3. SEMANTIC │ Common-sense knowledge of how the real world works. │
│ (Meaning) │ • Ex: Waterproof rain shoe covers must have rubber │
│ │ treads on the bottom (ground) and opening on top. │
├──────────────────┼─────────────────────────────────────────────────────┤
│ 4. LOGICAL │ Pure spatial deduction or elimination. │
│ (Deduction) │ • Ex: Putting together furniture: 1 bolt left and │
│ │ 1 hole left; plugging in Left/Right stereo plugs. │
└──────────────────┴─────────────────────────────────────────────────────┘
3. Real-World Physical & Digital Artifacts
ARTIFACT 01 · PHYSICAL CONSTRAINT
The Flat Door Push Plate vs. The Protruding Knob
A protruding door knob or bar handle affords both pulling and pushing—causing users to frequently pull a push-only door. A flat brass push plate introduces a strict physical constraint: human fingers cannot grasp a flush surface, making pulling physically impossible and narrowing the [gulf-of-execution](/notes/concepts/gulf-of-execution/) to a single valid action.
Physical Constraint in Action: By eliminating any graspable protrusion, the flat plate physically eliminates the possibility of a "pull" slip without needing a single word of instruction.
ARTIFACT 02 · LOGICAL CONSTRAINT (PROCESS OF ELIMINATION)
Audio Cable Pairing & The Process of Elimination
When connecting a stereo device with two RCA plugs (White for Left, Red for Right), how does a user know where the last plug goes? If the white cable is inserted into the left channel, a logical constraint dictates the remaining action: exactly one cable remains and exactly one open jack remains. Pure deductive elimination prevents connecting both to the same socket.
(Note on the Dual-Flush Toilet: While often grouped colloquially with logical design, pairing button surface area with flush volume is strictly an example of Proportional Natural Mapping, not a logical constraint).
Proportional Mapping (Not Constraint): Size matching magnitude is natural mapping. A true logical constraint relies on deductive elimination (e.g., 1 empty slot remaining).
4. Forcing Functions: Interlocks, Lock-Ins, and Lockouts
When an error carries severe physical or data-loss consequences, soft constraints are upgraded into Forcing Functions—situations where the actions are constrained so that failure at one stage prevents the next step from happening:
┌────────────────────────────────────────────────────────────────────────┐
│ THE 3 TYPES OF FORCING FUNCTIONS │
├──────────────────┬─────────────────────────────────────────────────────┤
│ 1. INTERLOCK │ Forces operations to take place in strict sequence. │
│ (Sequence Rule) │ • Physical: "Captive-Key" locks where you CANNOT │
│ │ pull your key out until you lock the deadbolt. │
│ │ • Software: GitHub disabling the "Delete Repo" │
│ │ button until you type the exact repo name first. │
├──────────────────┼─────────────────────────────────────────────────────┤
│ 2. LOCK-IN │ Keeps an operation active to prevent premature exit.│
│ (State Preserver)│ • Physical: Washing machine locking the door while │
│ │ the drum is full of water mid-cycle. │
│ │ • Software: Unsaved changes dialog intercepting │
│ │ Cmd+Q so you don't accidentally lose hours of work│
├──────────────────┼─────────────────────────────────────────────────────┤
│ 3. LOCKOUT │ Prevents entry into a dangerous space or state. │
│ (Hazard Barrier) │ • Physical: Guardrails along a river bank; child- │
│ │ proof medicine bottle caps. │
│ │ • Software: Disabling destructive admin toggles for │
│ │ read-only users in a production dashboard. │
└──────────────────┴─────────────────────────────────────────────────────┘
Sidebar · The Captive-Key Interlock
In many European apartment doors, shared bikes, and industrial cabinets, the key cannot be removed while the lock is open. Because the user wants their keys back before walking away, this Interlock harnesses the user’s goal to guarantee they never forget to lock the door—eliminating memory-lapse slips (slips-vs-mistakes).
5. Why it matters for software engineers
Engineers often allow users to fill out an entire form with invalid states (e.g., typing letters into a phone number field, selecting an end-date earlier than a start-date, or clicking “Submit” while required fields are empty) and then punish them with a wall of red 400 Bad Request error banners. Good software engineering applies constraints proactively (Nielsen’s Heuristic #5: Error Prevention): grey out past dates in the calendar picker, mask numeric inputs, and use Interlocks (like GitHub’s repo-name confirmation) to protect against catastrophic data loss.