Old School - gotocon.com · Old School © Zühlke 2009 21 July 2009 Keith Braithwaite Slide 1 Old...

53
© 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

Transcript of Old School - gotocon.com · Old School © Zühlke 2009 21 July 2009 Keith Braithwaite Slide 1 Old...

Page 1: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 1

Old School

Techniques that still work no matter how hard we try to forget them

Page 2: Old School - gotocon.com · 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

Page 3: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 3

If IT were a person…

It would be diagnosed with

• ADHD • Retrograde amnesia

• OCD

Page 4: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 4

If IT were a person…

Page 5: Old School - gotocon.com · 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

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

Page 6: Old School - gotocon.com · 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

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

Page 7: Old School - gotocon.com · 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

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

Page 8: Old School - gotocon.com · 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

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

Page 9: Old School - gotocon.com · 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

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 ”

Page 10: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 10

Zombies w

ww

.flic

kr.c

om/p

hoto

s/ h

ryck

owia

n/35

4074

4713

/

Page 11: Old School - gotocon.com · 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

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

Page 12: Old School - gotocon.com · 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

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

Page 13: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 13

Code that works “first time”

There was a time when this sort of thing made sense

Page 14: Old School - gotocon.com · 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

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

Page 15: Old School - gotocon.com · 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

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

Page 16: Old School - gotocon.com · 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

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

Page 17: Old School - gotocon.com · 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

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

Page 18: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 18

Code that works “first time” D

isag

reem

ent

Uncertainty

low

h

igh

low high

Page 19: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 19

Code that works “first time” D

isag

reem

ent

Uncertainty

low

h

igh

low high

Page 20: Old School - gotocon.com · 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

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

Page 21: Old School - gotocon.com · 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

21 July 2009

Keith Braithwaite

Slide 21

Structured Programming

A “sub–program” had:

• One entry point

• Sequence

•  Iteration

• Alternation

• One exit point

Page 22: Old School - gotocon.com · 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

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

Page 23: Old School - gotocon.com · 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

Structured Programming

But this sort of thing makes no sense:

21 July 2009

Keith Braithwaite

Slide 23

Page 24: Old School - gotocon.com · 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

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

Page 25: Old School - gotocon.com · 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

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

Page 26: Old School - gotocon.com · 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

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

Page 27: Old School - gotocon.com · 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

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

Page 28: Old School - gotocon.com · 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

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

Page 29: Old School - gotocon.com · 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

Analysis

So, we stopped doing it

• Agile gave some of us an excuse

21 July 2009

Keith Braithwaite

Slide 29

Page 30: Old School - gotocon.com · 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

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

Page 31: Old School - gotocon.com · 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

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

Page 32: Old School - gotocon.com · 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

Analysis

These days we “conquer and divide”

• We can discover the domain

• Which is great!

21 July 2009

Keith Braithwaite

Slide 32

Page 33: Old School - gotocon.com · 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

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

Page 34: Old School - gotocon.com · 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

Analysis

Consider a system built out of domains with various intents

21 July 2009

Keith Braithwaite

Slide 34

Page 35: Old School - gotocon.com · 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

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

Page 36: Old School - gotocon.com · 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

Architecture

No-one quite agrees on what this is

So it has become everything and nothing

21 July 2009

Keith Braithwaite

Slide 36

Page 37: Old School - gotocon.com · 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

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

Page 38: Old School - gotocon.com · 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

Architecture

“Stacks” an over-used metaphor

21 July 2009

Keith Braithwaite

Slide 38

A B

Page 39: Old School - gotocon.com · 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

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

Page 40: Old School - gotocon.com · 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

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

Page 41: Old School - gotocon.com · 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

Architecture

21 July 2009

Keith Braithwaite

Slide 41

A B

Page 42: Old School - gotocon.com · 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

Architecture

21 July 2009

Keith Braithwaite

Slide 42

A

B A1 A2

Page 43: Old School - gotocon.com · 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

Architecture

21 July 2009

Keith Braithwaite

Slide 43

A

B A1 A2

Page 44: Old School - gotocon.com · 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

Architecture

Architecture got a bad name

21 July 2009

Keith Braithwaite

Slide 44

Page 45: Old School - gotocon.com · 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

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

Page 46: Old School - gotocon.com · 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

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

Page 47: Old School - gotocon.com · 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

Modelling

Engineers Model

21 July 2009

Keith Braithwaite

Slide 47

Page 48: Old School - gotocon.com · 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

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

Page 49: Old School - gotocon.com · 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

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

Page 50: Old School - gotocon.com · 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

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

Page 51: Old School - gotocon.com · 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

Modelling

There is a way forward, when appropriate

21 July 2009

Keith Braithwaite

Slide 51

Page 52: Old School - gotocon.com · 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

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

Page 53: Old School - gotocon.com · 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

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