First, apologies for nodding off and not posting for the last few weeks. I have the usual set of excuses, which you can guess easily enough without the need to read them here. So, on to the kata: something a bit different, this time. It’s a repeat of a kata we had a go... Read more
When you phone up for house insurance, the insurance company asks you; ”Do you have a five lever mortice deadlock? Does it comply to BS3621? Do you have a burglar alarm and so on? These are all very standard questions for this situation, and we need to make sure we are asking similar questions... Read more
The kata Following on from last time, this is based on Uncle Bob’s now-famous bowling game kata, with the added spice of adhering to the open-closed principle of SOLID. The kata is well-documented online, but briefly, the idea is to write a program that takes in a series of scores for each ball a... Read more
The kata Let’s get this clear: we’re not going to write a chess-playing AI in this kata. The idea is a bit more humble: to write a program that can work out valid moves for a set of chess pieces. The purpose of this kata is to practise writing SOLID code. Use TDD, but... Read more
Naming things can be very hard, yet a well-chosen name can really help a reader understand how your code works. This code kata is an old favorite, one that we’ve done before, but this time we’ve added an emphasis on naming things well. The kata A word ladder is a sequence of words (each... Read more
The kata This kata was inspired by a truly ugly piece of code we came across in Redgate Towers. It had a whole bouquet of code smells: long methods, a lot of indentation, static variables, inconsistent naming, code that was duplicated with small modifications, and a couple of small bugs. And, gloriously, it was... Read more
The kata You are given a program which is capable of traversing 2D mazes. However, the solution isn’t perfect and fails to find the exit in certain types of mazes. Moreover, the current solution is messy, doesn’t follow any sensible coding principles (e.g. SOLID) and is completely untested. The input to the program is... Read more
The kata Imagine: it’s 1968 – the Beatles, Carnaby St and Austin Powers – except there’s all the technology of 2013 as well. Including vending machines. But, being 1968, vending machines have to deal with old money. It’s quite simple; I’ll describe it here. Money is made up of pounds (£), shillings (s) and... Read more
I recently discovered the JTBD framework at Business of Software: what I learnt made me swear that I’ll use it from now on in every customer interview I need to do in order to understand their underlying needs and support our product pipeline. It is that brilliant. It’s like a targeted, systematic guided interview... Read more
Writing HTML can be a chore – making sure elements are closed properly can be annoying without proper IDE support, and CSS markup often requires repeated patterns of nested divs and spans in order to get the layout working properly. There are various templating languages and engines available for dealing with this problem. Probably... Read more