The architect's clue bucket
Ruth Malan
Image source: wikipedia
#OReillySACon
We are what we think.
All that we are arises with our thoughts.
With our thoughts we make the world.
– The Dhammapada
@RuthMalan
#OReillySACon
I think about architecture
and what architects do
The architect has structural
oversight
And makes tradeoffs
because… there’s only
so much rope
and why
conveys behavior
Structure
to delight users
at scale
across
contexts
and more why
when there’s tight coupling
and bad code smells…
… the architect must
address The Kludge
and why (again)
Because mounting technical
debt, ties the system to the past
… by its shoelaces
and how
Draw on the walls!
and more how
iterate
and experiment
to achieve fit to context and to purpose
Actually, a lot about how
I’m not kidding!
DELIBERATE
REASON
DISCUSS
DECIDE
RECONSIDER
DELIBERATION, n. The act of examining one's bread to determine
which side it is buttered on.
REASON, v.t. To weight probabilities in the scales of desire.
DISCUSSION, n. A method of confirming others in their errors.
DECIDE, v.i. To succumb to the preponderance of one set of
influences over another set.
RECONSIDER, v. To seek a justification for a decision already made.
— Ambrose Bierce, The Devil's Dictionary
Well, now I am
But not about drawing on the walls!
@RuthMalan
#OReillySACon
Where We’re Headed:
• some clues: design
principles, heuristics, tips,
… and hints
• organizing clues: mapping
the clue landscape
• getting clues: where and how
to look
@RuthMalan
#OReillySACon
“Architects must have
self-repairing egos”
— Dana Bredemeyer
@RuthMalan
#OReillySACon
The architect’s SCARS:
• Separation of Concerns
• crisp and resilient
Abstractions
• balanced distribution of
Responsibilities
• strive to Simplify — Grady Booch
@RuthMalan
#OReillySACon
Separation of Concerns
“I go along with the natural
makeup”…
“when I come to the tricky parts, I
slow down” — Chuang Tzu:
“The Dexterous Butcher”
Layers
presentation
business logic
data access
1996
SCARS: Separation of Concerns
application
domain
Source: geekandpoke.typepad.com/geekandpoke/2011/03/architectural-best-practices.html
(in 2011)
Layers
presentation
business logic
data access
1996
SCARS: Separation of Concerns
application
domain
— Ambrose Bierce, Devil’s Dictionary
ABATIS, n. [1.] Rubbish in front of a
fort, to prevent the rubbish outside
from molesting the rubbish inside.
Image: Engineering and the Mind’s Eye
— Ambrose Bierce, Devil’s Dictionary
ABATIS, n. [1.] Rubbish in front of a
fort, to prevent the rubbish outside
from molesting the rubbish inside.
Image: Engineering and the Mind’s Eye
“Design things to make their
performance as insensitive to the
unknown or uncontrollable external
influence as practical.” — Eb
Rechtin
Image: alistair.cockburn.us/Hexagonal+architecture
SCARS: Separation of Concerns
Hexagonal Architecture
Ports and
adapters
Microservices!
(in 2016)
Image: martinfowler.com/articles/microservices.html
Image: martinfowler.com/bliki/BoundedContext.html
Bounded Contexts in DDD
SCARS: Separation of Concerns
“There was a wall. It did not look important. It was
built of uncut rocks roughly mortared. An adult
could look right over it, and even a child could climb
it. Where it crossed the roadway, instead of having
a gate it degenerated into mere geometry, a line,
an idea of boundary. But the idea was real. It was
important. For seven generations there had been
nothing in the world more important than that wall.
Like all walls it was ambiguous, two-faced. What
was inside it and what was outside it depended
upon which side of it you were on.”
— Ursula K. Le Guin, The Dispossessed
Image: welshwaller.files.wordpress.com/2013/01/llwest-and-elan-valley-017.jpg
Boundaries: Conway’s Law
“Any organization that designs a
system (defined broadly) will
produce a design whose structure
is a copy of the organization's
communication structure.”
—Melvyn Conway (in 1968!)
SCARS: Separation of Concerns
As programmers we deal with
abstractions all the time and
we have to invent them in
order to solve our problems
— Michael Feathers
SCARS: crisp and resilient Abstractions
SCARS: crisp and resilient Abstractions
“The purpose of abstraction is not to be
vague, but to create a new semantic
level in which one can be absolutely
precise.”
— Dijkstra
SCARS: crisp and resilient Abstractions
Crisp Abstractions
Single Responsibility at the level of
abstraction of the abstraction
SCARS: crisp and resilient Abstractions
SCARS: crisp and resilient Abstractions
Crisp and Resilient Abstractions
“We propose instead that one begins with a
list of difficult design decisions or design
decisions which are likely to change. Each
module is then designed to hide such a
decision from the others.” — David Parnas
SCARS: crisp and resilient Abstractions
Resilient Abstractions
Resilient under change
SRP: each software module should have one and
only one reason to change (Uncle Bob Martin)
Retrospective (Feathers)
Prospective (thought experiments)
SCARS: crisp and resilient Abstractions
@RuthMalan
#OReillySACon
SCARS: balanced distribution of Responsibilities
No “god” component(s)
@RuthMalan
#OReillySACon
SCARS: strive to Simplify
“Simplify, simplify” — H. D. Thoreau
‘One “simplify” would have sufficed’ —
Ralph Waldo Emerson, in response
“Simplify, simplify, Simplify”
“Communicate, Communicate,
Communicate”
— Eberhardt Rechtin
SCARS: strive to Simplify
“Do the simplest thing that could possibly
work”
Occam’s Razor: the simplest solution is
usually the correct one
YAGNI
SCARS: strive to Simplify
Chad Fowler: “The older I get, the more I realize
the biggest problem to solve in
tech is to get people to stop
making things harder than they
have to be.”
Michael Feathers: “It's not that easy.”
SCARS: strive to Simplify
SCARS: strive to Simplify
focusing is saying “no”— Steve Jobs
GoogleX
SCARS: strive to Simplify
“old code doesn’t die; you have to kill
it”
— Grady Booch
SCARS: strive to Simplify
How to kill code
StranglerApplication: “An alternative route is
to gradually create a new system around the
edges of the old, letting it grow slowly over
several years until the old system is
strangled.”
— Martin Fowler
SCARS: strive to Simplify
“disorder is easier and more
permanent than order, which is difficult
and temporary”
— Jeremy Campbell
SCARS: strive to Simplify
“One bad programmer can easily
create two new jobs a year.”
— David Parnas
SCARS: strive to Simplify
@RuthMalan
#OReillySACon
The architect’s SCARS:
• Separation of Concerns
• crisp and resilient
Abstractions
• balanced distribution of
Responsibilities
• strive to Simplify — Grady Booch
@RuthMalan
#OReillySACon
Essence of systems is:
• Relationships
• Interfaces
• Form
• Fit
• Function
— Eberhardt Rechtin
@RuthMalan
#OReillySACon
Essence of systems is:
• Relationships
• Interfaces
• Form
• Fit
• Function
— Eberhardt Rechtin
“Relationships among the elements are what
give systems their added value”
“Don’t partition by slicing through regions
where high rates of information exchange
are required””
@RuthMalan
#OReillySACon
Essence of architecture is:
• Structuring
• Simplification
• Compromise
• Balance
— Eberhardt Rechtin
“dependencies are a
tradeoff between the
cost of maintaining the
code yourself (and
implementing it) & the
cost of the risk of
breakage”
— Kent Beck
Balance: Tradeoffs/Compromise
Kent Beck’s 4 Rules of Simple Design
• passes its tests
• minimises
duplication
• reveals its intent
• has fewer
classes/modules/
packages…
More Clues
Systemantics by John Gall
• New systems mean new problems
• A complex system that works is invariably
found to have evolved from a simple system
that worked
• a complex system designed from scratch
never works and cannot be made to work
• Systems develop goals the minute they come
into being
“Uncle Bob” Martin’s SOLID
• Single Responsibility Principle
(SRP)
• Open/Closed Principle (OCP)
• Liskov Substitution Principle
(LSP)
• Interface Segregation
Principle (ISP)
• Dependency Inversion
Principle (DIP)
More Clues
97 Things
101 Things
“Architecture is the thoughtful making of space."
-LOUIS KAHN”
“Science works with chunks and bits and
pieces of things with the continuity
presumed, and [the artist] works only with the
continuities of things with the chunks and bits
and pieces presumed."
-ROBERT PIRSIG, ZEN AND THE ART OF
MOTORCYCLE MAINTENANCE”
“Just because an interesting idea occurs to
you doesn't mean it belongs in the building
you are designing. Subject every idea,
brainstorm, random musing, and helpful
suggestion to careful, critical consideration.”
― Matthew Frederick
“If you’re waiting on me to come to a conclusion where I give you
a score from one through ten on the NDUF to BDUF scale (and it’s
obviously five, right?), you’re going to be disappointed with this
post. How much design should you do up front? Dude, I have no
idea. Are you building a lunar rover? Probably a lot, then,
because the Sea of Tranquility is a pretty unresponsive product
owner. Are you cobbling together a minimum viable product and
your hardware and business requirements may pivot at any
moment? Well, probably not much. I can’t settle your design
decisions and timing for you with acronyms or aphorisms.”
Erik Dietrich, Designs Don’t Emerge
http://www.daedtech.com/designs-dont-emerge/
Is this the part where we get to talk
about Technical Wisdom?!
Wisdom factors
And factors and refactors
@RuthMalan
#OReillySACon
Next:
• some clues: design
principles, heuristics, tips,
… and hints
• organizing clues: mapping
the clue landscape
• getting clues: where and how
to look
Maps: location, location,
location
Maps as
places to put things
Context System-in-Context
(use, dev, ops)
System
(Ecosystem)
Architecture
structure and
mechanisms
“Requirements”
design of system
capabilities
Strategy
ecosystem interventions
"Always design a thing by considering it in its next larger context" -- Eliel Saarinen
What
ARCHITECTURE
STRUCTURE
Software architecture refers to the
high level structures of a software
system, [..] It is the set of structures
needed to reason about the
software system. Each structure
comprises software elements,
relations among them, and
properties of both elements and
relations.
—wikipedia/Clements et al
“Good design doesn’t ’emerge’
like a welcome ray of sunshine
on a cloudy day.
—Erik Dietrich
Erik Dietrich, Designs Don’t Emerge
http://www.daedtech.com/designs-dont-emerge/
“It comes coughing, sputtering,
screaming and grunting from
the mud, like a drowning man
being pulled from quicksand,
and the effort of dragging it
laboriously out leaves you
exhausted.”
Erik Dietrich, Designs Don’t Emerge
http://www.daedtech.com/designs-dont-emerge/
Art by Amanda Muledy (@EEKitsabug)
Posit structure
Explore behavior
Revise structure
Explore — with sketches
Factor and Refactor
Posit responsibilities
Refine as explore behavior
and different views
Patterns
Metaphors
Experience
Existing stuff
“The responsibility of architecture is the
architecture of responsibility.”
-- Jan van Til
What
ARCHITECTURE
STRUCTURE
interfaces
elements and
relationships
How
BEHAVIOR
What
ARCHITECTURE
STRUCTURE
Logical
Conceptual
Execution
What
(system view)
HowWhat
(user view)
SYSTEM ARCHITECTURE
STRUCTURALBEHAVIORAL
CAPABILITIESCONTEXT
Why
v v
How well
FUNCTIONAL PROPERTIES
What
(system view)
HowWhat
(user view)
SYSTEM ARCHITECTURE
STRUCTURALBEHAVIORAL
CAPABILITIESCONTEXT
Why
v v
How well
FUNCTIONAL PROPERTIES
architecturally significant mechanisms
Architecturally Significant?
Architecturally significant?
The demands (forces, properties, …)
on the system that are challenging,
push the limits, require design
attention
Source: Martin Fowler
http://martinfowler.com/articles/lmax.html
LMAX Disruptor Mechanism
Challenges:
A trading platform
needs very low latency -
trades have to be
processed quickly
because the market is
moving rapidly.
A retail platform adds
complexity because it
has to do this for lots of
people.
Context System-in-Context
(use, dev, ops)
System
(Ecosystem)
Architecture
structure and
mechanisms
“Requirements”
design of system
capabilities
Strategy
ecosystem interventions
@RuthMalan
#OReillySACon
the elephant in the room
Messy!
right system built right
Messier!
System Design Intent
(what should be)
System Design Reflection
(what is)
Ask
“What does the code need?”
“What does the system need?”
“What does the ecosystem need?”
What
(system view)
HowWhat
(user view)
SYSTEM ARCHITECTURE
STRUCTURALBEHAVIORAL
CAPABILITIESCONTEXT
Why
v v
How well
FUNCTIONAL PROPERTIES
good?right?successful?
What does it take to be successful?
Tell you a story… it was Alan
Kay’s idea!
“the Constitution itself is a set
of principles for building a
very complex dynamic
structure that should last for
centuries”
– Alan Kay
The
Virginia
Plan
Image: ourdocuments.gov
The Constitution
of the
United States
“I confess that there are several parts of this
constitution which I do not at present
approve, but I am not sure I shall never
approve them: For having lived long, I have
experienced many instances of being
obliged by better information, or fuller
consideration, to change opinions even on
important subjects, which I once thought
right, but found to be otherwise. It is
therefore that the older I grow, the more
apt I am to doubt my own judgment, and to
pay more respect to the judgment of
others.”
— Benjamin Franklin
“The Federalist Papers are
arguments that support
different parts of the design
of the Constitution. And the
Constitution itself is a set of
principles for building a very
complex dynamic structure
that should last for centuries”
– Alan Kay
“it seems to have been reserved to the
people of this country, [..], to decide the
important question, whether societies of
men are really capable or not, of
establishing good government from
reflection and choice, or whether they
are forever destined to depend, for their
political constitutions, on accident and
force.”
Federalist No.1
The Federalist Papers,
No. 51 addresses
• checks and balances
• separation of powers
Areas like
• creativity and imagination
• empathy, listening and observation
• problem framing and solving
• perception and bias
• experimentation
Personal Effectiveness
Areas like
• Leadership
• Collaboration
• Communication and influence
• getting things done in organizations
• Coach/consultant
Organizational Effectiveness
“All problems are people
problems” — Jerry
Weinberg
Areas like
• Situational awareness
• context mapping
• Differentiation and value definition
• Direction setting
Strategic Effectiveness
@RuthMalan
#OReillySACon
Next:
• some clues: design
principles, heuristics, tips,
… and hints
• organizing clues: mapping
the clue landscape
• getting clues: where and how
to look
Getting Clues: Steal
“Experience keeps a dear school,
but fools will learn in no other.”
Benjamin Franklin
Steal: Stand on Shoulders
Shoulders to Stand On
Getting Clues: Steal
Shoulders to Stand On
Getting Clues: Steal
Shoulders to Stand On
Getting Clues: Steal
Getting Clues: Steal
Standing on Shoulders: by Analogy
Getting Clues: Steal
Shoulders of Giants
@RuthMalan
#OReillySACon
More Getting Clues
• Look
• Listen
• Ask
• Imagine
• Play
• Draw
• Try
• Try again
• Show
• Show again
Getting Clues: Look
Large portion of our
brain is devoted to
visual processing
Sighted people see all
our waking hours
So we see, right?!
Getting Clues: Look
“In fact, in medical
terms, that’s our view.”
— Dan Ariely [joking]
“Are we in control of our own
decisions?” Dan Ariely
Perception
Getting Clues: Look
https://www.xkcd.com/32/
Ladder of Inference
— Argyris and subsequently Peter Senge
in Fifth Discipline
Getting Clues: Look
Pyramid of Belief
Getting Clues: Look
Liminal thinking The pyramid of belief — Dave Gray
and self-sealing logic
Selection
Getting Clues: Look
What we are paying attention to,
shapes what we perceive and pay
attention to.
Observe: Boyd’s OODA
Getting Clues: Look/Observe
Observe Orient Decide Act
Observe Orient Decide Act
“All architecture is design but not
all design is architecture.
Architecture represents the
significant design decisions that
shape a system, where significant
is measured by cost of change.”
— Grady Booch, blog post,
March 2, 2006
Observe Orient Decide Act
Getting Clues: Look/Observe
Title: short noun phrase
Context: describes the forces at play;
probably in tension, and should be called
out as such
Decision: describes our response to these
forces
Status: proposed, accepted, deprecated or
superseded
Consequences: describes the resulting
context, after applying the decision
— Michael Nygard, Documenting
Architecture Decisions, Nov 2011
Getting Clues: Look/Change PoV
“A change of
perspective is worth
80 IQ points”
— Alan Kay
Getting Clues: Look/Change PoV
Move to different PoV/vantage point
• view system through different “lenses” — models (incl. instrumented
code), perspectives
Also, a matter of discipline
• self-discipline, and
• discipline of engineering: probe, model, reason, open criticism, come
up with counter arguments, come up with alternatives
Getting Clues: Look/Change PoV
“You don't understand
something until you
understand it more
than one way”
— Marvin Minsky
Image:
en.wikipedia.org/wiki/Marvin_Minsky#/media/File:Marvin_Minsky_at_OLPCb
jpg
“If you haven’t thought of
three possibilities, you
haven’t thought enough.”
— Jerry Weinberg
Rule of Three
@RuthMalan
#OReillySACon
More Getting Clues
• Listen
• Ask
• Empathize
• Imagine
• Play
• Draw
• Map
• Try
• Try again
• Show
Context Mapping
Getting Clues: Map
Image: blog.gardeviance.org/2015/02/an-introduction-to-wardley-value-chain.html
Wardley (Value Chain) Maps
Grove-styled Context Maps
Image: bluesummitstrategy.com
Getting Clues: Map
Maps of Code
Getting Clues: Map
(Hand-drawn) Maps of Code
Questions
Getting Clues: Ask
• why?
• 5 why’s
• what if? why not?
• Kipling’s 6 honest serving men
@RuthMalan
#OReillySACon
More Getting Clues
• Listen
• Ask
• Empathize
• Imagine
• Play
• Draw
• Map
• Try
• Try again
• Show
@RuthMalan
#OReillySACon
Still Getting Clues
Ruth Malan
Web: bredemeyer.com
also: ruthmalan.com
Twitter: @ruthmalan

The Architect's Clue Bucket