SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
Pair Programming
Ruby User Group Linz, May 2015
Peter Kofler, ‘Code Cop’
@codecopkofler
www.code-cop.org
Copyright Peter Kofler, licensed under CC-BY.
Peter Kofler
• Ph.D. (Appl. Math.)
• Professional Software
Developer for 15 years
• “fanatic about code quality”
• Freelance Code Mentor
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Training
on the
Job?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Yes, some but...
●
only what is already there
●
Trial & Error not popular in production
●
no practice - only production
●
time pressure
I help development teams with
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
●
Professionalism
●
Quality and
Productivity
●
Continuous
Improvement
Mentoring
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
●
Pair Programming
●
Programming Workshops
●
Deliberate Practice, e.g. Coding Dojos,
Code Retreats
●
Code Reviews, Architecture Discussions
Pair Programming
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
Enterprise CTO
not impressed by
pair programming.
“We often have hundreds
of developers working
on the same thing.”
(Hacker News Onion)
What are the benefits?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
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
“One disadvantage of
pair programming: you
have to go the toilet in
pairs too :-)”
(Zsolt Fabók)
Pairing Roles
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
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
The Rules
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
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
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
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
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/
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/
Human Aspects
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
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
“In pair programming
wait 15 seconds before
you point out mistakes.
Give your pair a chance
to find it first.”
(J. B. Rainsberger)
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
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
Not for everyone
●
Do I want to sit next
to this person every day?
●
In doubt raise your voice
(don’t risk the project)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Getting Started
Learning Pair Programming
●
by doing
●
first in safe place outside work
●
Coding Dojo
●
Code Retreat
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Practice Pair Programming
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Constraint: Ping-Pong
●
A writes a test and sees that it fails.
●
B writes the code needed to pass the test.
●
A or B refactors the code as needed.
●
B writes next test and sees that it fails.
●
A writes the code needed to pass the test.
●
And so on.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Selling Pairing to Management
1. Pairing on or critical defects/problems
(Problem Pairing)
2. Pairing on important business features
3. Pairing more often (Regular Pairing)
4. More often, etc.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Moar Pair Programming!!1!
When you work alone
●
#PairWithMe, http://www.pairprogramwith.me/
●
Remote Pairing, e.g.
https://www.softwerkskammer.org/groups/remotepairing
●
maybe substitutes
●
invite friend for review
●
use static code analysis
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
“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)
Peter Kofler
@codecopkofler
www.code-cop.org
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
CC Images
●
driver http://www.flickr.com/photos/48694743@N00/517658329/
●
Hamster http://www.flickr.com/photos/zebrapares/4529836138
●
Bruce http://www.flickr.com/photos/sherpas428/4350620602/
●
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/
●
ignition https://www.flickr.com/photos/billselak/391759360/
●
dojo http://www.flickr.com/photos/49715404@N00/3267627038/
●
Ping Pong https://www.flickr.com/photos/jasperfields/2442146122
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY

Más contenido relacionado

La actualidad más candente

Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Peter Kofler
 
Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)Peter Kofler
 
Coding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis KataCoding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis KataAlin Pandichi
 
TDD as if You Meant It (2013)
TDD as if You Meant It (2013)TDD as if You Meant It (2013)
TDD as if You Meant It (2013)Peter Kofler
 
Code Retreat Venice (2016)
Code Retreat Venice (2016)Code Retreat Venice (2016)
Code Retreat Venice (2016)Peter Kofler
 
Mob Programming (2016)
Mob Programming (2016)Mob Programming (2016)
Mob Programming (2016)Peter Kofler
 
Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Peter Kofler
 
Coding Dojo: Asynchronous Clock-In (2016)
Coding Dojo: Asynchronous Clock-In (2016)Coding Dojo: Asynchronous Clock-In (2016)
Coding Dojo: Asynchronous Clock-In (2016)Peter Kofler
 
Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)Peter Kofler
 
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Peter Kofler
 
