How to make junior programmers write tests? [closed]

This is one of the hardest things to do. Getting your people to get it.

Sometimes one of the best ways to help junior level programmers ‘get it’ and learn the right techniques from the seniors is to do a bit of pair programming.

Try this: on an upcoming project, pair the junior guy up with yourself or another senior programmer. They should work together, taking turns “driving” (being the one typing at they keyboard) and “coaching” (looking over the shoulder of the driver and pointing out suggestions, mistakes, etc as they go). It may seem like a waste of resources, but you will find:

  1. That these guys together can produce code plenty fast and of higher quality.
  2. If your junior guy learns enough to “get it” with a senior guy directing him along the right path (eg. “Ok, now before we continue, lets write at test for this function.”) It will be well worth the resources you commit to it.

Maybe also have someone in your group give the Unit Testing 101 presentation by Kate Rhodes, I think its a great way to get people excited about testing, if delivered well.

Another thing you can do is have your Jr. Devs practice the Bowling Game Kata which will help them learn Test Driven Development. It is in java, but could easily be adapted to any language.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)