SlideShare uma empresa Scribd logo
1 de 35
Pair Programming Styles
$whoami
• Attila Bertók
C# technical lead
• Contact:
• bertok.atti@gmail.com
• https://www.linkedin.com/in/bertokattila/
What?
• Comes from eXtreme Programming (Kent Beck, you might remember
the name by now)
• Mentioned in “Extreme Programming Explained: Embrace Change”
(1999)
• So ‘90s!
Even older than that
• in the 70's
• "Dynamic Duo" concept observed by Larry Constantine
• the guy who coined cohesion and coupling
• in the mid-50’s
• practiced by Fred Brooks
• Author of “The Mythical Man-Month”, IBM System/360 and OS/360 dev manager
Why?
“
Pair programmers: Keep each other on task. Brainstorm refinements to the
system. Clarify ideas. Take initiative when their partner is stuck, thus
lowering frustration. Hold each other accountable to the team’s practices.
”
[Kent Beck]
Why?
• Speeding up knowledge transfer
• Avoiding silos of knowledge, advocating better diffusion of knowledge
• Solving blockers faster
• Increasing code quality (acts as continuous code review)
• Shares the workload
When?
When?
• Always*.
*: well, almost always.
• Some trivial problems might not require two to work on
• Sometimes people can be more creative on their own
How?
• It needs to be done right.
• It requires a certain mindset.
• There is a learning curve.
How?
• One big screen (don’t do it on your laptop display)
• Desk that is comfortable for two
• Two keyboards (not joking, try it)
• Another team member (not only Developers! Do pair up with your
Tester or PO once in a while to get immediate testing feedback or
business feedback.)
Do
• PP instead of regular coding
• change roles often
• change pairs often
• pair with different people with different
seniority
• try to share knowledge (domain,
technical, practical) effectively
• ask the computer instead of arguing
(test your assumptions, or google
them)
• ask your peer if your idea makes sense
instead of telling them what to do
• suggest experiments instead of stating
a solution
• state clearly what is going to happen
before doing anything
• acknowledge useful information that
your peer tells you
• consider architectural or maintainability
suggestions
Don’t
• always enforce PP
• let management tell you if you
should do PP or not
• demand result ASAP
• tell your peer what to do, ask for
opinion instead
• leave your partner behind or let
yourself be left behind
• try to always be better than your
peer
• feel ashamed if your peer knows
something better
• make fun of your peer or assume
that your peer wants to test you
• have your code reviewed by your
peer
Pairing Strength
• Weak (traditional): anyone can
type (try two keyboards here)
• Strong: only on of the pair is
allowed to type
Pair Programming Is Like a Road Trip
Styles of Pair Programming
Roles
• Unstructured
• Driver / Navigator
• Driver / Backseat Navigator
• Driver / Tour Guide
• Ping / Pong
Pairing Strength
• Strong
• Weak
Unstructured
• No predefined roles, the two developers sit next to each other, decide
who’s typing, and away they code.
• Pairing strength determines who can type
Demo Time!
Driver / Navigator
• One developer is the Driver, who types, navigates between files, and does the
basic implementation (knows how to write a condition, a loop, etc.), explains the
Navigator the reasons behind the decisions taken regarding implementation
details.
• The other developer is the Navigator, who checks for mistakes, and looks at the
broad perspective (does the implementation fit architecturally? Is there a
possible refactoring opportunity?).
• Seniority Concerns: if the more experienced developer navigates, he might be
inclined to micromanage – make the more experienced participant drive! On the
other hand, knowledge retention might be better for the driver, so it might be
useful to let the less experienced participant drive.
Demo Time!
Driver / Backseat Navigator
• Classic Driver/Navigator setup
• The Navigator is a backseat driver, tells the Driver every little detail of
the solution in mind, as well as the reasons behind those decisions.
• Seniority Concerns: the more experienced member should be the
Navigator (and should explain details to the driver on the fly)!
• Something of a Knowledge sharing session as well.
Demo Time!
Tour Guide (Driver) / Tourist
• The Tour Guide is showing the Tourist around in the code, very much
like a code review (“just sit here next to me while I code this”)
• The Tour Guide types, explains concepts, rationale behind decisions,
etc.
• The Tourist has a passive role as an observer.
• Seniority Concerns: the more experienced developer should be the
Tour Guide. (The reverse is the Actor / Director style.)
Demo Time!
Actor (Driver) / Director
• One developer is the Actor, who tries to implement the whole solution,
takes care of both the tactical and the strategical concerns. The Actor might
ask questions to the Director, but is generally working alone.
• The other developer is the Director, who passively watches the Actor act
out the role (and possibly fail), then provides feedback (something like an
instant review).
• Seniority Concerns: the more experienced developer should be the
Director!
Demo Time!
Ping-Pong TDD
• One Developer writes a (failing) Unit Test.
• The other Developer makes the test pass.
• Roles might be switched more often than in other cases.
Demo Time!
Mob Programming
• Pair Programming extended to more than two people, even the whole
team (including Tester and PO)
• One person drives (writes the code)
• All the others are taking the other roles
Mob Programming, cont’d
• Participants are all involved and pay attention, they don’t leave the
room, don’t check their emails, etc.
• If one participant stops (bathroom break, coffee break) the whole
team stops
• Participants are encouraged to ask questions whenever they lose
context – if they fall behind, explaining things later will be more effort
Mob Programming, cont’d
• Driver should be changed more frequently then during PP, to keep
participants focused
Demo Time!
Q&A & Thank You!

