Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pair Programming: Why Have Two Do the Work of One from Laurie Williams North Carolina State University.

Similar presentations


Presentation on theme: "Pair Programming: Why Have Two Do the Work of One from Laurie Williams North Carolina State University."— Presentation transcript:

1 Pair Programming: Why Have Two Do the Work of One from Laurie Williams North Carolina State University

2 Pair Programming

3 Agenda  Research/Findings  Colocated Pairs  Distributed Pairs  Pair Interactions  Sample Pairings  Pair Rotation  Summary

4 Empirical Study for Validation  Practice: Summer 1999  20 Students (Sophomore/Junior)  All worked collaboratively  Generated more anecdotal/qualitative evidence  Solo vs Pair: Fall 1999  41 Students (Junior/Senior)  28 Worked Collaboratively  13 Worked Individually  Software development process was controlled  The only experimental variable: pair-programming  Quantitative: Time, Quality, Enjoyment, Confidence

5

6 Boxplot of Program Quality

7

8 Boxplot of Student Time

9 Collaboration by Phase

10

11 Distributed Pair Programming  Net Meeting  Yahoo Messenger  Graduate Object-Oriented class at NCSU  5-week project  132 students  34 distance students  Teams of 2-4 students  Colocated non-pairs (9 groups)  Colocated pairs (16 groups)  Distance non-pairs (8 groups)  Distance pairs (5 groups)

12 Productivity

13 Quality

14 Satisfaction with Working Arrangement Very good GoodFairPoor Non-pair colocated46%40%11%3% Pair colocated62%28%10%0% Non-pair distributed45%37%18%0% Pair distributed83%17%0%

15 Satisfaction with Communication Very good GoodFairPoor Non-pair colocated57%26%11%6% Pair colocated58%28%12%2% Non-pair distributed41% 14%4% Pair distributed67%33%0%

16 Research Findings to Date  Strong anecdotal evidence from industry “We can produce near defect-free code in less than half the time.”  Empirical Study –Pairs produced higher quality code »15% less defects (difference statistically significant) –Pairs completed their tasks in about half the time »58% of elapsed time (difference not statistically significant) –Most programmers reluctantly embark on pair programming »Pairs enjoy their work more (92%) »Pairs feel more confident in their work products (96%) –Distributed pair programming is a viable alternative (worthy of much more research)

17 How does this work?  Pair-Pressure  Keep each other on task and focused  Don’t want to let partner down  “Embarrassed” to not follow the prescribed process  Parkinson’s Law “Work expands to fill all available time.”  Pair-Negotiation  Distributed Cognition: “Searching Through Larger Spaces of Alternatives”  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-Relaying  Each, in turn, contributes to the best of their knowledge and ability  Then, sit back and think while their partner fights on

18 How does this work (part two)?  Pair-Reviews  Continuous design and code reviews  Ultimate in defect removal efficiency  Removes programmers distaste for reviews  80% of all (solo) programmers don’t do them regularly or at all  Debug by Describing  Tell it to the Furby  Pair-Learning  Continuous reviews  learn from partners techniques, knowledge of language, domain, etc.  “Between the two of us, we knew it or could figure it out”  Apprenticeship  Defect prevention always more efficient than defect removal

19 Vending Machine Program: Responsibility Assignment UI Mary Buy Drink Joe Data Structures Charlie Machine Maintenance Sue

20 Pair Rotation TaskOwnerPartner UI for ‘Buy Drink’MaryJoe UI for ‘Add Inventory’MarySue UI for ‘Add Recipe’MarySue Input Coins/Return Coins JoeMary Select DrinkJoeCharlie Ingredient Data Structure CharlieSue Recipe Data StructureCharlieSue Add IngredientsSueCharlie Customer AnalysisSueMary UI Mary Buy Drink Joe Mach Maint. Sue Data Struct. Charlie

21 Expected Benefits of Pair- Programming  Higher product quality  Improved cycle time  Increased programmer satisfaction  Enhanced learning  Pair rotation  Ease staff training and transition  Knowledge management/Reduced product risk  Enhanced team building

