code-quality

Ping Pong Pair Programming

An ExtremeProgrammingPractice in which two engineers participate in one development effort at one workstation. Each member performs the action the other is not currently doing.

Ping Pong Pair Programming

Pair Programming

Pair Programming Pair programming is an extreme programming practice in which two engineers participate in one development effort at one workstation. Each member performs the action the other is not currently doing.

Ping Pong Pattern

This is an example flow for ping pong pair programming:

  • A writes a new test and sees that it fails.
  • B implements the code needed to pass the test.
  • B writes the next test and sees that it fails.
  • A implements the code needed to pass the test.

Ping Pong Pattern as tool to practice TDD

I think Ping Pong pair programming can be most effectively used to learn TDD. Main challenge faced by any developer while learning TDD is his need to re-orient the way he solves problem. For TDD one has to analyse what to test rather than how to fix the problem.

Applying ping pong pattern, one developer will write test cases and push it in one branch, his partner will pull that and test branch and write code to pass the test. Then the one who wrote test can verify/qa the feature.

That’s only half cycle of ping pong yet.
Full cycle will go like: each developer will write test for their partners. They switch the feature and write code to pass the test cases.

Developing in this way also helps everyone in the team have better overall understanding of the software.

About the author

Prakash Poudel Sharma

Engineering Manager · Product Owner · Varicon

Engineering Manager at Varicon, leading the Onboarding squad as Product Owner. Eleven years of building software — first as a programmer, then as a founder, now sharpening the product craft from the inside of a focused team.

Keep reading

More on this

Join the conversation0 comments

What did you take away?

Thoughts, pushback, or a story of your own? Drop a reply below — I read every one.

Comments are powered by Disqus. By posting you agree to theirterms.

0:000:00