Mais conteúdo relacionado

Mais procurados

Guerilla Usability Testing
Guerilla Usability TestingGuerilla Usability Testing
Guerilla Usability TestingInnoTech
 
Software Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code GamesSoftware Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code GamesMike Clement
 
Ux scot voice usability testing with woz - ar and sf - june 2019
Ux scot   voice usability testing with woz - ar and sf  - june 2019Ux scot   voice usability testing with woz - ar and sf  - june 2019
Ux scot voice usability testing with woz - ar and sf - june 2019User Vision
 
Pair programming
Pair programmingPair programming
Pair programmingthehoagie
 
An Overview of automated testing (1)
An Overview of automated testing (1)An Overview of automated testing (1)
An Overview of automated testing (1)Rodrigo Lopes
 
NEDCamp Base Theme Presentation
NEDCamp Base Theme PresentationNEDCamp Base Theme Presentation
NEDCamp Base Theme PresentationOomph, Inc.
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21Jordi Cabot
 
Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...
Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...
Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...Codemotion
 
Introduce Game Testing And QA
Introduce Game Testing And QAIntroduce Game Testing And QA
Introduce Game Testing And QAPham Anh Tuan
 
Software testing vs. Game testing
Software testing vs. Game testingSoftware testing vs. Game testing
Software testing vs. Game testingJohan Hoberg
 
Prototyping: A Component for Successful Projects
Prototyping: A Component for Successful ProjectsPrototyping: A Component for Successful Projects
Prototyping: A Component for Successful ProjectsChris Griffith
 
Code Review to the Rescue
Code Review to the RescueCode Review to the Rescue
Code Review to the RescueAndrei Sviridov
 
The Fundamentals of Continuous Software Design
The Fundamentals of Continuous Software DesignThe Fundamentals of Continuous Software Design
The Fundamentals of Continuous Software DesignJeremy Miller
 
Design of everyday things fundamental principles of interaction
Design of everyday things   fundamental principles of interactionDesign of everyday things   fundamental principles of interaction
Design of everyday things fundamental principles of interactionIsaac Liao
 

Mais procurados (20)

Guerilla Usability Testing
Guerilla Usability TestingGuerilla Usability Testing
Guerilla Usability Testing
 
Software Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code GamesSoftware Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code Games
 
Ux scot voice usability testing with woz - ar and sf - june 2019
Ux scot   voice usability testing with woz - ar and sf  - june 2019Ux scot   voice usability testing with woz - ar and sf  - june 2019
Ux scot voice usability testing with woz - ar and sf - june 2019
 
Autonomous Frontend Team
Autonomous Frontend TeamAutonomous Frontend Team
Autonomous Frontend Team
 
Pair programming
Pair programmingPair programming
Pair programming
 
An Overview of automated testing (1)
An Overview of automated testing (1)An Overview of automated testing (1)
An Overview of automated testing (1)
 
NEDCamp Base Theme Presentation
NEDCamp Base Theme PresentationNEDCamp Base Theme Presentation
NEDCamp Base Theme Presentation
 
Blogs
BlogsBlogs
Blogs
 
Video summaries (1)
Video summaries (1)Video summaries (1)
Video summaries (1)
 
Video summaries
Video summariesVideo summaries
Video summaries
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21
 
Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...
Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...
Graham McAllister - UX Lessons from Indie Game Development - Codemotion Rome ...
 
Introduce Game Testing And QA
Introduce Game Testing And QAIntroduce Game Testing And QA
Introduce Game Testing And QA
 
Software testing vs. Game testing
Software testing vs. Game testingSoftware testing vs. Game testing
Software testing vs. Game testing
 
Prototyping: A Component for Successful Projects
Prototyping: A Component for Successful ProjectsPrototyping: A Component for Successful Projects
Prototyping: A Component for Successful Projects
 
