Pair Programming (2014)
-
Upload
peter-kofler -
Category
Technology
-
view
405 -
download
1
Transcript of Pair Programming (2014)
![Page 1: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/1.jpg)
Pair ProgrammingAustrian Institute of Technology,
NGCMS Jfx, March 2014
Peter Kofler, ‘Code Cop’@codecopkofler
www.code-cop.org
Copyright Peter Kofler, licensed under CC-BY.
![Page 2: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/2.jpg)
Peter Kofler
• Ph.D. (Appl. Math.)
• Professional SoftwareDeveloper for 14 years
• “fanatic about code quality”
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 3: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/3.jpg)
Pair Programming
![Page 4: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/4.jpg)
Pair Programming
● Two programmers● work together ● on the same thing● at one workstation.
Pair programming is a dialogue between two people simultaneously programming (and analysing and designing and testing)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 5: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/5.jpg)
Enterprise CTOnot impressed by
pair programming.
“We often have hundredsof developers working
on the same thing.” (Hacker News Onion)
![Page 6: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/6.jpg)
What are the benefits?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 7: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/7.jpg)
Benefits
● most immediate feedback● maintained self-discipline
● we keep each other honest● improved code quality, less defects● knowledge sharing
● higher team bus number● mentoring junior team members.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 8: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/8.jpg)
“One disadvantage of pair programming: you have to go the toilet in
pairs too :-)”(Zsolt Fabók)
![Page 9: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/9.jpg)
Pairing Roles
![Page 10: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/10.jpg)
Driver
● Writes code● Takes the decisions● Consults with the Navigator● Focuses on short term actions● Verbalizes all the performed actions
● Less-informed pair member is driving
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
http://www.slideshare.net/adibolb/sherlock-holmes-and-pairing-wlidcard-conference-2013-09-13
![Page 11: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/11.jpg)
Navigator
● Looks ahead for strategy● Rechecks facts of the Driver (review)● Remembers facts to the driver● Asks meaningful questions● Verbalizes agreement or disagreement● Supports driver's decisions● Does not cross the Driver's comfort zone
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 12: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/12.jpg)
The Rules
![Page 13: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/13.jpg)
You Pair For...
● Writing Production Code (XP Rule)
● Any development on the mainline of delivery (writing code, writing tests, build engineering, documentation)
● Works well for web applications
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 14: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/14.jpg)
Pairing is Useful For...
● Tasks that need focused energy, brainstorming, problem solving, continuous design, mentoring and motivation.
● Pair by default and work solo by exception. (Novice Rule)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 15: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/15.jpg)
When Not to Pair
● Non-mainline tasks like spiking (prototyping), research, admin.
● Tasks which call for quiet, steady focus.
● Don’t insist on pairing for every task.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 16: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/16.jpg)
How Long
● 70% of time, not more than 5 or 6 hours● Breaks!
● Shift partners often● every hour to every couple of hours
● Pair Marriage is bad● Need quiet work time.
● When interrupted, the negative impact is doubled.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 17: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/17.jpg)
Workstation
● Partners sit comfortably side-by-side.
● Level 0: Basic Pairing● Level 1: Good Pairing - two keyboards● Level 2: Great Pairing - mirrored screen● Level 3: Awesome Pairing - eye contact● Level 4: “Pair”-adise - extra laptop
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
http://www.nomachetejuggling.com/2011/08/25/mechanics-of-good-pairing/
![Page 18: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/18.jpg)
Mob Programming
● All the brilliant people● working at the same time,● in the same space,● at the same computer,● on the same thing.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
http://mobprogramming.org/
![Page 19: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/19.jpg)
Human Aspects
![Page 20: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/20.jpg)
Breaking the ice
● Difficult to start pairing● The first sessions are awkward● Pairs open themselves one to the other● Afraid of criticism
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 21: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/21.jpg)
Behave Well
● Personal hygiene is important.● Take a shower (1st Rule of Pairing)● Use chewing gum
● Be polite!● Have patience!● Be honest!
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 22: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/22.jpg)
“In pair programming wait 15 seconds before you point out mistakes.Give your pair a chance
to find it first.”(J. B. Rainsberger)
![Page 23: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/23.jpg)
Communicate Freely
● Focus on the code● Ask questions● Express things (even to a newbie)● Talk about the code
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
http://www.slideshare.net/angelaharms/pair-programming-10082278
![Page 24: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/24.jpg)
Anti Patterns
● Do not focus on typing/coding● Do not hug the keyboard● Do not dominate your pair● Do not zone out (mobile phone etc.)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 25: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/25.jpg)
![Page 26: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/26.jpg)
Not for everyone
● Do I want to sit nextto this person every day?
● In doubt raise your voice(don’t risk the project)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 27: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/27.jpg)
“Don’t be afraid of pair-programming - you’re
not as good as you think, but you’re not as bad as
you fear.”(Ron Jeffries)
![Page 28: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/28.jpg)
Peter Kofler
@codecopkofler
www.code-cop.org
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 29: Pair Programming (2014)](https://reader033.fdocuments.in/reader033/viewer/2022052504/554bbcbdb4c9053a298b4e42/html5/thumbnails/29.jpg)
CC Images● driver http://www.flickr.com/photos/48694743@N00/517658329/● pairing http://www.flickr.com/photos/dav/94735395/● wants you http://www.flickr.com/photos/shutter/105497713/● rules http://www.flickr.com/photos/mc_sensei/3935815039/● learn http://www.flickr.com/photos/83633410@N07/7658268052/● sign http://www.flickr.com/photos/hugosimmelink/2252095723/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY