pair programming - be the best pair you can be

50
David Morgantini davidmorgantini.blogspot.co.uk [email protected]

Upload: david-morgantini

Post on 15-Jul-2015

87 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Pair Programming - Be the best pair you can be

David Morgantini

davidmorgantini.blogspot.co.uk

[email protected]

Page 2: Pair Programming - Be the best pair you can be

Who Am I?

David Morgantini

Independent consultant

Previously worked for:

ThoughtWorks

Government Digital Services

Paid to write code for 9 years

Focus on Tech Leadership, Agile

Coaching & pragmatic delivery

Page 3: Pair Programming - Be the best pair you can be

Why are we here?

Page 4: Pair Programming - Be the best pair you can be

In Scope

Better understanding of the practice of

pair programming

Concrete tips on how to be more

effective while pair programming

Page 5: Pair Programming - Be the best pair you can be

Out of scope

A discussion on whether pairing is a

good practice

Tips on how to convince your team to

try/use pair programming

An overview of all the research on pair

programming

Page 6: Pair Programming - Be the best pair you can be

Overview

Some Definitions

Pairing patterns

Intended benefits

Avoiding disengagement

Page 7: Pair Programming - Be the best pair you can be
Page 8: Pair Programming - Be the best pair you can be

Common Definition

Let’s solve this

problem! Ok!

Page 9: Pair Programming - Be the best pair you can be

More definitions

Let’s use the

bits class to

get some bobs

That sounds

good.

Driver Navigator

Pairing Session

Page 10: Pair Programming - Be the best pair you can be

Disengagement

I am such a

good

developer!

I haven’t a clue

what’s going on.

What’s for dinner?

Page 11: Pair Programming - Be the best pair you can be

Players in a pairing session

I’ve worked on the

milking functionality

before.

Expert Novice

Glad he knows this

code, I’ve never

seen it before.

Page 12: Pair Programming - Be the best pair you can be

Players in a pairing session

But I’ve never had

to work the

DevOps*

Expert Novice

* DevOps is not a thing

Ah I know all

about the

DevOps*!

Page 13: Pair Programming - Be the best pair you can be

Players in a pairing session

But I’ve never had

to work the

DevOps*

Novice Expert

* DevOps is not a thing

Ah I know all

about the

DevOps*!

Page 14: Pair Programming - Be the best pair you can be
Page 15: Pair Programming - Be the best pair you can be

There can only be one

… and we add an

implementation

here …

You missed a semi-

colon.

Page 16: Pair Programming - Be the best pair you can be

There can only be one

Jerk. Keeps hogging

the keyboard. And

my neck hurts.

… and now watch

as I type these

seven new classes

Page 17: Pair Programming - Be the best pair you can be

Two keyboards

… let me explain by

driving for a bit!

Ah, now I

understand what

you’re trying to say!

Page 18: Pair Programming - Be the best pair you can be

Two keyboards

STOP TYPING

DAMNIT!WE DO THIS!

Page 19: Pair Programming - Be the best pair you can be

A Laptop

I don’t understand, I

can’t see. Pair

programming is stupid.

… the gubbins go

with the bits and

bobs…

Page 20: Pair Programming - Be the best pair you can be

Mirrored laptopI still don’t understand

but at least now I can

see! Pair programming

rocks!

… and then we

connect the bobs to

the ESB via the

night service …

Page 21: Pair Programming - Be the best pair you can be

Dual station

… You’ll be able to

connect to the

gubbins! We ROCK!

… so you’re saying

if I catch the night

service at line 135

Page 22: Pair Programming - Be the best pair you can be

Dual station

There is a problem

there!

La la la, looking at

my monitor, don’t

know what you’re

talking about

Page 23: Pair Programming - Be the best pair you can be
Page 24: Pair Programming - Be the best pair you can be

What does the research

say?Based on bug count,

pairing is equivalent to

solo programming.

Pair Programming

makes a major

positive difference.

Pair programming

is a hindrance.

Don’t use it.

Page 25: Pair Programming - Be the best pair you can be

I would be more

interested in looking

at the patterns of

interactions that can

lead to the benefits or

how they are lost.

Pair vacation

taking is

AWESOME!

Page 26: Pair Programming - Be the best pair you can be

Intended benefits of pairing

Economics

Design quality

Developer satisfaction

Learning/Knowledge transfer

Team building and communication

Page 27: Pair Programming - Be the best pair you can be

Economics

… create

loads of

gubbins!

… use the

gubbin

factory to …

Two people

doing one

person’s

work!?

Yep! Fewer bugs &

better design should

lead to lower long

term costs!

