Books : reviews

Jeremy Kubica.
Best Practices of Spell Design: a computational fairy tale.
CreateSpace. 2013

rating : 4 : passes the time
review : 24 September 2014

In all his years as a wizard, Marcus has never seen a spell cause this much damage. When Hannaldous’s sloppy attempt at a shield spell accidentally curses the castle, the walls start crumbling at an alarming rate. Now Marcus and his apprentice Shelly must figure out how to repair the damage before the castle turns to dust. Along the way they will encounter gossiping worms, perfectionist bakers, opportunistic rabbits, and copious amounts of mold.

The Best Practices of Spell Design introduces practical aspects of software development that are often learned through painful experience. Through Marcus and Shelly’s quest, the story encourages readers to think about how to write readable, well-tested and maintainable programs. Readers will discover the importance of comments in recipes, the value of testing potions, the dangers of poorly named ingredients, the wonders of code reviews in magic libraries, and the perils of premature optimization.

This book illustrates various good practices of software design through a sequence of vignettes set in a fantasy world of wizards, where spells (and bakery recipes, and accountancy) have a distinctly computational nature.

I enjoyed this, but found nothing particularly deep here. I realise that I am not the right audience for the book, since I have come across (and try to use!) all the techniques illustrated, from comments and named constants to problem decomposition and test driven requirements.

However, I am not entirely sure who the right audience might be, given the wide range of subjects covered. Apprentice wizards programmers will not get some of the later material; those more experienced should already know the earlier. Maybe it is for those self-taught (rather than apprenticed) hackers, who have never come across these concepts? If so, this is a fun, and memorable, way to illustrate good practice.