SlideServe
Menu
Préférences
© SlideServe · v2026

Pair Programming

brady-key avatar
14 diapositives · 378 Views · Nov 27, 2014

Pair Programming. XP Rule of Thumb. “When something is difficult or painful, do it more often until it becomes easier .”. Roles. Driver Controls mouse and keyboard Navigator/Observer Actively reads and reviews code while it is being written Thinks about the bigger picture

Pair Programming - slide 1
01 / 14Pair Programming
1 / 17

Télécharger la présentation

Pair Programming
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Pair Programming

  2. XP Rule of Thumb “When something is difficult or painful, do it more often until it becomes easier.”

  3. Roles • Driver • Controls mouse and keyboard • Navigator/Observer • Actively reads and reviews code while it is being written • Thinks about the bigger picture • Provides strategic direction • Help ensure quality and minimise defects • Switch frequently

  4. Rules • All production code must be developed by a pair • Conversely, this means that are plenty of other activities that you can undertake in the absence of a pair. • It's not one person doing all the work and another watching • Keyboard should be moving back and forth between the two participants several times an hour • Don’t pair for more than 75% of the day • Switch pairs frequently • At least daily

  5. Guidelines

  6. Start with a defined task • The task should be something you are confident that you can complete in an hour or two

  7. Agree on one tiny goal at a time • Something you can complete in minutes • Ping pong with red, green, refactor works well

  8. Talk lots! • When people are pairing well, they are talking back and forth almost non-stop. • Stating the problem in words to another person helps focus your mind and helps engage your partner's mind. It also ensures that you both know what you are working on right now. • Here are some common things to say while pairing: • Do you think this is a valid test? • Does that look correct to you? • What’s next? • Trust me (when writing code to illustrate your point rather than trying to explain)

  9. Rely on and support your partner • Driver • Complete current goal (tiny task) as quickly as possible • Trust the observer to notice larger issues • Observer • Pay attention • Think about possible bugs, larger issues, and ways to simplify or improve the design. • Bring up errors and code that you find unreadable right away. • Bring up larger issues and ideas for design improvement after the driver is done. • Jot later tasks down so that driver can stay focused.

  10. Sync frequently • It is normal to get out of sync • Be unsure of what your partner is doing • Be unclear on the current (tiny) task • When it happens, TALK and sync up again

  11. Celebrate • Celebrate completed tasks and overcome problems, e.g. • High five when a test passes • High five when you write failing test

  12. Switch roles often • At least every half an hour

  13. Red, Green, Refactor

  14. Suggested: Driver writes failing test Switch roles New driver writes code to help test pass Chat about what can be refactored and make changes together Driver writes next failing test Switch roles Loop