Page 28: Pair Programming - Be the best pair you can be

Quality

But how do

we connect

the gubbins

without one?

Maybe an

ESB is a

bad idea?

Excellent,

keep up the

good work!No new

bugs to

report, sir!

Page 29: Pair Programming - Be the best pair you can be

Developer satisfactionOk, no ESB. Let’s

use a light-weight

message queue

instead

Great idea!

Today was

AWESOME! WE ROCK!

HIGH

FIVE

Page 30: Pair Programming - Be the best pair you can be

Learning/Knowledge

sharing

I know this

code! I paired

with Jill!

Good thing we pair

cause I don’t know

what a gubbin is!

Page 31: Pair Programming - Be the best pair you can be

Communication

This would be a pain if

we had to use an

antiquated

communication method.

I hear ya!.

E-mail is so 2005.

Page 32: Pair Programming - Be the best pair you can be

WE ARE BUILDING BETTER

SOFTWARE!WE ARE BUILDING BETTER

SOFTWARE!

WE ARE BUILDING BETTER

SOFTWARE!

WE ARE BUILDING BETTER

SOFTWARE!

WE ARE BUILDING

BETTER SOFTWARE!

Systemic Benefits

Page 33: Pair Programming - Be the best pair you can be
Page 34: Pair Programming - Be the best pair you can be

Disengagement

I am such a

good

developer!

I haven’t a clue

what’s going on.

What’s for dinner?

Page 35: Pair Programming - Be the best pair you can be

Mutually agreed

disengagement… and while you do

that I’m going to

refactor the gubbin

factory.

I’m going to connect

up the message

queue

Page 36: Pair Programming - Be the best pair you can be

Expert-Novice

*whistling*

Expert Novice

I’m so confused

Page 37: Pair Programming - Be the best pair you can be

Expert-Novice

Do you

understand?

Expert Novice

No. Can you

please explain

more?

Page 38: Pair Programming - Be the best pair you can be

Reasons for disengagement

1) Type of work

1) Unfamiliar working environment

2) Interruptions

3) Time pressure

4) Social pressure

Page 39: Pair Programming - Be the best pair you can be

Type of work

I don’t think that

this work needs a

pair.

Ya. I’m not really

able to effectively

contribute

Page 40: Pair Programming - Be the best pair you can be

Suggestions

1) Consider tiny tasking

2) Break up the pair

3) Ask yourself if the work needs a pair

4) Expert: Ensure the novice is driving

Page 41: Pair Programming - Be the best pair you can be

Uncomfortable dev environment

I love EMACS!1!

Um… I can’t use

this insane text

editor

Page 42: Pair Programming - Be the best pair you can be

Suggestions

1) Make each pair feel ‘at home’

Dual monitors/keyboard etc…

Team IDE standardization

2) Expert: Take the comfort hit if the goal

is learning

Page 43: Pair Programming - Be the best pair you can be

InterruptionsHa ha! Free from the

old ball and chain!

When the cat’s away,

the ESB returns!Sorry, I

forgot.

You didn’t put

a new cover

sheet on your

TPS report!

Page 44: Pair Programming - Be the best pair you can be

Interruptions… and then

remember to add one

to combat the naming

problems …

I don’t know

what’s going

on anymore…

Page 45: Pair Programming - Be the best pair you can be

Suggestions

1) Try not to disrupt an in progress session

2) Complete any in progress discussion

before acknowledging interruption

3) Plan for longer interruptions

4) Re-establish mutual context when

interruption is complete

Page 46: Pair Programming - Be the best pair you can be

Time pressure

I feel the need…

the need for

speed.

Expert Novice

OMG. I lost him

25 minutes ago.

Page 47: Pair Programming - Be the best pair you can be

Suggestions

1) Plan novice pairing time into estimation

2) Expert: Verbalize progress and ask for

feedback

Page 48: Pair Programming - Be the best pair you can be

Social pressure

… and finally,

once we have

connected the

message

queue…

I don’t understand.

But I don’t want to

look stupid by

asking a question

Page 49: Pair Programming - Be the best pair you can be

Suggestions

1) Expert: Give novice partner some time to consider solutions alone before development starts

2) Novice: Stop your partner when you don’t know what’s going on

3) Expert: Encourage your partner to drive

4) Establish mutual context before starting development

Page 50: Pair Programming - Be the best pair you can be

Thank You!

What an

interesting group

of research

subjects.

So did you

learn anything

today?

I was busy

playing candy

crush.

He made 5

mistakes!!!!

GET BACK TO

WORK! I DON’T

PAY YOU TO SIT

AROUND AND

TALK!