Books by Jeremy Kubica

Computational Fairy Tales (June 2012)
Best Practices of Spell Design (January 2013)
CS Detective (August 2016)

Computational Fairy Tales

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. 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.

The Computational Fairy Tales book includes ~30 rewritten or revised stories from the online collection and 15 all new chapters.  Each story serves to illustrate a computational concept, supplementing official instruction or motivating computer science concepts.  The stories have also be set up to provide a natural progression both within the computer science concepts and within the fairy tale quest.

Stories and interior illustrations by Jeremy Kubica
Cover design and art by Meagan O’Brien
Interior design and editing by Marjorie Carlson

Q: Is this a print copy of your blog? Why should I buy the book?
A: There are a few significant changes. First, there are fifteen new chapters. Second, the book covers the full tale of Ann's quest to save the kingdom from the darkness.  The stories are set up to provide a natural progression both within the computer science concepts and within the fairy tale quest. Third, the stories have been rewritten and edited by a professional editor.

Q: What is the target audience for this book?
A: It is primarily written for junior high to high school students who are interested in computer science (and their teachers).  However earlier versions were read and enjoyed by younger readers. It  can also be amusing for people who know about computer science, but want to read about it in a different light.

Q: My favorite story is not there! What's the deal?
A: Not all the stories fit into the book.  In fact, less than half the online stories were used. Some were redundant and some just didn't fit. I do have some future plans for some of the left out stories though, so don't despair.

Q: Does this mean that the online collection is going away?
A: No. I want these stories to continue to be useful. I plan to leave the current collection of stories online.  However, I do not plan on updating them all (I have updated a few).  So think of the online versions as very rough first drafts of the final stories.

Best Practices of Spell Design

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.

Stories and interior illustrations by Jeremy Kubica
Cover design and art by Meagan O’Brien
Interior design and editing by Marjorie Carlson

Q: Is the format of Best Practices in Spell Design the same as Computational Fairy Tales?
A:The format is similar, but not identical. Instead of individual stories with introductory technical blurbs, Best Practices of Spell design is written as a novella. Each chapter of the story introduces, explains, or reinforces a concept.

Q: What is the target audience for this book?
A: Best Practices of Spell Design is written for people who are just starting to program or have some programming experience. The book does not teach programming, but rather reinforces important programming best practices that are often learned through (painful) experience.

Q: Is Best Practices of Spell Design a sequel?
A: Best Practices of Spell Design is not a sequel. The story is set in the same universe and include many characters from the original, but focuses primarily on Marcus and Shelly.

CS Detective

Meet Frank Runtime. Disgraced ex-detective. Hard-boiled private eye. Search expert.

When a robbery hits police headquarters, it’s up to Frank Runtime and his extensive search skills to catch the culprits. In this detective story, you’ll learn how to use algorithmic tools to solve the case. Runtime scours smugglers’ boats with binary search, tails spies with a search tree, escapes a prison with depth-first search, and picks locks with priority queues. Joined by know-it-all rookie Officer Notation and inept tag-along Socks, he follows a series of leads in a best-first search that unravels a deep conspiracy. Each chapter introduces a thrilling twist matched with a new algorithmic concept, ending with a technical recap.