Post on 12-Oct-2020
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 1
Old School
Techniques that still work no matter how hard we try to forget them
Old School
© Zühlke 2009
Context
“I come as an entertainer, not as a salesman. I want you to enjoy these ideas because I enjoy them”—
Alan Watts
21 July 2009
Keith Braithwaite
Slide 2
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 3
If IT were a person…
It would be diagnosed with
• ADHD • Retrograde amnesia
• OCD
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 4
If IT were a person…
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 5
If IT were a person…
It would be diagnosed with
• ADHD – We have difficulty retaining focus on the job at hand – We are very easily distracted by
• Retrograde amnesia – We don’t recall our past
• OCD
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 6
If IT were a person…
It would be diagnosed with
• ADHD – We have difficulty retaining focus on the job at hand – We are very easily distracted by
• Retrograde amnesia – We don’t recall our past – We don’t recall our past
• OCD
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 7
If IT were a person…
It would be diagnosed with
• ADHD – We have difficulty retaining focus on the job at hand – We are very easily distracted by
• Retrograde amnesia – We don’t recall our past – We don’t recall our past
• OCD – We follow rituals independent of their effectiveness
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 8
If IT were a person…
It would be diagnosed with
• ADHD – We have difficulty retaining focus on the job at hand – We are very easily distracted by
• Retrograde amnesia – We don’t recall our past – We don’t recall our past
• OCD – We follow rituals independent of their effectiveness
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 9
Tony Hoare said…
“If we could only learn the right lessons from the
successes of the past we would not need to learn from
the failures ”
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 10
Zombies w
ww
.flic
kr.c
om/p
hoto
s/ h
ryck
owia
n/35
4074
4713
/
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 11
Zombies
Given half a chance they will eat your brain
• Code the works “first time”
• Structured Programming
These, and others, we should forget
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 12
Code that works “first time”
City and Guilds COBOL
• 3 attempts to compile, run and test or fail
There was a time when this sort of thing made sense
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 13
Code that works “first time”
There was a time when this sort of thing made sense
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 14
Code that works “first time”
Jerry Weinberg tells of being told that
• The computer (singular) earns more than you do, so behave accordingly
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 15
Code that works “first time”
The computer learns more than you, behave accordingly
• cost(processor time) >> cost(developer time)
• Cycle time to get feedback—hours to days
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 16
Code that works “first time”
The computer learns more than you, behave accordingly
• cost(processor time) >> cost(developer time)
• Cycle time to get feedback—hours to days
In fact, you earn much more than the computer
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 17
Code that works “first time”
The computer learns more than you, behave accordingly
• cost(processor time) >> cost(developer time)
• Cycle time to get feedback—hours to days
You earn much more than the computer, behave accordingly
• cost(processor time) << cost(developer time)
• Cycle time to get feedback—milliseconds to minutes
• A top-end dev workstation amortised over 3 years – £1 per day – 2 or 3 orders of magnitude cheaper than a programmer
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 18
Code that works “first time” D
isag
reem
ent
Uncertainty
low
h
igh
low high
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 19
Code that works “first time” D
isag
reem
ent
Uncertainty
low
h
igh
low high
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 20
Code that works “first time” D
isag
reem
ent
Uncertainty
low
h
igh
low high
Sense
Categorize
Respond
Sense
Analyze
Respond
Sense
Analyze
Respond
Act
Sense
Respond
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 21
Structured Programming
A “sub–program” had:
• One entry point
• Sequence
• Iteration
• Alternation
• One exit point
Old School
© Zühlke 2009
Structured Programming
That was a big improvement over spaghetti code
• Especially when flow of control was DIY
10 IF (SUM .LE. LLIMIT) THEN
NUMBER = NUMBER + 1
SUM = SUM + NUMBER
GO TO 10
END IF
21 July 2009
Keith Braithwaite
Slide 22
Old School
© Zühlke 2009
Structured Programming
But this sort of thing makes no sense:
21 July 2009
Keith Braithwaite
Slide 23
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 24
Old School: things we got right
http://commons.wikimedia.org/wiki/File:Vincent_Series_C_Black_Shadow_1950.jpg
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 25
Old School: things we got right
http://www.digibarn.com/collections/screenshots/xerox-star-8010/xerox-star-8010-02.jpg
Old School
© Zühlke 2009
21 July 2009
Keith Braithwaite
Slide 26
Old School: things we got right
http://commons.wikimedia.org/wiki/File:Vincent_Series_C_Black_Shadow_1950.jpg
Analysis
Architecture
Modelling
Old School
© Zühlke 2009
15 years and Counting
I’ve been a professional programmer for about 15 years
• And an amateur for years before that
What follows are ideas that I learned very early on
• And still use day–by–day
21 July 2009
Keith Braithwaite
Slide 27
Old School
© Zühlke 2009
Analysis
There used to be this thing called Systems Analysis
• It used to be a core skill
• But it got a bad name
21 July 2009
Keith Braithwaite
Slide 28
Old School
© Zühlke 2009
Analysis
So, we stopped doing it
• Agile gave some of us an excuse
21 July 2009
Keith Braithwaite
Slide 29
Old School
© Zühlke 2009
Analysis
We had to re-invent understanding
• behaviour driven development – (AKA TDD the way you were always supposed to do it)
• Domain Driven Design – “Until I started working in "enterprise IT" I didn't realise that people didn't
do this. I suppose that this is an important book, but it's depressing that this is so”—Nat Pryce
21 July 2009
Keith Braithwaite
Slide 30
Old School
© Zühlke 2009
Analysis
Domain Driven Design
“Leading software designers have recognized domain modeling and design as critical topics for at least 20 years, yet surprisingly little has been written about what needs to be done or how to do it.”—Evans
21 July 2009
Keith Braithwaite
Slide 31
Old School
© Zühlke 2009
Analysis
These days we “conquer and divide”
• We can discover the domain
• Which is great!
21 July 2009
Keith Braithwaite
Slide 32
Old School
© Zühlke 2009
Analysis
But still…
• Objects in the world have states that they move between – We might want to talk explicitly about them
• Some events must occur in certain orders – We might want to talk explicitly about that
21 July 2009
Keith Braithwaite
Slide 33
Old School
© Zühlke 2009
Analysis
Consider a system built out of domains with various intents
21 July 2009
Keith Braithwaite
Slide 34
Old School
© Zühlke 2009
Analysis
Then we would know where to put the analysis
There’s an echo of this in Enterprise stacks
21 July 2009
Keith Braithwaite
Slide 35
Old School
© Zühlke 2009
Architecture
No-one quite agrees on what this is
So it has become everything and nothing
21 July 2009
Keith Braithwaite
Slide 36
Old School
© Zühlke 2009
Architecture
Seems as if it should have something to do with:
• Compromise
• Communication
• Habitability
• Reconciliation
• Comfort
• Ease of construction
And not:
• Which stack to fit in between the web server and database 21 July 2009
Keith Braithwaite
Slide 37
Old School
© Zühlke 2009
Architecture
“Stacks” an over-used metaphor
21 July 2009
Keith Braithwaite
Slide 38
A B
Old School
© Zühlke 2009
Architecture
“Stacks” an over-used metaphor
21 July 2009
Keith Braithwaite
Slide 39
A B
Application config
TCP/IP
JMS Topics
Corporate msg bus
Project messaging
Application config
TCP/IP
JMS Topics
Corporate msg bus
Project messaging
Old School
© Zühlke 2009
Architecture
“Stacks” an over-used metaphor
21 July 2009
Keith Braithwaite
Slide 40
A B
Application config
TCP/IP
JMS Topics
Corporate msg bus
Project messaging
Application config
TCP/IP
JMS Topics
Corporate msg bus
Project messaging
Point-to-point
Multicast
Multicast
Point-to-point
Point-to-point
Old School
© Zühlke 2009
Architecture
21 July 2009
Keith Braithwaite
Slide 41
A B
Old School
© Zühlke 2009
Architecture
21 July 2009
Keith Braithwaite
Slide 42
A
B A1 A2
Old School
© Zühlke 2009
Architecture
21 July 2009
Keith Braithwaite
Slide 43
A
B A1 A2
Old School
© Zühlke 2009
Architecture
Architecture got a bad name
21 July 2009
Keith Braithwaite
Slide 44
Old School
© Zühlke 2009
Architecture
Non–the–less, every system has an architecture
• It might be worth knowing how to talk about that
21 July 2009
Keith Braithwaite
Slide 45
Old School
© Zühlke 2009
Modelling
We really lost the plot on this one
21 July 2009
Keith Braithwaite
Slide 46
http
://a
rgou
ml.t
igris
.org
/doc
s/ro
bbin
s_di
sser
tatio
n/di
ss8-
10.g
if
Old School
© Zühlke 2009
Modelling
Engineers Model
21 July 2009
Keith Braithwaite
Slide 47
Old School
© Zühlke 2009
Modelling
Engineers Model
• Models are useful for what they leave out
• Faster, cheaper than building a prototype
Models Answer Questions
• More quickly and easily than the real thing would
21 July 2009
Keith Braithwaite
Slide 48
Old School
© Zühlke 2009
Modelling
Engineers Model
• Models are useful for what they leave out
• Faster, cheaper than building a prototype
Models Answer Questions
• More quickly and easily than the real thing would
21 July 2009
Keith Braithwaite
Slide 49
Old School
© Zühlke 2009
Modelling
We got this wrong
• We tried to make out models useful by adding stuff
• Our models are often harder to build, and slower
• Out models too often don’t answer questions
21 July 2009
Keith Braithwaite
Slide 50
Old School
© Zühlke 2009
Modelling
There is a way forward, when appropriate
21 July 2009
Keith Braithwaite
Slide 51
Old School
© Zühlke 2009
Modelling
I still have a lot of affection for these old friends
21 July 2009
Keith Braithwaite
Slide 52
∃ ∀ ∉
⊢ ℤ But life, sadly, turns out to be too short
Old School
© Zühlke 2009
Conclusion
These were good ideas
• They still are good ideas
We turned against them because they were misapplied
• We can do better than that
21 July 2009
Keith Braithwaite
Slide 53