[Pair Programming]
             Ghezal Ahmad “Zia”



3/24/2011            Pair Programming   1
Forward
2




       This presentation, represent a research result which is
        prepared by Stuart Wray at Royal School of Signals,
        Blandford, United kingdom, that defines why pair
        programming sometimes brings benefit and sometimes
        does not.




                                  Pair Programming   3/24/2011
Outline
3




       Motivation
       Pair Programming approach
       Characteristic of pair programming
       Advantages of Pair Programming
       Conclusion




                              Pair Programming   3/24/2011
What Pair Programming is?
4                                                             Motivation


    Pair programming is a style of programming in which two
    programmers work side by side at one computer, continually
    collaborating on the same analysis, design, algorithm,
    implementation, code, or test.




                               Pair Programming   3/24/2011
How does Pair Programming work?
5                                                           Pair programming approach



    •   Driver
         –   “Driver” has control of the keyboard and focuses on the
             immediate task of coding.


    •   Navigator
         –   Tactical defects (syntax errors, calls to wrong method)
         –   Strategic error (heading down wrong path)



                                         Pair Programming   3/24/2011
6




       Why Pair programming is sometimes useful and
                     sometimes doesn't?




                            Pair Programming   3/24/2011
How does Pair Programming work?
7                                          Pair programming approach

     Driver
                                                       Navigator




                        Pair Programming   3/24/2011
Pair…
8                                                               Pair programming approach




                                             Pair Programming    3/24/2011
      http://www.golfhotelwhiskey.com/what-airlines-can-teach-general-aviation-pilots/
Pair…
9                                               Pair programming approach




      http://www.jupiterimages.com/Image/royaltyFree/77636342
                                    Pair Programming 3/24/2011
Pair…
10                                                      Pair programming approach




      http://fachisthers.com/template_archives.asp?chosenYear=2008&chosenMonth=4
                                            Pair Programming 3/24/2011
Abstraction
11                                 Characteristics of Pair Programming

        Pair Pressure
            –    Keep each other on task and focused
            –    Don’t want to let partner down
        Pair Negotiation
            –    Have shared goals and plans
            –    Bring different prior experiences to the task
            –    Different access to task relevant information
            –    Must negotiate a common shared of action


                                  Pair Programming   3/24/2011
12          Characteristics of Pair Programming




     [1]   Pair Programming   3/24/2011
13                        Characteristics of Pair Programming




        Pair Programming would drive me crazy.




                         Pair Programming   3/24/2011
Two head is better than one
14                Characteristics of Pair Programming




                 Pair Programming   3/24/2011
Immediate Objections
15                                 Characteristics of Pair Programming




     •   Why use two programmers to do the work that one
         can do?

     •   Programmers prefer to work in isolation.

     •   Egos and disagreements about implementation will
         hinder development.

                                  Pair Programming   3/24/2011
16                         Characteristics of Pair Programming




     Objection 1: Why use two programmers to do the
                   work that one can do?




                          Pair Programming   3/24/2011
Objection 1
17                                     Characteristics of Pair Programming
      •   Brainstorming
          –   Produce higher quality designs.
          –   Catch design flaws early on, different approaches to the
              solution.
      •   Problem Isolation
           – Easier for two to find and resolve a problem.
           – Both thinking about problem differently.
      •   Focus
           – Keep each other on track.
           – Different experience levels



                                      Pair Programming   3/24/2011
18                        Characteristics of Pair Programming




     Objection 2: Programming is solitary work..




                         Pair Programming   3/24/2011
Objection 2
19                                     Characteristics of Pair Programming

      •   Common assumption
          –   Traditionally taught and practiced this way


      •   Takes some adjustment
          –   Most are initially skeptical


      •   Teamwork
           _ Pairs produced higher quality code

                                      Pair Programming   3/24/2011
20                      Characteristics of Pair Programming




     Objection 3: Egos and disagreements will
                hinder development.




                       Pair Programming   3/24/2011
