Posts

Showing posts with the label TDD

Lazydoro Mk 3 - lots of automated tests for a simple design

Image
At the end of  yesterday's post lazydoro was running on a Pi zero still not working reliably. In November 2021 I worked on Ness Labs ' Write a book in 30 days challenge. I had to rely on a web-based Pomorodo timer, and thought I'd have another try at the lazydoro project. I decided to rewrite lazydoro from scratch. Lazydoro needs to do four things. It needs to know when I arrive at or leave my desk It needs to keep track of passing time It needs to know where I am in a Pomodoro cycle It needs to provide feedback to keep me on track. To make lazydoro easy to test I used a variant of the Ports and Adapters architecture. (Ports and Adapters is sometimes called Hexagonal Architecture). I first came across it in an article by Alistair Cockburn , and it made a lot of sense. It's also featured in the GOOS book: Growing Object Oriented Software Guided by Tests . Simple architecture Here's the architecture for lazydoro: At the centre is the applicat...