Slide 1

Slide 1 text

Metaphors We Code By or What we talk about when we talk about software Nat Pryce [email protected] @natpryce github.com/npryce

Slide 2

Slide 2 text

A Layered Architecture Diagram Hardware Device Drivers Operating System Application Hardware Device Drivers Operating System Application Or? Which feels right?

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

The Embodied Mind We live ➢ in the physical world ➢ in a culture

Slide 6

Slide 6 text

Example: MORE IS UP From The Guardian website, 15/05/2014: “OVO Energy raises prices 3%” “...soaring values have revived idea of selling part of property portfolio...” “...nation's top 10% owning 44% of household wealth...” “Ministry of justice figures show number of convictions fell by only 69...” “Labour's nosedive in the opinion polls…”

Slide 7

Slide 7 text

Mapping to Different Abstract Concepts Up Down etc. More Less Happy Sad Pure Corrupt Abstract Concrete People Animals Controlling Controlled

Slide 8

Slide 8 text

Types of Conceptual Metaphor One thing for another, physical for abstract Up/Down, Near/Far, Facing towards/away Large/Small Inside/Outside, Boundary, Surface Extent, Covering, … Light/Heavy Bright/Dark ... Ontological Orientation Size Containment Surface Weight Shade ...

Slide 9

Slide 9 text

Entailment and Coherence Read: “Following the report, shares in XYZ Plc took a nosedive and were in freefall by close of trading.” Think: “I should bail out of my investment in XYZ Plc. before the stock hits rock bottom.”

Slide 10

Slide 10 text

Another Example: ARGUMENT IS WAR From The Guardian website, 17/05/2014: “Sussex police under fire for 'criminalising' fracking protests” “Nigel Farage has attempted to defend his controversial remarks...” “Michael Gove ordered to seal truce as Clegg hits back...”

Slide 11

Slide 11 text

Example: AN ARGUMENT IS A BUILDING “Alice's argument is supported by recent research.” “The foundations of Bob’s argument are rather shaky.” “Carol has put together a convincing case.”

Slide 12

Slide 12 text

ARGUMENT IS WAR AN ARGUMENT IS A BUILDING “To demolish my opponent’s argument I should undermine it by attacking its weak foundations.” Coherence Of Argument Metaphors

Slide 13

Slide 13 text

Conceptual / Conventional Metaphor Concrete Concepts Abstract Concepts

Slide 14

Slide 14 text

Figurative / Unconventional Metaphor Conventional Concrete Concepts Abstract Concepts Unconventional Concrete Concepts

Slide 15

Slide 15 text

Figurative / Unconventional Metaphor Metaphors We Live By, Lakoff and Johnson, 1980. “...in getting us to try to understand how it could be true, it makes possible a new understanding…”

Slide 16

Slide 16 text

The Desktop User Interface Metaphor Apple Lisa

Slide 17

Slide 17 text

Metaphor Stretched Ad Absurdum Microsoft Bob

Slide 18

Slide 18 text

Figurative Metaphor Has A Sell By Date iOS 6 iOS 7

Slide 19

Slide 19 text

Idioms: Metaphors that have Kicked the Bucket Figurative metaphors can become common phrases in language When we forget the original meaning of the phrase, it loses its explanatory power. The phrase fossilises as an idiom

Slide 20

Slide 20 text

Technical Idioms Library Patch Log

Slide 21

Slide 21 text

Whatever happened to XP’s System Metaphor?

Slide 22

Slide 22 text

Metaphors We Code By

Slide 23

Slide 23 text

Vertical Orientation of Layers Hardware Device Drivers Operating System Application Hardware Device Drivers Operating System Application Or? Which feels right?

Slide 24

Slide 24 text

Vertical Orientation in UML Or? Shape Circle Rectangle Shape Circle Rectangle Which feels right?

Slide 25

Slide 25 text

Vertical Orientation ABSTRACT IS UP CONTROL IS UP PEOPLE IS UP HARDWARE IS DOWN (STATIC) DEPENDENCIES POINT DOWNWARDS ...

Slide 26

Slide 26 text

Containment PROGRAMMING LANGUAGES ARE CONTAINERS CONTROL AT THE CENTER VULNERABLE IN THE CENTER “The system is in Java” Encapsulation Hexagonal Architecture Privilege ring levels ...

Slide 27

Slide 27 text

User-facing features Front-end developer Database back-end Externally facing services ... Orientation: Facing Towards Something THE SYSTEM FACES THE USER THE SYSTEM FACES OTHER SYSTEMS

Slide 28

Slide 28 text

Size Big Data “Big Iron” (mainframes) Software design diagrams could make better use of BIG IS IMPORTANT BIG IS IMPORTANT BIG IS POWERFUL

Slide 29

Slide 29 text

Metaphor for the Jobbing Software Designer?

Slide 30

Slide 30 text

Metaphorical Blinkers Image CC-BY-SA 2.0 Pete Markham Metaphors We Live By, Lakoff and Johnson, 1980. “In allowing us to focus on one aspect of a concept, a metaphorical concept can keep us from focusing on other aspects of the concept that are inconsistent with the metaphor.”

Slide 31

Slide 31 text

Undesired Entailment

Slide 32

Slide 32 text

Entailment: Layering, Balance & Size Database ORM Domain Model UI Or? Which feels right? Database ORM Domain Model UI

Slide 33

Slide 33 text

E.g. Tiers vs Layers Similar in real life Different technically Often conflated Image CC-BY-NC-ND 2.0 THEMACGIRL* Mixed Metaphors

Slide 34

Slide 34 text

Sketch the design in different ways

Slide 35

Slide 35 text

Watch your language! Design collaboratively Listen for metaphor Tacit assumptions? Tacit entailment?

Slide 36

Slide 36 text

In Summary ❖ Metaphor is inescapable ❖ Metaphor can help and hinder ❖ Be conscious of how we use metaphor