Skip to content

Instantly share code, notes, and snippets.

@M7
Created March 25, 2014 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M7/9770896 to your computer and use it in GitHub Desktop.
Save M7/9770896 to your computer and use it in GitHub Desktop.
Ottawa Ruby Pair Programming Meetup Guide - March 2014

Ottawa Ruby Pair Programming Meetup Guide

1. So, what are we doing tonight?

We're going to be going through the exercises at exercism.io, with two twists:

  1. You'll be writing you own tests (exercism.io gives you tests, but you'll be ignoring them)
  2. We'll be Pairing up to do them.

For the pairing, we'll be using a method known as "Ping Pong Pairing," so that each pair gets to write both tests and code, and it's more clear when the "driver" should switch to another person.

2. What's this Ping Pong Pairing?

Here's an elegant description, from the c2.com wiki:


  1. A writes a new test and sees that it fails.
  2. B implements the code needed to pass the test.
  3. B writes the next test and sees that it fails.
  4. A implements the code needed to pass the test.

And so on. Refactoring is done whenever the need arises by whoever is driving.


3. How do I get started?

  1. Head on over to exercism.io
  2. Click the "Start Now (via Github) button
  3. Follow the instructions

4. And if I don't want to / can't sign up for exercism.io?

If you don't want to sign up, or if you don't have a Github account, you have two options

  1. Ask your pair to sign up and you can use their computer instead.
  2. The other option is to follow the instructions on the homepage in the "Try It!" section. It'll walk you through how to do at least the first exercise without signing up.

5. What if I'm on Windows?

Don't worry, there's a Windows client. You can download the appropriate file from here (follow the instructions on that page).

If you don't want to use that binary, you can signup for a nitrous.io account and install it on your free Linux box.

6. How do I pair up?

You can either

  1. Ask your neighbour if they're up for pairing, or
  2. Await further instructions and we'll pair you up.

7. What should I focus on with my code?

Here are a few tips

  1. Single Responsibility (should extend to methods as well)
    • E.g., Extract responsibilities into classes, where appropriate. If you notice a method is getting kind of long, chances are you should split some code into a separate method.
  2. Descriptive names for methods, variables and classes
  3. Extract functionality into methods where appropriate
  4. Favour simplicity and readability

8. What do we do when we think we're done?

  1. First, run the original set of tests given by exercism.io. For example, for the Bob exercise:

ruby bob_test.rb

  1. Raise your hand to get the attention of a Code Reviewer. Someone will come over for a review.

9. Questions?

Please feel free to let us know if you have any questions. Other than that, have fun! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment