Loops, Recursion, and Big-O Notation With Computational Fairy Tales

Computational Fairy Tales
Image: CreateSpace and Jeremy Kubica

“Have you ever thought that computer science should include more dragons and wizards?”Computational Fairy Tales

Whether our kids go into computer science as a career or not, learning the basics of programming is a good way for their brains to be trained in certain critical ways of thinking. But especially at an early age, keeping their interest and attention while they are learning is key.

A new book by author Jeremy Kubica, called Computational Fairy Tales, introduces dozens of aspects of computational design. Aimed at junior high and high school students, it gives an overview of these aspects, whetting the appetite to learn more. Using analogies from fairy tales, Mr. Kubica inspires readers to take in each concept and then extend their learning on their own. The book gives a starting point for kids to learn more about the parts that interest them.

The story is about Princess Ann, who goes on a solitary quest to rid her kingdom of “the darkness” that has befallen it. She soon learns that she can follow a quest algorithm to help her find her way. Ann is new to questing, and feels a bit in over her head. But along the way, she learns about computer science, which serves as the magic in her land. Some of the concepts she learns are:

  • Algorithms
  • Variables
  • If else
  • Loops
  • Binary numbers
  • Boolean algebra
  • Arrays, linked lists, and pointers
  • Binary search trees
  • Big O notation
  • Recursion
  • Insertion, bubble, and merge sort
  • The traveling salesman problem
  • Depth first search
  • Commenting
  • Stacks

I haven’t thought about a few of these constructs since I took computer science in high school and college. The book goes beyond explaining how to use these with computers, though, also talking about why and when to use them in non-computer settings.

Big O Notation
Image: Jeremy Kubica

As Ann proceeds along her quest, the topics get more and more advanced. The book is also full of humor, though. One jab at Fortan caused me to chuckle audibly. Some of the jokes will go over the heads of those new to the field, but there are plenty of bits that everyone will enjoy.

Chapters are very short, and can be read and discussed in a short time. Each chapter begins with an italicized paragraph that talks about the computer science topic that follows, though the explanations are pretty basic if the reader has no previous context. This book is best used as a companion to other computer science instruction.

The whole book is a quick read, and follows Ann along on her journey, but at the same time, each section can be read on its own. The overarching story is interesting, but not necessary to learn the concepts.

Closer to the end of the book, I felt like the author missed an opportunity to flesh out the story more, such as including chapters on the use of the magical items that the princess received near the start of her journey. But all in all, the book is a really fun, interesting, and educational overview of many computer science concepts. I recommend this book to any student, high school age or above. Kids that just “get” this kind of thing could tackle it at an earlier age, or with parental participation.

Author Jeremy Kubica also has a blog connected with the book where he explains how to use it in your kids’ education. The blog also contains much more content that isn’t included in the book. Check it out! I’ve bookmarked it for future use myself.

Computational Fairy Tales retails for $9.99. It’s a fun tale to which I hope the author writes a sequel. He left plenty of opportunity to do so.

Note: I received a copy of the book for the purposes of this review.

Get the GeekDad Books!

   

Jenny Bristol is an Editor at GeekDad and a founding Director at GeekMom. She is a lifelong geek who spends her time learning, writing, homeschooling her two wickedly smart kids, losing herself in history, and mastering the art of traveling on a shoestring.