Tag Archives: Pair-programming

What is pair programming?

Pair Programming

Blog post series

This blog post is part of a series about pair programming games. To read about more please click see more sessions on pair programming games.

About

Pair programming is a technique in which two programmers work together to solve a task. They work on one computer, ideally each having their own keyboard in front of them.
There are two roles: driver and navigator.

The driver writes the code and takes the short time decisions. The driver should trust the navigator totally for the long term decisions.

The navigator reads the code of the driver and gives meaningful suggestions on how the code could be better. Also the navigator focuses on the long term decisions and thinks the strategic direction the code moves to.

Both the driver and the navigator need to verbalize their actions and concerns and to speak on the code.

cat-pair-programming

Read More →

Pair-programming game: ping-pong

Ping Pong Pair Programming

Blog post series

This blog post is part of a series about pair-programming games. To read about more please click see more sessions on pair-programming games.

Purposes

  • Learn pair-programming easier
  • Force the “know-it-all” programmer to see other ways of writing code
  • Force the “know-it-all” programmer to collaborate more
  • Push for collective code ownership

Concept

The roles driver and navigator change often inside the pair.
This activity is like a game of ping-pong of the roles between the two members of the pair. They both can take short time decisions while being a driver and can spot strategic design decisions while being a navigator.
Refactoring can be made by any of the programmers on their turn, but only when the code and the tests are stable.

ping-pong

Read More →

Brutal Refactoring Game

Brutal Refactoring Game

I wrote a post on the history of Brutal Refactoring Game, you can read it here.

In this blog post I want to tell you more about the workshop and about my experiences while facilitating it. Also I will add some tips for facilitators that want to try themselves this workshop.

The purpose of this workshop is learn what refactoring is, why it is so important to do refactoring often and immediately after you spot some coding smells. Often I ask programmers “when are you doing refactoring?”. The question has a vast number of answers from “when I think I need to”, to “once a month” to something like “every couple of tests”. But seldom I hear that programmers do refactoring all the time, in the minute the tests had passed from red to green”. This is where the format comes into place.

Brutal Refactoring Game

Brutal Refactoring Game

Read More →

Taking Baby Steps

Taking Baby Steps

I wrote a post on the history of Taking Baby Steps, you can read it here.

Now I would like to tell you more about the workshop and the technique itself. While coding, for me it is very important to be focused on one idea. Why? Because this is how programmer mistakes appear in the code; some people tell them bugs. The other thing I am interested in is to have an undo button for every change. This is why I want to commit every 1-2 minutes.

The rules are the following:

Steps

  1. Setup source control repository.

  2. Setup a timer for 2 minutes interval when you start.

  3. Write exactly one test

    1. If the timer rings and the test is red then revert and start over.

    2. If the test is green before timer rings then commit.

  4. Restart timer (no discussions in between timers)

  5. Refactor

    1. If the timer rings and the refactoring is not complete then revert and start over.

    2. If the refactoring is complete before the timer rings then commit.

  6. Restart the timer (no discussions in between timers)

  7. Go to 3.

  8. When session time is up delete the code.

Read More →

Teddy bear pair programming

Teddy Bear Pair Programming

Blog post series

This blog post is part of a series about pair-programming games. To read about more please click see more sessions on pair-programming games.

Concept

Scenario: You are having an issue and you don’t know how to solve it. You tell someone “Hey, can you help me? Let me tell you my problem!”. You start telling the problem, your conversation partner doesn’t say a word and you say “Yeees, this is it! That’s the solution. Thanks for helping me!”. But you had in fact just a monologue, and you found the solution for yourself.

What if, instead of talking to a human being, you had a constant partner whom you would explain your problems like it were a human being. This is how my teddy bear helps me:

Teddy Bear Pair Programming

Teddy Bear Pair Programming

Read More →