Skip to main content

Pairing techniques

This week my colleague Guilherme Motta and I did a presentation about Pair Programming, that were really fun, we learned a lot. During our research I noticed that there are few posts, wikis or sites about Pairing Practices, so I'm sharing with you some practices that we found.


Ping Pong


In this technique the first programmer writes a minimal failing unit test, the second programmer modifies the code to pass the unit test(s) than the second programmer writes a new minimal failing unit test and gave the keyboard back to first programmer, and so on. This loop continues as long as any programmer is able to write failing unit tests. The technique can result in the driver role switching as often as a few minutes or less.
Pros: CV taught me this one and was really fun, because you don't have to discuss a lot, although you keep conflicting the programmer's ideas.  
Cons: I don't know.


Chess Clock


Using a chess clock the pair define a time interval to each one be the driver, when the clock rings the pair switch theirs positions.
Pros: Ensure that each programmer get the keyboard.
Cons: It can be inconvenient to pass the keyboard in the middle of a method or idea.


10-second rule


The navigator should wait 10 seconds before pointing out a typo. Generally that’s long enough for the driver to correct a typo that’s already noticed. Excessive interruptions are distracting.
Pros: No one get nervous.
Cons: It sucks if you are the navigator.


Think Out Loud


The driver “thinks out loud” as he/she’s coding. This helps keep the navigator in the loop, and communicates the intent better. It’s certainly not a technique that most people practice without suggestion, however.
Pros: Pair is about conflicting ideas and talk is a good way to say what you are think about.
Cons: You may strain your vocal cords.


Sharing the ppt...





Comments

Popular posts from this blog

Page Object Pattern + WebDriver + Spring

During the last week I had start creating a test suite for a existing web-application which my team is currently working on. So now is good time to share some experience: The application A normal old java web application: Java 1.4, Struts 1.1, EJB 2.1, JDBC to persist the data and the anemic design (VO+BO+DAO) but I will talk about in another post... Page Object Pattern To map the web page's components inside the test code I used the page object pattern. This patterns helped me to eliminate duplicated code to access web-page's components. Basically it consists of classes that maps web-pages, so that if you want to fill a login form from your test classes instead of doing this: @Test public void someTest() throws Exception { WebElement userNameField = driver.findElement(By.name("j_username")); userNameField.sendKeys(username); WebElement passwordField = driver.findElement(By.name("j_password")); passwordField

Thunderbird with Microsoft OWA in Ubuntu 11.10

So, you as I are tired of Evolution's problems in Ubuntu 11.10 ? Move on to Thunderbird... To have it working with Microsoft OWA following the these steps: Install DavMail Download and install  DavMail . It will act as a proxy between Thunderbird and your Microsoft webmail. Configure DavMail Some tips:  Exchange 2003: https://mail.company.com/exchange/ Exchange 2007 Webdav mode: https://mail.company.com/owa/ Exchange 2007 EWS mode: https://mail.company.com/owa/ Exchange 2010 EWS mode: https://mail.company.com/owa/ Exchange 2010 EWS mode with unsupported authentication form e.g. Windows Live login:https://mail.company.com/ews/exchange.asmx In my case as I'm behind a proxy I had to mark the option "Use system proxy settings" in the Proxy tab: Click save then you should see a message in your system tray, saying that DavMail is correctly configured. Configuring Thunderbird In Thunderbird main window click menu Fil

How to avoid losing a unused terminal command line

This morning I got a great tip... I typed a command in my terminal but I wanted to run another command before executing the line that I just typed without loosing the information in the current line. For instance: I typed in my terminal the command: git commit -am "Unit test for scenarios A, B and C" But I was not sure if I was committing just the scenarios A, B and C that I have changed, I would like to run a git diff before committing but also without losing my committing message... Then my friend Duck told me to put a # in the begging of the line and...  voilà! # git commit -am "Unit test for scenarios A, B and C" It transform the line in a comment, so that I could hit enter without executing the commit and that line went to my history so that I could recovery it. Thanks Duck.