pair programming overview and concepts

25
Extreme Programming & Pair Programming Lior Shalom

Upload: lior-kirshner-shalom

Post on 31-Oct-2014

175 views

Category:

Business


0 download

DESCRIPTION

Pair programming overview and concepts, roles, implementations

TRANSCRIPT

Page 1: Pair programming overview and concepts

Extreme Programming & Pair Programming

Lior Shalom

Page 2: Pair programming overview and concepts

Extreme Programming (XP)

Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries

Agile software development methodology (others: Scrum, DSDM)

Developed in reaction to high ceremony methodologies

Page 3: Pair programming overview and concepts

XP: Why?

Previously: Get all the requirements before starting design Freeze the requirements before starting

development Resist changes: they will lengthen schedule Build a change control process to ensure that

proposed changes are looked at carefully and no change is made without intense scrutiny

Deliver a product that is obsolete on release

Page 4: Pair programming overview and concepts

XP: Embrace Change

Recognize that: All requirements will not be known at the beginning Requirements will change

Use tools to accommodate change as a natural process

Do the simplest thing that could possibly work and refactor mercilessly

Emphasize values and principles rather than process

Page 5: Pair programming overview and concepts

XP Practices

(Source: http://www.xprogramming.com/xpmag/whatisxp.htm)

Page 6: Pair programming overview and concepts

XP Values

CommunicationSimplicityFeedbackCourage

Page 7: Pair programming overview and concepts

XP Criticism

Unrealistic--programmer centric, not business focused

Detailed specifications are not written Design after testing Constant refactoring Customer availability 12 practices are too interdependent

Page 8: Pair programming overview and concepts

Pair Programming Overview

Two programmers work side-by-side at one computer

Continuously collaborate on same design, algorithm, code, test, etc.

Continuous informal review

Page 9: Pair programming overview and concepts

Two guys working on the same taskBoth have the same targetBoth have different expertiseOne executes the task , other watches for

external factors, evaluates the situation, Corrects him and validates success after

executionTwo guys working as a team

Pair Programming Overview (cont.)

Page 10: Pair programming overview and concepts

Share everything

Two programmers are assigned to jointly produce one artifact

One person typing or writing, the other continuously reviewing

Both equal participantsBoth partners own everything

Page 11: Pair programming overview and concepts

Pair Programming - roles

Developer(navigator)

Developer(driver)

Page 12: Pair programming overview and concepts

Pair Programming - roles

Page 13: Pair programming overview and concepts

Isn’t it a waste?

Two developers will do the work of oneJunior guys will slow down seniorsLess work will get doneMy cost will doubleWhy would I put two people on a job that

just one can do?

Page 14: Pair programming overview and concepts
Page 15: Pair programming overview and concepts

How does it Help?Continuous Review.Less Defects caught early.Better Problem Solving.More Economical.“Pair-Pressure” ensures timely delivery.Rapid Hands-on Approach to Learning.Better Induction of new Team Members.

Page 16: Pair programming overview and concepts

Pair Programming rules

Think Out LoudTen seconds rule

Page 17: Pair programming overview and concepts

Think out loud (rule 1)

The driver “thinks out loud” as he/she’s coding

This helps keep the navigator in the loop, and communicates the intent better

It’s certainly not a technique that most people practice without suggestion

Page 18: Pair programming overview and concepts

Ten seconds rule (rule 2)

The navigator should wait 10 seconds before pointing out a typo

Generally that’s long enough for the driver to correct a typo that’s already noticed

Excessive interruptions are distracting

Page 19: Pair programming overview and concepts

Pair Programming - practices

Ping PongChess Clock Pair Programming

(Kitchen Clock)

Page 20: Pair programming overview and concepts

Ping Pong Pair Programming

The navigator writes a failing unit testThe driver modifies the code to pass the

unit test(s)The navigator writes a new unit test, and

so onThis loop continues as long as the

navigator is able to write failing unit tests

Page 21: Pair programming overview and concepts

Chess Clock Pair Programming

Set the clock at 5 minutes (each side)Pair Program. Push down your clock

side when you take the keyboardSee how much more than the allotted

time you need to complete the task

Page 22: Pair programming overview and concepts

Chess Clock Pair Programming

ProsAssure everybody gets the keyboard

Cons It can be inconvenient to pass the keyboard

in the middle of coding

Page 23: Pair programming overview and concepts

Skills to be successfully while Pair ProgrammingTeamworkAccept other ideasCooperationCommunication Be a good listenerName and layout conventionsRespect the 10 seconds rule

Page 24: Pair programming overview and concepts

When should you pair?

Complex CodeMission-critical codeCode that involves design decisionsAreas of code that you want everyone

on the team to know how to work with

Page 25: Pair programming overview and concepts

What is NOT pair programming?

Splitting up the workTaking turns doing the workOne person doing all the workBeing located in different placesSitting at different computers(Exception – it’s ok to use remote shared

desktop technology, such as VNC, if absolutely necessary)