TDD Talk


Recently, myself and two colleagues from the BBC, ran a session on Test Driven Development at the Manchester University ‘Ultimate Programming’ society. The society is a gathering where students discuss cool things they have done with programming, and occasionally have guest speakers from industry. I found the society online and thought it would be great to get the BBC more involved in the local university happenings.

It is the first outreach project that I have undertaken, and it required a lot of preparation. Our initial idea was to get students to implement the A* search algorithm in a practical session, using TDD. However after we had all implemented our own copy of the algorithm, and realised it had taken several hours each, we realised we’d not have enough time in the 2 hour slot that we had.

Instead then, we went back to the tried and tested FizzBuzz example, which is how I learned TDD at the BBC. This was nice and simple and relatively straightforward to implement in an hour practical session. The task was to implement FizzBuzz using write-the-tests-first TDD process, and we gave approximately 1 hour for the students to undertake this task. For the rest of the time we were going through our presentation and talking about how we use TDD and other development concepts at the BBC.

The session overall went quite well, and although it showed to me how difficult it is to present in front of a group of people for an hour, we had good feedback, and I think we really gave the students a different perspective on how to write code, one that a large section of them would not have been exposed to in a standard CS curriculum. We aim to do other talks, starting with the next one, which will be a session on how we use BDD (Behaviour Driven Development) at the BBC.

Here are the slides we put together for the presentation:

Here is the model solution to the TDD exercise, written by my colleague Jack Palfry: