Have you ever thought that computer science should include more dragons and wizards? Computational Fairy Tales introduces principles of computational thinking, illustrating high-level computer science concepts, the motivation behind them, and their application in a non-computer-fairy tale-domain. The goal of this book is not to provide comprehensive coverage of each topic, but rather to provide a high level overview of the breadth and excitement of computer science. It's a quest that will take you from learning the basics of programming in a blacksmith's forge to fighting curses with recursion. Fifteen seers delivered the same prophecy, without so much as a single minstrel to lighten the mood: an unknown darkness threatens the kingdom. Suddenly, Princess Ann finds herself sent forth alone to save the kingdom. Leaving behind her home, family, and pet turtle Fido, Princess Ann must face goblin attacks, magical curses, arrogant scholars, an unpleasant oracle, and rude Boolean waiters. Along the way she must build a war chest of computational knowledge to survive the coming challenge.
A tale of programming and software best practices from the Computational Fairy Tales universe. 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.