Code Review to the Rescue
Code Review to the RescueCode Review to the Rescue
Code Review to the Rescue
 
The Fundamentals of Continuous Software Design
The Fundamentals of Continuous Software DesignThe Fundamentals of Continuous Software Design
The Fundamentals of Continuous Software Design
 
Design of everyday things fundamental principles of interaction
Design of everyday things   fundamental principles of interactionDesign of everyday things   fundamental principles of interaction
Design of everyday things fundamental principles of interaction
 
Editing your Doc
Editing your DocEditing your Doc
Editing your Doc
 
Question 4
Question 4Question 4
Question 4
 

Semelhante a Pair Programming Styles

Introducing Pair Programming
Introducing Pair ProgrammingIntroducing Pair Programming
Introducing Pair ProgrammingSteven Smith
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)Mike Harris
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): RevistedMike Harris
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)Nacho Cougil
 
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)ssusercaf6c1
 
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)Nacho Cougil
 
Pair Programming
Pair ProgrammingPair Programming
Pair ProgrammingJazzSodhi
 
Tips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech LeadTips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech LeadBen Limmer
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software DevelopmentAhmet Bulut
 
Demystifying pair programming, swarming and mob programming - Shrikant Vashis...
Demystifying pair programming, swarming and mob programming - Shrikant Vashis...Demystifying pair programming, swarming and mob programming - Shrikant Vashis...
Demystifying pair programming, swarming and mob programming - Shrikant Vashis...Technical Agility institute
 
Dancing for a product release
Dancing for a product releaseDancing for a product release
Dancing for a product releaseLaurent Cerveau
 
Getting Started with Architecture Decision Records
Getting Started with Architecture Decision RecordsGetting Started with Architecture Decision Records
Getting Started with Architecture Decision RecordsMichael Keeling
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekNacho Cougil
 
Code reviews: a short introduction
Code reviews: a short introductionCode reviews: a short introduction
Code reviews: a short introductionFreekDB
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012Alan Christensen
 
Development Environment Tips
Development Environment TipsDevelopment Environment Tips
Development Environment TipsAdam Culp
 
Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)David Benjamin
 
Kata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipKata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipCamille Bell
 
Picking the right architecture and sticking to it
Picking the right architecture and sticking to itPicking the right architecture and sticking to it
Picking the right architecture and sticking to itPetter Holmström
 

Semelhante a Pair Programming Styles (20)

Introducing Pair Programming
Introducing Pair ProgrammingIntroducing Pair Programming
Introducing Pair Programming
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)
 
It's XP, Stupid
It's XP, StupidIt's XP, Stupid
It's XP, Stupid
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
 
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
 
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
 
Pair Programming
Pair ProgrammingPair Programming
Pair Programming
 
Tips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech LeadTips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech Lead
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Demystifying pair programming, swarming and mob programming - Shrikant Vashis...
Demystifying pair programming, swarming and mob programming - Shrikant Vashis...Demystifying pair programming, swarming and mob programming - Shrikant Vashis...
Demystifying pair programming, swarming and mob programming - Shrikant Vashis...
 
Dancing for a product release
Dancing for a product releaseDancing for a product release
Dancing for a product release
 
Getting Started with Architecture Decision Records
Getting Started with Architecture Decision RecordsGetting Started with Architecture Decision Records
Getting Started with Architecture Decision Records
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech Week
 
Code reviews: a short introduction
Code reviews: a short introductionCode reviews: a short introduction
Code reviews: a short introduction
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
 
Development Environment Tips
Development Environment TipsDevelopment Environment Tips
Development Environment Tips
 
Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)
 
Kata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipKata Your Way to SW Craftsmanship
Kata Your Way to SW Craftsmanship
 
Picking the right architecture and sticking to it
Picking the right architecture and sticking to itPicking the right architecture and sticking to it
Picking the right architecture and sticking to it
 

