Book review: Best Practices of Spell Design
Posted by Kate Glover on April 14, 2013
Today I read a book – cover to cover. That’s not too strange for me, but it was a rather strange tale, or manual, or manual woven into a tale…
It was this book [Amazon Link – opens in new window] Just £1.94 on Kindle (prices start at double that for physical copies – but I will be buying one!) it’s a bit of a bargain, and covers more than you might expect within its 138 pages.
It is a story of a court wizard and his apprentice, who are called in to reverse the damage to the castle caused by a wizard who did not properly design his spell. All of this is a big, occasionally clunky, but nearly always entertaining metaphor for programming. The “wizards” are programmers, the “spells” are computer programs, and so on.
The story goes through a number of chapters, each focusing on a different aspect of good code design, such as the story of the man who’s pass was changed by the guard who would then not let him enter the castle (a missing = from an equivalence test had caused the ID code to be set rather than tested against). The importance of indentation, correct loop usage, and clear order of conditions on if-else statements are also among the topics covered.
While it is assumed that the reader has a basic knowledge of programming structures – it is not required that they are fluent in any given language.
Little Miss Geek followers will be pleased to hear that the apprentice wizard/programmer, who ends up playing a pivotal role (of course!) is a female and the baker and baker’s apprentice (who is decorating an impressively tall wedding cake) are male – which does go some way towards combating the gender stereotype thing.
While I wouldn’t necessarily recommend this for quite everyone on my course (some have a habit of taking metaphors rather literally!) I would certainly recommend it to those who’ve started coding independently, but who have got to the stage where they’d like some advice on “doing things properly”. I would also recommend it to teachers who may be approaching coding for the first time, or returning after some time away from the art, and who’d therefore like some re-enforcement in their own minds regarding good practice.
Leave a Comment