22 The Benefits of Pair Programming Robert Kessler School of Computing University of Utah Special thanks to Laurie Williams North Carolina State University

23 What Is Pair Programming? "Pair programming is a simple, straightforward concept. Two programmers work side-by-side at one computer, continuously collaborating on the same design, algorithm, code, and test. It allows two people to produce a higher quality of code than that produced by the summation of their solitary efforts."

24 This Is Pair Programming

25 This is NOT Pair Programming

26 Pair Programming Has Been Around For a LONG TIME! … John von Neumann, recognized his own inadequacies and continuously asked others to review his work. Fred Brooks and many others are pair programming, though they don’t know there is a name for it.

27 Does Pair Programming Really Work? l Empirical study by Laurie Williams at the university of Utah l Practice: Summer 1999 –20 students (sophomore/junior) »All worked collaboratively –Generated more anecdotal/qualitative evidence l Solo vs. pair: Fall 1999 –41 students (junior/senior) »28 worked collaboratively »13 worked individually –Software development process was controlled »The only experimental variable: pair-programming –Quantitative: time, quality, enjoyment, confidence

28 Findings #1 - Quality

29 Findings #2 - Time

30 Findings #3 and #4 – Enjoyment and Confidence

31 How Does This Work? l Pair-Pressure –Keep each other on task and focused –Don’t want to let partner down –“Embarrassed” to not follow the prescribed process –Parkinson’s law “work expands to fill all available time.” l Pair-Think –Distributed cognition: “searching through larger spaces of alternatives” »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 l Pair-Relaying –Each, in turn, contributes to the best of their knowledge and ability –Then, sit back and think while their partner fights on

32 How Does This Work (Part Two)? l Pair-Reviews –Continuous design and code reviews –Ultimate in defect removal efficiency –Removes programmers distaste for reviews »80% of all (solo) programmers don’t do them regularly or at all l Debug by describing –Tell it to the Furby l Pair-Learning –Continuous reviews  learn from partners techniques, knowledge of language, domain, etc. –“Between the two of us, we knew it or could figure it out” –Apprenticeship –Defect prevention always more efficient than defect removal

33 Research Findings to Date - 1 l Strong anecdotal evidence from industry –“We can produce near defect-free code in less than half the time.” l Empirical study –Pairs produced higher quality code »15% less defects (difference statistically significant) »Observed – pairs produced smaller (LOC) programs –Pairs completed their tasks in about half the time »58% of elapsed time (difference NOT statistically significant) –Most programmers reluctantly embark on pair programming »Pairs enjoy their work more (92%) »Pairs feel more confident in their work products (96%)

34 Research Findings - 2 l Several educational studies underway –University of California, Santa Cruz; North Carolina State University –What about pair learning? »Anecdotal says that it works well –What are the long-term issues? »If you learn as a pair, can you work as a solo? l Distributed pair programming studies underway –North Carolina State University; University of North Carolina- Chapel Hill –Early results: distributed pair programming is viable –My experience: »Need to meet and know your pair »Need a good tool like VNC and telephone »Video not important

35 Issues: Workplace Layout Bad Better Best

36 Issues: Partner Picking Principles Expert paired with an Expert Expert paired with a Novice Novices paired togetherProfessional Driver ProblemCulture

37 Issues: Pair Rotation l Ease staff training and transition l Knowledge management/Reduced product risk l Enhanced team building

38 Issues: Process l Used in eXtreme Programming l Used in the Collaborative Software Process l Pair programming can be added to any process

39 Expected Benefits of Pair Programming l Higher product quality l Improved cycle time l Enhanced learning l Pair rotation –Ease staff training and transition –Knowledge management/reduced product risk –Enhanced team building l Increased programmer satisfaction

40 More Information l Bob Kessler l Laurie Williams l l


Download ppt "Pair Programming: Why Have Two Do the Work of One from Laurie Williams North Carolina State University."

Similar presentations


Ads by Google