Último

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
 
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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Último (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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!
 
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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Pair Programming Styles

  • 2. $whoami • Attila Bertók C# technical lead • Contact: • bertok.atti@gmail.com • https://www.linkedin.com/in/bertokattila/
  • 3. What? • Comes from eXtreme Programming (Kent Beck, you might remember the name by now) • Mentioned in “Extreme Programming Explained: Embrace Change” (1999) • So ‘90s!
  • 4. Even older than that • in the 70's • "Dynamic Duo" concept observed by Larry Constantine • the guy who coined cohesion and coupling • in the mid-50’s • practiced by Fred Brooks • Author of “The Mythical Man-Month”, IBM System/360 and OS/360 dev manager
  • 5. Why? “ Pair programmers: Keep each other on task. Brainstorm refinements to the system. Clarify ideas. Take initiative when their partner is stuck, thus lowering frustration. Hold each other accountable to the team’s practices. ” [Kent Beck]
  • 6. Why? • Speeding up knowledge transfer • Avoiding silos of knowledge, advocating better diffusion of knowledge • Solving blockers faster • Increasing code quality (acts as continuous code review) • Shares the workload
  • 8.
  • 9. When? • Always*. *: well, almost always. • Some trivial problems might not require two to work on • Sometimes people can be more creative on their own
  • 10. How? • It needs to be done right. • It requires a certain mindset. • There is a learning curve.
  • 11.
  • 12. How? • One big screen (don’t do it on your laptop display) • Desk that is comfortable for two • Two keyboards (not joking, try it) • Another team member (not only Developers! Do pair up with your Tester or PO once in a while to get immediate testing feedback or business feedback.)
  • 13. Do • PP instead of regular coding • change roles often • change pairs often • pair with different people with different seniority • try to share knowledge (domain, technical, practical) effectively • ask the computer instead of arguing (test your assumptions, or google them) • ask your peer if your idea makes sense instead of telling them what to do • suggest experiments instead of stating a solution • state clearly what is going to happen before doing anything • acknowledge useful information that your peer tells you • consider architectural or maintainability suggestions
  • 14. Don’t • always enforce PP • let management tell you if you should do PP or not • demand result ASAP • tell your peer what to do, ask for opinion instead • leave your partner behind or let yourself be left behind • try to always be better than your peer • feel ashamed if your peer knows something better • make fun of your peer or assume that your peer wants to test you • have your code reviewed by your peer
  • 15. Pairing Strength • Weak (traditional): anyone can type (try two keyboards here) • Strong: only on of the pair is allowed to type
  • 16. Pair Programming Is Like a Road Trip
  • 17.
  • 18. Styles of Pair Programming Roles • Unstructured • Driver / Navigator • Driver / Backseat Navigator • Driver / Tour Guide • Ping / Pong Pairing Strength • Strong • Weak
  • 19. Unstructured • No predefined roles, the two developers sit next to each other, decide who’s typing, and away they code. • Pairing strength determines who can type
  • 21. Driver / Navigator • One developer is the Driver, who types, navigates between files, and does the basic implementation (knows how to write a condition, a loop, etc.), explains the Navigator the reasons behind the decisions taken regarding implementation details. • The other developer is the Navigator, who checks for mistakes, and looks at the broad perspective (does the implementation fit architecturally? Is there a possible refactoring opportunity?). • Seniority Concerns: if the more experienced developer navigates, he might be inclined to micromanage – make the more experienced participant drive! On the other hand, knowledge retention might be better for the driver, so it might be useful to let the less experienced participant drive.
  • 23. Driver / Backseat Navigator • Classic Driver/Navigator setup • The Navigator is a backseat driver, tells the Driver every little detail of the solution in mind, as well as the reasons behind those decisions. • Seniority Concerns: the more experienced member should be the Navigator (and should explain details to the driver on the fly)! • Something of a Knowledge sharing session as well.
  • 25. Tour Guide (Driver) / Tourist • The Tour Guide is showing the Tourist around in the code, very much like a code review (“just sit here next to me while I code this”) • The Tour Guide types, explains concepts, rationale behind decisions, etc. • The Tourist has a passive role as an observer. • Seniority Concerns: the more experienced developer should be the Tour Guide. (The reverse is the Actor / Director style.)
  • 27. Actor (Driver) / Director • One developer is the Actor, who tries to implement the whole solution, takes care of both the tactical and the strategical concerns. The Actor might ask questions to the Director, but is generally working alone. • The other developer is the Director, who passively watches the Actor act out the role (and possibly fail), then provides feedback (something like an instant review). • Seniority Concerns: the more experienced developer should be the Director!
  • 29. Ping-Pong TDD • One Developer writes a (failing) Unit Test. • The other Developer makes the test pass. • Roles might be switched more often than in other cases.
  • 31. Mob Programming • Pair Programming extended to more than two people, even the whole team (including Tester and PO) • One person drives (writes the code) • All the others are taking the other roles
  • 32. Mob Programming, cont’d • Participants are all involved and pay attention, they don’t leave the room, don’t check their emails, etc. • If one participant stops (bathroom break, coffee break) the whole team stops • Participants are encouraged to ask questions whenever they lose context – if they fall behind, explaining things later will be more effort
  • 33. Mob Programming, cont’d • Driver should be changed more frequently then during PP, to keep participants focused
  • 35. Q&A & Thank You!