DEV Community

Gustavo Santos
Gustavo Santos

Posted on

How to do Ping-Pong pair programming in a remote environment

Ping-pong is a pair programming technique where two programmers work together to solve a problem. It could be implementing a new feature, fixing a bug, etc.

The difference from this technique to other common techniques like the driver/navigator through Google Meet is that, in the Ping-Pong pair programming session, a programmer start writing a test. With the test failing, the other programmer write code to pass the test. After getting green, the second programmer write a new failing test that the first programmer need to implement the code to make that test pass.

The cycle then repeat until both programmers achieve the initial goal.

Why ping-pong pair programming is a thing in remote environment?

Personally, I feel more connected with my working partner when working in this way. We can debate about how to implement the code, about how the code will communicate with the system and how well tested the new feature/bug fix is.

Also, writing test first gives you more guides about what you need to do and set clear expectations about the code.

To do that, we need some tools. I think that the most used today is VSCode Live Share, where we can share a coding session that include server tunneling and access to the host terminal. It is very useful to put the tests running in the terminal and just write code together.

JetBrains had a tool integrated to its IDEs called Code with Me. I never used, but it looks spectacular by the outside view.

Alongside those tools, we have a bunch of other shared programming environments like Codesandbox.

Either way, working together with some other person in a remote environment is great! Thoughtbox had an excellent video teaching the hows with a live example.

Also, Tuple guys published a blog post about antipatterns that should be avoided when pairing.

Discussion (0)