Objection 3
21                                    Characteristics of Pair Programming


     •   Occasionally an issue.
         –   Rarely have dysfunctional pairs
         –   Disagreements can be easily resolved by a third
             party




                                     Pair Programming   3/24/2011
Advantages
22                                           Advantage of Pair Programming

     •    Learn more about the system and software development.
     •    Problems are solved quicker.
     •    Coding Standards followed more closely.
     •    Team communication and cohesiveness.
     •    Enhanced productivity
     •    Shorter and better code
     •    Less bugs
     •    Sharing of knowledge


                                 Pair Programming   3/24/2011
Important term
23                                                             Conclusion
        Is a method of programming that has come from the
         agile methodology of Extreme Programming (XP) .
        Better distribution of inner knowledge
        More team spirit
        A good idea to rotate pairs
        Two pair with refresh eyes
        Pair Programming is very effective:
              In term of time
              In term of quality
                                Pair Programming   3/24/2011
24




                 Thanks for your attention!




     3/24/2011               Pair Programming   24
References
25



     [1] Cockburn and Williams. The Costs and Benefits of Pair Programming.
         [http://collaboration.csc.ncsu.edu/laurie/Papers/XPSardinia.PDF]

     [2] Jensen, Randal. A Pair Programming Experience.
         CrossTalk. Mar, 2003.
         [http://www.stsc.hill.af.mil/crosstalk/2003/03/jensen.html]

     [3] Pair Programming. Cunningham & Cunningham, Inc. Jan. 15, 2006.
         [http://www.c2.com/cgi/wiki?PairProgramming]

     [4] Williams, Kessler, Cunningham. Strengthening the Case for Pair-
         Programming.
         [http://www.cs.utah.edu/~lwilliam/Papers/ieeeSoftware.PDF]
     [5] http://collaboration.csc.ncsu.edu/laurie

                                          Pair Programming   3/24/2011
26




     Question?

         Pair Programming   3/24/2011
27




      YOU WILL NEVER WORK   ALONE NOW!


     3/24/2011          Pair Programming   27

How does pair programming work?

  • 1.
    [Pair Programming] Ghezal Ahmad “Zia” 3/24/2011 Pair Programming 1
  • 2.
    Forward 2  This presentation, represent a research result which is prepared by Stuart Wray at Royal School of Signals, Blandford, United kingdom, that defines why pair programming sometimes brings benefit and sometimes does not. Pair Programming 3/24/2011
  • 3.
    Outline 3  Motivation  Pair Programming approach  Characteristic of pair programming  Advantages of Pair Programming  Conclusion Pair Programming 3/24/2011
  • 4.
    What Pair Programmingis? 4 Motivation Pair programming is a style of programming in which two programmers work side by side at one computer, continually collaborating on the same analysis, design, algorithm, implementation, code, or test. Pair Programming 3/24/2011
  • 5.
    How does PairProgramming work? 5 Pair programming approach • Driver – “Driver” has control of the keyboard and focuses on the immediate task of coding. • Navigator – Tactical defects (syntax errors, calls to wrong method) – Strategic error (heading down wrong path) Pair Programming 3/24/2011
  • 6.
    6  Why Pair programming is sometimes useful and sometimes doesn't? Pair Programming 3/24/2011
  • 7.
    How does PairProgramming work? 7 Pair programming approach Driver Navigator Pair Programming 3/24/2011
  • 8.
    Pair… 8 Pair programming approach Pair Programming 3/24/2011 http://www.golfhotelwhiskey.com/what-airlines-can-teach-general-aviation-pilots/
  • 9.
    Pair… 9 Pair programming approach http://www.jupiterimages.com/Image/royaltyFree/77636342 Pair Programming 3/24/2011
  • 10.
    Pair… 10 Pair programming approach http://fachisthers.com/template_archives.asp?chosenYear=2008&chosenMonth=4 Pair Programming 3/24/2011
  • 11.
    Abstraction 11 Characteristics of Pair Programming  Pair Pressure – Keep each other on task and focused – Don’t want to let partner down  Pair Negotiation – Have shared goals and plans – Bring different prior experiences to the task – Different access to task relevant information – Must negotiate a common shared of action Pair Programming 3/24/2011
  • 12.
    12 Characteristics of Pair Programming [1] Pair Programming 3/24/2011
  • 13.
    13 Characteristics of Pair Programming  Pair Programming would drive me crazy. Pair Programming 3/24/2011
  • 14.
    Two head isbetter than one 14 Characteristics of Pair Programming Pair Programming 3/24/2011
  • 15.
    Immediate Objections 15 Characteristics of Pair Programming • Why use two programmers to do the work that one can do? • Programmers prefer to work in isolation. • Egos and disagreements about implementation will hinder development. Pair Programming 3/24/2011
  • 16.
    16 Characteristics of Pair Programming Objection 1: Why use two programmers to do the work that one can do? Pair Programming 3/24/2011
  • 17.
    Objection 1 17 Characteristics of Pair Programming • Brainstorming – Produce higher quality designs. – Catch design flaws early on, different approaches to the solution. • Problem Isolation – Easier for two to find and resolve a problem. – Both thinking about problem differently. • Focus – Keep each other on track. – Different experience levels Pair Programming 3/24/2011
  • 18.
    18 Characteristics of Pair Programming Objection 2: Programming is solitary work.. Pair Programming 3/24/2011
  • 19.
    Objection 2 19 Characteristics of Pair Programming • Common assumption – Traditionally taught and practiced this way • Takes some adjustment – Most are initially skeptical • Teamwork _ Pairs produced higher quality code Pair Programming 3/24/2011
  • 20.
    20 Characteristics of Pair Programming Objection 3: Egos and disagreements will hinder development. Pair Programming 3/24/2011
  • 21.
    Objection 3 21 Characteristics of Pair Programming • Occasionally an issue. – Rarely have dysfunctional pairs – Disagreements can be easily resolved by a third party Pair Programming 3/24/2011
  • 22.
    Advantages 22 Advantage of Pair Programming • Learn more about the system and software development. • Problems are solved quicker. • Coding Standards followed more closely. • Team communication and cohesiveness. • Enhanced productivity • Shorter and better code • Less bugs • Sharing of knowledge Pair Programming 3/24/2011
  • 23.
    Important term 23 Conclusion  Is a method of programming that has come from the agile methodology of Extreme Programming (XP) .  Better distribution of inner knowledge  More team spirit  A good idea to rotate pairs  Two pair with refresh eyes  Pair Programming is very effective: In term of time In term of quality Pair Programming 3/24/2011
  • 24.
    24 Thanks for your attention! 3/24/2011 Pair Programming 24
  • 25.
    References 25 [1] Cockburn and Williams. The Costs and Benefits of Pair Programming. [http://collaboration.csc.ncsu.edu/laurie/Papers/XPSardinia.PDF] [2] Jensen, Randal. A Pair Programming Experience. CrossTalk. Mar, 2003. [http://www.stsc.hill.af.mil/crosstalk/2003/03/jensen.html] [3] Pair Programming. Cunningham & Cunningham, Inc. Jan. 15, 2006. [http://www.c2.com/cgi/wiki?PairProgramming] [4] Williams, Kessler, Cunningham. Strengthening the Case for Pair- Programming. [http://www.cs.utah.edu/~lwilliam/Papers/ieeeSoftware.PDF] [5] http://collaboration.csc.ncsu.edu/laurie Pair Programming 3/24/2011
  • 26.
    26 Question? Pair Programming 3/24/2011
  • 27.
    27 YOU WILL NEVER WORK ALONE NOW! 3/24/2011 Pair Programming 27