This was the second Developers Gym session organized by Thoughtworks, of which we were honoured to play host to. The coding dojo, formulated and taught by Gordon Song from Thoughtworks, aimed to impart programmers with the skills of practicing Test Driven Development (TDD) in their software development projects.

To ensure that there is enough face-time between the instructor and the students, and for them to reap the maximum benefits through the session, the seating capacity is confined to 20 students only. Madhu and Ye Maw joined in this session.

Michael advising some of the students on TDD.
Michael advising some of the students on TDD.

The session was organized into the following segments:

  • Theory teaching
  • Practical Part 1
  • Break
  • Sharing of what has been done for Part 1
  • Practical Part 2
  • Sharing of what has been done for Part 2
  • Conclusion

The programmers were tasked to do pair programming, based on the programming challenge introduced by the instructor during the Theory segment. After part 1, the programmers were then asked to change their pair partners before commencing part 2. This was to facilitate the exchange of ideas among more people in the group.

Some of the students were so enthusiastic that spontaneous deep discussions on how they tackled the programming challenge sprung up during the breaks. Their passion in coding was infectious!

Courtesy of Michael and Hui Qian
Courtesy of Michael and Hui Qian

We observed that pair programming may or may not be appealing to programmers. It can be of an “acquired taste”, some perform better and some perform less if they were to practice pair programming. Also, part 1 of the practical segment may be a little short too (45 minutes), since new students would need time to set up their IDEs and get the unit testing framework working, as well as pick up the theories and understand the programming challenge too.

Presentation and feedback after part 1 segment.
Presentation and feedback after part 1 segment.

Overall, it was a beneficial session for our folks, as we got to revise about the TDD concepts and put them into practice. Some of us felt that TDD would be helpful for long-term projects, since the tests will be of great use when it comes to system maintenance and project scope updates. However, for TDD to be possible, we will need to factor in more time during software development, but it is definitely a time-cost that will be well spent. Project owners need to recognise the importance of TDD as insurance for the project’s health and well-being.

There will be more of this coding sessions to come in the near future, if you would like to learn TDD with the expert, do keep a lookout on the meetup group!

Background: JuniorDevSG is a meetup group founded by Michael Cheng, the veteran serial meetup founder and self taught programmer. It focuses on interfacing with programmers who have just joined the workforce, as well as fostering strong relationships and engaging with the programmers through talks, sharing and networking sessions.