Ping-pong programming

java, ping-pong programming, Joker 2015
 Ping-pong programming

Ardecs employees participated in a well-known Java-conference Joker in October 2015. The conference is held in St. Petersburg the third time and it brings together the best Java-speakers from around the world, urgent and trendy topics, hundreds of programmers from all over the Java-Russian-speaking world.

Among all the presented reports, the most memorable one for us was the performance  by A. Keks and A. Solntsev, who are known for their researches on Java ,TDD and methods of software development. They talked about the "ping-pong programming" - the art of writing code that combines elements of TDD and pair programming.

The demonstration of performance process of "ping-pong programming", performed by Anton Keks and Anton Arkhipov at one of DevClub meeting:

The essence of this method is that the code is created by pairs of people performing the same task. They share one job. One person is a "leader" in the pair, being in charge of computing and considering the details of the coding. Another one ("Navigator") is focused on the picture in general and constantly scans the code produced by the first programmer. The task is divided into small steps. Each step includes writing the test by the first programmer and writing the functional part, software, by the second programmer. Then roles reverse.

Inspired by the idea of "ping-pong programming", the whole Ardecs team has decided to try pair programming in practice. For this purpose, we wrote a small test project. Since this was our first experience, we had a simple task – to write an emulator of a turtle in the maze, which can move in four directions. In the beginning of the project we faced the challenge: we had to overcome a habit to work alone. And this is not a surprise, since for the successful use of ping-pong programming method, it is important to take psychological compatibility of partners into account. But then there an interest and competition arose. During the work we discussed interesting ideas and suggestions, wrote tests, and gradually created the basic functionality of the system. As a result of the use of TDD we’ve got the product that is completely covered by tests, its functionality has been tested at the level of unit-tests, created blocks correspond to the principles SOLID. Working in tandem has allowed us to share our thoughts on the written code and the requirements for its design, and co-development has brought us a lot of positive emotions.

In our opinion, "ping-pong programming" is an effective practice to write code. We recommend to all programmers to try to apply it in the process of software development.

 PreviousNext