SPA Conference session: The Joy of TDD on the Raspberry Pi

One-line description:Enjoy TDD on an embedded device, messing around with real hardware
Session format: hands on programming workshop [read about the different session types]
Abstract:Moore's law also applies to embedded development, so we can increasingly use higher level languages: more joy and more productive.

In this session we will add a feature to a soft-drinks vending machine prototype using Raspberry Pi's, an Arduino, Lego and various bits and pieces. Learn how to use test driven development and hexagonal architecture to keep your code clean and your mind sane.

We set out to turn our virtual vending machine exercise into something physical. We underestimated how much fun it would be to work with a tiny low power Linux PC, the Raspberry Pi, together with Lego and a bit of circuitry.

Join us in this session and feel the joy of Test Driven Development and messing about with actual hardware. You get the chance to program carefree in the presence of constraints, with mock objects driven by hexagonal architecture and responsibilities. You’ll learn about making non-functionals such as timing constraints functional by designing them in and testing them separately.
Audience background:Developers/architects; at least some experience with TDD
Benefits of participating:Get experience in doing TDD in an embedded environment; learn what aspects are similar and what aspects are different compared to non-embedded development
Materials provided:we’ll provide the hardware and the programming environment; participants should bring laptops (we need 1 per pair)
Process:150 min. hands on coding session. We will start with a short introduction and a prepared kata; participants will work in pairs on exercises.

Detailed timetable:10’ participants brainstorm embedded tdd challenges in pairs
15’ introduction to the vending machine and the hardware/software environment; hexagonal architecture as a frame of reference
30’ prepared kata: we pair up and demonstrate adding a simple feature to the vending machine

3 x 30’ participants work in pairs on stories; the number of physical devices is limited (1 or 2), so they have limited time to test in the real situation; every 30 minutes, we’ll do a quick check how everyone is doing

10’ final debrief: what do you take away from this session to your work on Monday?
Outputs:Outputs: flip charts before/after, with TDD challenges / things participants want to try. We’ll let participants write the latter post-its while they are working or during intermediate debriefs.
History:This session has been run (and will be run) in different incarnations, at XP Days Benelux, The Joy of Coding conference, ScanDev Conference, ACCU Bristol. This edition is different, because there is much more time for participants to get their hands dirty while keeping their code clean.
1. Marc Evers
Piecemeal Growth
2. Willem van den Ende
Living Software B.V.
3. Rob Westgeest
Westgeest Consultancy