Clean Readable Specifications (ETC 2016)
Clean Readable Specifications (ETC 2016)Clean Readable Specifications (ETC 2016)
Clean Readable Specifications (ETC 2016)Peter Kofler
 
Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)Peter Kofler
 
Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013Peter Kofler
 
Designing Test Cases for the Gilded Rose Kata v3 (2016)
Designing Test Cases for the Gilded Rose Kata v3 (2016)Designing Test Cases for the Gilded Rose Kata v3 (2016)
Designing Test Cases for the Gilded Rose Kata v3 (2016)Peter Kofler
 
Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)Peter Kofler
 
Refactoring the Tennis Kata v2 (2016)
Refactoring the Tennis Kata v2 (2016)Refactoring the Tennis Kata v2 (2016)
Refactoring the Tennis Kata v2 (2016)Peter Kofler
 
Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)Peter Kofler
 
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...Peter Kofler
 
Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)Peter Kofler
 
Coding Dojo: Data Munging (2016)
Coding Dojo: Data Munging (2016)Coding Dojo: Data Munging (2016)
Coding Dojo: Data Munging (2016)Peter Kofler
 

La actualidad más candente (20)

Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)
 
Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)
 
Coding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis KataCoding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis Kata
 
TDD as if You Meant It (2013)
TDD as if You Meant It (2013)TDD as if You Meant It (2013)
TDD as if You Meant It (2013)
 
Code Retreat Venice (2016)
Code Retreat Venice (2016)Code Retreat Venice (2016)
Code Retreat Venice (2016)
 
Mob Programming (2016)
Mob Programming (2016)Mob Programming (2016)
Mob Programming (2016)
 
Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)
 
Coding Dojo: Asynchronous Clock-In (2016)
Coding Dojo: Asynchronous Clock-In (2016)Coding Dojo: Asynchronous Clock-In (2016)
Coding Dojo: Asynchronous Clock-In (2016)
 
Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)
 
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)
 
Clean Readable Specifications (ETC 2016)
Clean Readable Specifications (ETC 2016)Clean Readable Specifications (ETC 2016)
Clean Readable Specifications (ETC 2016)
 
Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)
 
Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013
 
Designing Test Cases for the Gilded Rose Kata v3 (2016)
Designing Test Cases for the Gilded Rose Kata v3 (2016)Designing Test Cases for the Gilded Rose Kata v3 (2016)
Designing Test Cases for the Gilded Rose Kata v3 (2016)
 
Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)
 
Refactoring the Tennis Kata v2 (2016)
Refactoring the Tennis Kata v2 (2016)Refactoring the Tennis Kata v2 (2016)
Refactoring the Tennis Kata v2 (2016)
 
Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)
 
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
 
Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)
 
Coding Dojo: Data Munging (2016)
Coding Dojo: Data Munging (2016)Coding Dojo: Data Munging (2016)
Coding Dojo: Data Munging (2016)
 

Similar a Pair Programming Benefits

Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)Peter Kofler
 
Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)Peter Kofler
 
Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)Peter Kofler
 
JUnit Boot Camp (GeeCON 2016)
JUnit Boot Camp (GeeCON 2016)JUnit Boot Camp (GeeCON 2016)
JUnit Boot Camp (GeeCON 2016)Peter Kofler
 
Deliberate Practice (2014)
Deliberate Practice (2014)Deliberate Practice (2014)
Deliberate Practice (2014)Peter Kofler
 
Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)Peter Kofler
 
Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)Peter Kofler
 
Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)Peter Kofler
 
Outside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDDOutside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDDPeter Kofler
 
Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)Peter Kofler
 
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Peter Kofler
 
Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)Peter Kofler
 
How to code in the XXI century without losing your head
How to code in the XXI century without losing your headHow to code in the XXI century without losing your head
How to code in the XXI century without losing your headRené Olivo
 
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Peter Kofler
 
Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)Peter Kofler
 
Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)Peter Kofler
 
Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)Peter Kofler
 
Clean application development (talk)
Clean application development (talk)Clean application development (talk)
Clean application development (talk)Adam Culp
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHPRogério Vicente
 

Similar a Pair Programming Benefits (20)

Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)
 
Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)
 
Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)
 
JUnit Boot Camp (GeeCON 2016)
JUnit Boot Camp (GeeCON 2016)JUnit Boot Camp (GeeCON 2016)
JUnit Boot Camp (GeeCON 2016)
 
Deliberate Practice (2014)
Deliberate Practice (2014)Deliberate Practice (2014)
Deliberate Practice (2014)
 
Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)
 
Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)
 
Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)
 
Outside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDDOutside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDD
 
Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)
 
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)
 
Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)
 
How to code in the XXI century without losing your head
How to code in the XXI century without losing your headHow to code in the XXI century without losing your head
How to code in the XXI century without losing your head
 
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
 
Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)
 
Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)
 
Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)
 
Xtreme Programming
Xtreme ProgrammingXtreme Programming
Xtreme Programming
 
Clean application development (talk)
Clean application development (talk)Clean application development (talk)
Clean application development (talk)
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHP
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Pair Programming Benefits

  • 1. Pair Programming Ruby User Group Linz, May 2015 Peter Kofler, ‘Code Cop’ @codecopkofler www.code-cop.org Copyright Peter Kofler, licensed under CC-BY.
  • 2. Peter Kofler • Ph.D. (Appl. Math.) • Professional Software Developer for 15 years • “fanatic about code quality” • Freelance Code Mentor PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 4. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Yes, some but... ● only what is already there ● Trial & Error not popular in production ● no practice - only production ● time pressure
  • 5. I help development teams with PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY ● Professionalism ● Quality and Productivity ● Continuous Improvement
  • 6. Mentoring PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY ● Pair Programming ● Programming Workshops ● Deliberate Practice, e.g. Coding Dojos, Code Retreats ● Code Reviews, Architecture Discussions
  • 8. 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
  • 9. Enterprise CTO not impressed by pair programming. “We often have hundreds of developers working on the same thing.” (Hacker News Onion)
  • 10. What are the benefits? PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 11. 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
  • 12. “One disadvantage of pair programming: you have to go the toilet in pairs too :-)” (Zsolt Fabók)
  • 14. 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
  • 15. 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
  • 17. 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
  • 18. 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
  • 19. 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
  • 20. 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
  • 21. 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/
  • 22. 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/
  • 24. 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
  • 25. 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
  • 26. “In pair programming wait 15 seconds before you point out mistakes. Give your pair a chance to find it first.” (J. B. Rainsberger)
  • 27. 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
  • 28.
  • 29. 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
  • 30. Not for everyone ● Do I want to sit next to this person every day? ● In doubt raise your voice (don’t risk the project) PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 32. Learning Pair Programming ● by doing ● first in safe place outside work ● Coding Dojo ● Code Retreat PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 33. Practice Pair Programming PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 34. Constraint: Ping-Pong ● A writes a test and sees that it fails. ● B writes the code needed to pass the test. ● A or B refactors the code as needed. ● B writes next test and sees that it fails. ● A writes the code needed to pass the test. ● And so on. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 35. Selling Pairing to Management 1. Pairing on or critical defects/problems (Problem Pairing) 2. Pairing on important business features 3. Pairing more often (Regular Pairing) 4. More often, etc. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 37. When you work alone ● #PairWithMe, http://www.pairprogramwith.me/ ● Remote Pairing, e.g. https://www.softwerkskammer.org/groups/remotepairing ● maybe substitutes ● invite friend for review ● use static code analysis PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 38. “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)
  • 39. Peter Kofler @codecopkofler www.code-cop.org PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 40. CC Images ● driver http://www.flickr.com/photos/48694743@N00/517658329/ ● Hamster http://www.flickr.com/photos/zebrapares/4529836138 ● Bruce http://www.flickr.com/photos/sherpas428/4350620602/ ● 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/ ● ignition https://www.flickr.com/photos/billselak/391759360/ ● dojo http://www.flickr.com/photos/49715404@N00/3267627038/ ● Ping Pong https://www.flickr.com/photos/jasperfields/2442146122 PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY