Introducing Kids to Programming With ‘Sam the Subroutine’


Fair warning: I know nothing about programming. I’m pretty sure it involves lots of brackets and slashes, and I had to Google the word “subroutine” for this article. So for all intents and purposes, if your kid hasn’t been taught anything about programming yet, we’re on the very same level. I can say as a preeminent expert on knowing zero things about coding that Sam the Subroutine: The Greatest in the World is an enjoyable, relatable book delivering a universal message that just so happens to shoot heavy nods to the programming world.


This little guy is Sam the Subroutine. He’s a normal kid, assuming normal kids are repeatable pieces of code. Sam eats spaghetti code for lunch and reads a book called Software House V. When he gets an idea, an “on” symbol appears above his head. In short, Sam is a cute and personable character for the kids and a treasure trove of geeky references for the parents, which is the very best recipe for a bedtime story.

One day, Sam has a dream that he’s the greatest subroutine in the world. His dream inspires him to try to be the best at lots of things, but his attempts to do so throughout the day only end up discouraging him. Finally, after returning home from school dejected and miserable, his mom teaches him what it takes to be the very best. This mom moment, not unlike many important mom moments in history, also involves pie.

Even as someone coming from a frame of reference completely outside the programming world, I found the book’s layered allusions fun and refreshing. The illustrations are simple, but they are intentionally so. The occasional pointing out of a detail with an arrow and description in the illustrations may come off as distracting and unnecessary, but it’s a great way to get kids pointing out other details they might see.


The only difficulty I had comes from the book’s attempts to free itself from the need to explain the programming concepts it was mentioning; I felt a little like an outsider when an unexplained reference went over my head. I did hit up Google for answers quite often though as I read through the book, and I suppose that’s the point. Any kid can get something out of the basic story, and kids that want to find out more about programming have a friendly place to begin.

If you or someone in your family is into programming, they will love reading this with the young ones over and over. Learning about the inside jokes tucked into every page will no doubt provide an easy springboard into what may just be a budding passion for xml (I Googled that too). If no one in your family knows anything about programming, there will be less layers here for  you to explore, but it’ll still be a fun read with a good message.

Sam the Subroutine: The Greatest in the World is written by Aaron Zimmerman and illustrated by Janna Renner. It’s available as an eBook or paperback here on Amazon.


  1. Mariaselke

    This looks awesome! I’m going to be teaching a unit on programming to my 3rd-5th graders starting in January, and this may be a great way to kick off the unit!

Leave a Comment

Your email address will not be published. Required fields are marked *