Tag: kata

Tales of a Fourth Grade: An Architecture Kata

Architecture katas are a way for us to practice our design skills. I often use them with mentees who express an interest in software design. The idea is that we are given a problem statement, and we need to propose a system design to suit. This is also great practice for a system design interview, though I've had mixed results with those in the past, and tend not to use them myself.

Mars Rover Kata, Bottom-Up

I've just uploaded my second ever Youtube video! I've been procrastinating on this for over a month, but this is a video of me tackling the Mars Rover Kata in Typescript. Most versions of this I've seen use an outside-in style, but instead I'm using a bottom-up approach. I'd love feedback, on Youtube or Twitter. If people are interested, I've got two more parts to edit and upload.

Approval testing with Jest Snapshots

Approval testing is a powerful technique for working with legacy systems. When refactoring, it's important that we have tests to tell us if we've changed behaviour, but sometimes code can be smelly enough that writing unit tests is hard. Approval tests fill this gap. Instead of writing behavioural unit tests, we capture the output of the system - usually as text - and run a diff tool to check for changes in the output as we change the code.

I've previously struggled to set up approval tests with the common tools and libraries, but I realised today that Jest Snapshots solve exactly the same problem, and are easy to use.

The Cake Shop Kata

While spelunking through some code at work, I found a neat little programming problem that I've cleaned up a little and decided to publish as a TDD Kata.

In the Cake Shop Kata we're asked to write some code that can calculate the delivery date for different types of cakes, taking into account the skills and working patterns of the bakers.

Tackling the Delivery Service refactoring kata

I've recently started a new role as an engineering coach, and I've been working through some katas to remember how to write code.

I'm a huge fan of Emily Bache's work, and was particularly interested in the Delivery Service refactoring kata because it neatly captures some of the challenges of working with legacy codebases.

I'm going to walk through the process I followed when solving the kata, and I'll include links to each commit in the Github repository so you can see the full code as we go.