Session

Whose Line of Code Is It Anyway?

You might know the game of ping-pong, aka table tennis. You might know pair programming. But have you ever thought of putting them together? No, we don't pass the keyboard by smacking it with a paddle. It's much less violent and more useful than that, as a technique to combine pairing and test-driven development (not really ping-pong) in a fun way.

This talk will demonstrate Ping-Pong Pair Programming, on a problem chosen by the audience, in a language chosen by the audience. If time allows, we will also demonstrate "Smart@$$" Ping-Pong Pair Programming, in which each dev tries to force the other into doing the actual hard work.

I can do this as a normal breakout session, or if you want, I could possibly turn it into a workshop.

Prior knowledge needed: only basic concepts of unit testing, as I will explain TDD and pairing (and ping-pong). Though there are a variety of languages the demo could be done in, all are fairly English-like and should be reasonably understandable to all devs.

Ideally this has two speakers (other one TBD), but I can alternately take a volunteer from the audience, or a series of them.

The concept is language/technology-agnostic, so it could go at an agnostic conf or one centered around any language. If your conference is about a language I don't know, I can probably learn it (and its typical testing tools) at least enough to pair up with someone who does, so I can still do the talk at your conference.

This has been submitted to some conferences, but not yet accepted (nor rejected), let alone performed. I have several potential co-speakers, and even if none of them are available, I could use a volunteer from the audience, or maybe multiple of them.

The rough outline so far:

- Very briefly recap what are ping-pong, pair programming (mentioning test-driven development), and TDD.

- Ask the audience what language they want us to work in, from among those (up to four or so) that my co-speaker and I have in common. (Or if I couldn't recruit a co-speaker, just those I'm ready to do.)

- Ask the audience which of a few different fairly simple functions to code up using this technique, or maybe additional suggestions. Candidates so far include "FizzBuzz response for one number" and "next state of a cell in Conway's Game of Life, given its current state and number of neighbors". We may do multiple if time allows.

- DO IT!

- Recap good/bad parts of that experience.

- If time allows, demonstrate "Smart@$$" Ping-Pong Pair Programming, in which each dev tries to make the other do the "real work", by writing a test that can only be made to pass that way, while also trying to *avoid* doing the "real work" by writing code that passes all tests so far BUT is even simpler.

Dave Aronson

T. Rex at Codosaurus, LLC

Fairfax, Virginia, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top