Pair Programming - A Tarot


Published on

This deck is a set of slides I presented at the Java Posse Roundup 2012. It is wholly based on the XP pair programming idioms located at I just added the pictures.

Published in: Technology, Spiritual, Education
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Have a question parking lot – so we stick to Pairing, and don’t tread on TDD’s toes In the exercise, pick two-three Rule cards and stick to them, or get people to explicitly break one of the rules and see what happens...
  • “ All code to be sent into production is created by two people working together at a single computer. Pair programming increases software quality without impacting time to deliver. ” (from ) It is counter intuitive, but 2 people working at a single computer will add as much functionality as two working separately except that it will be much higher in quality. With increased quality comes big savings later in the project.
  • “ The best way to pair program is to just sit side by side in front of the monitor. Slide the key board and mouse back and forth. Both programmers concentrate on the code being written.” (from ) Also have a pad and pen, or a whiteboard next to you. In a very simple way, this is all Pair Programming is. There are however, complexities...
  • Better code – increase quality Better design Simpler design Less likely to fall into a time sink Inline code-review TDD / Process conscience Big Red Bus More fun
  • “ Pair programming is a social skill that takes time to learn. You are striving for a cooperative way to work that includes give and take from both partners regardless of corporate status.” (from ) The best pair programmers know when to say "let's try your idea first." Don't expect people to be good at it from the start. It helps if you have someone on your team with experience to show everyone what it should feel like. Hopefully we’ll be able to convey this to you on this course.
  • “ One thing pair programming is not is mentoring. A teacher-student relationship feels very different from two people working together as equals even if one has significantly more experience.” (from ) It takes time to get used to pair programming so don't worry if it feels awkward at first.
  • Internal - Humility External - Collaboration Some are split between the Driver and the Navigator Many drive out a Shared Mental Model (you needn’t agree on it, but you do need to explicitly disagree)
  • “ The person at the keyboard is allowed to make mistakes. Don't point out small errors until the driver completes typing out his thoughts and pauses to look over what has been typed. Even then you should wait a bit to see if the mistake gets fixed. Keep your thoughts on the bigger picture and let the driver worry over details.” (from: ) E.g. don’t point out spelling mistakes / syntax errors until the line is complete, at the very least. Capture it on the TDD list if you see it. Don’t break their flow. This is REALLY HARD
  • “ If you are wailing away on the keyboard and text is jumping from here to there and the whole time your partner is lost then you need to slow down. Try using the mouse more to help you slow down and keep your partner in the loop.” (from: )
  • “ You have two perfectly good ideas but you are arguing about which is better. Break the stale mate by agreeing to try your partner's idea first” (from: )
  • “ If you find one of the two of you stops paying attention split the responsibilities by letting one programmer write the tests while the other writes the code” (from: ) E.g. write a test which will break the code just written
  • “ Your partner is convinced he knows something is true but you know it is false. Do not actually use a brick, instead write the simplest experiment or prototype to get your partner's thoughts unstuck” (from: )
  • “ You need to be able to tell your pair partner the truth. Some of the best partners argue much of the time. You loose many of the benefits of working together if you feel like you can't say when something is bad. Make a deal to always be honest even if your partner has seniority or is a higher rank.” (from: )
  • “ What you are saying isn't being understood by your partner. Switch to a different mode of explanation by taking over the keyboard or moving away from the computer completely. Perhaps try some Agile Modelling for a short time.” (from: )
  • “ You are arguing about your ideas and both of you are convinced you are right. Neither of you is willing to apply Let's Try Your Idea First. You can agree to throw away both ideas and find a third idea that may end up being a hybrid or completely new. Often the third idea is much better than either” (from: )
  • “ It is hard to abandon something that has almost worked perfectly for the last hour. Just one more small change it will work, then one more after that... One of you must see the sense in throwing it away and starting over fresh. Even if you can obviously fix it with just one more little change.” (from: ) Shouldn’t get to this. Last resort.
  • “ It is easy to get caught up in writing code and forget the rules. One of you must keep your wits about you and remind the other to follow the rules.” (from: )
  • Put a TODO list in your code Keep focussed, but don’t forget Estimate to the next goal Split things down into meaningful, manageable chunks Don’t start in the middle Work your way in from the edge Shelving in IntelliJ / use of SCM
  • It’s less efficient Lower defect count, rework, simplicity, KT, inline review, quality I’m not social / I like my cave Development on all CG projects is collaborative I don’t have the time Slow down, go faster, less rework It’s too simple Weigh it up
  • Should play back into why to do it and the benefits therein Did you like it / not like it - Why ? Do you think “it took longer than if I'd done it on my own”? Did you end up with better software? How did you find thinking 1 level up? Do you think this fosters collective code ownership? How does it feel when you are pair programming? Do you have to be sat next to each other? Does it have to be two developers?  What about pairing with BAs or Testers? How would you feel if [Pattern A] was done to you?
  • Pair Programming - A Tarot

    1. 1. A Pair Programming Tarot (Apologies to Agnes Varda) Image from:
    2. 2. What is Pair Programming? Image from
    3. 3. How to Pair Program Image from: Agnes Vardas film “Cleo de 5 a 7”
    4. 4. Why Pair Program? Image from:
    5. 5. WARNING:Pair Programming is Social Image from:
    6. 6. Pair Programming is not Teaching Image from: http://noamygdalanofear.tumb
    7. 7. The Rules (Part One)  No Back Seat Driving  Its Not a Race  Lets Try Your Idea FirstNO BACKSEAT DRIVING. IT ISN’T A RACE. LETS TRY YOUR IDEA FIRST. Tarot Card Images from:
    8. 8. The Rules Tarot Card Image from:
    9. 9. Pair Programming Rule: No Backseat Driving NO BACKSEAT DRIVING. Tarot Card Image from:
    10. 10. Pair Programming Rule: It Isn’t a Race IT ISNT A RACE. Tarot Card Image from:
    11. 11. Pair Programming Rule:Let’s Try Your Idea First LETS TRY YOUR IDEA FIRST. Tarot Card Image from:
    12. 12. Pair Programming The Next Level
    13. 13. The Rules (Part One Reminder)  Its Not a Race  No Back Seat Driving  Lets Try Your Idea First NO BACKSEAT DRIVING. IT ISN’T A RACE. LETS TRY YOUR IDEA FIRST. Tarot Card Images from:
    14. 14. The Rules (Part Two)• Ping Pong• Brick to the Head• Your Baby is Ugly PING PONG. BRICK TO THE HEAD.• That Isnt What I Said YOUR BABY IS UGLY.• Im Going to Cut You Off Now• None of the Above ISNT WHAT I SAID. I’M CUTTING YOU OFF. NONE OF THE ABOVE. Tarot Card Images from:
    15. 15. Pair Programming Rule: Ping-Pong PING PONG. Tarot Card Image from:
    16. 16. Pair Programming Rule: Brick to the Head BRICK TO THE HEAD. Tarot Card Image from:
    17. 17. Pair Programming Rule: Your Baby is Ugly YOUR BABY IS UGLY. Tarot Card Image from:
    18. 18. Pair Programming Rules: That Isn’t What I Said THAT ISNT WHAT I SAID. Tarot Card Image from:
    19. 19. Pair Programming Rules: None of the Above NONE OF THE ABOVE. Tarot Card Image from:
    20. 20. Pair Programming Rule:I Am Cutting You Off Now I AM CUTTING YOU OFF NOW. Tarot Card Image from:
    21. 21. Pair Programming Rule: Remember the Rules REMEMBER THE RULES. Tarot Card Image from:
    22. 22. Other Tips Image from:
    23. 23. Remote Pairing• GIMS+ Image from:
    24. 24. Counter-Arguments Image fro m:
    25. 25. Thank You Image fro m:
    26. 26. Retrospective / Discussion Points Image fro m: