How to Code a Sandcastle

Book review by
Jan Carr, Common Sense Media
How to Code a Sandcastle Book Poster Image
Solid coding lessons fill fun tale of girl and her robot.

Parents say

No reviews yetAdd your rating

Kids say

No reviews yetAdd your rating

A lot or a little?

The parents' guide to what's in this book.

Educational Value

Intro to coding concepts. Sequence: "Code must be written in a specific order." Loop: "Instead of writing the sequence over and over, you write it only once." If-Then-Else: "Answering a true or false question. If the answer is true, you do one thing. If it’s false, you do something else." Shows how to break a big task into smaller, more manageable component parts.

Positive Messages

Coding is easy to understand and to do. Girls can be good at programming. Coding is useful for everyday tasks. When you encounter big problems, you can figure them out by breaking them into smaller parts. If you hit snags or challenges, you can keep trying.

Positive Role Models & Representations

Main character Pearl is an African American girl who understands coding. She's not daunted by setbacks or challenges, and has a can-do spirit. She has a task to do, and figures out how to accomplish it.

Violence & Scariness
Language

What parents need to know

Parents need to know that How to Code a Sandcastle is by Josh Funk, a professional software engineer who also writes kids' books, and illustrated by Sara Palacios. The book's a collaboration with the non-profit organization Girls Who Code, and opens with a note from the founder, cheering on the idea of familiarizing kids at any early age with basic coding concepts, the way you'd introduce "animals, history, and space." It uses a real-world application -- building a sandcastle -- to introduce the coding steps sequence, loop, and if-then-else, showing how to break the task into its component parts. The book works for all kids, but since the main character's a girl who's African American, it definitely welcomes girls and kids of color to the coding party.

User Reviews

  • Parents say
  • Kids say

There aren't any reviews yet. Be the first to review this title.

There aren't any reviews yet. Be the first to review this title.

What's the story?

In HOW TO CODE A SANDCASTLE, it's the last day of summer vacation, and Pearl's sandcastles keep getting destroyed -- by waves, by Frisbees, by dogs. So she decides to enlist the help of her robot friend, Pascal. "He’ll do whatever I tell him -- as long as I tell him in CODE. It’s not secret code -- it’s special instructions that computers understand." Pearl sequences the task, breaking the big problem into smaller ones, some of which she instructs him to repeat in a loop. Pascal doesn't always understand the instructions; when she sends him out to get decorations, he comes back with a baby's binky. So she creates if-then-else code that specifies the steps more clearly. At the end, they create a moat to protect the sandcastle, and use a loop code to create a whole kingdom.

Is it any good?

This sunny book delivers lots of fun along with its serious computer lesson: Coding's a day at the beach if you use it to build a sandcastle. How to Code a Sandcastle successfully introduces basic concepts by using coding language to demonstrate how to break a simple task into its component parts, which is a good life skill as well as a computer skill. Author Josh Funk includes plenty of humor. The main character's not daunted when a "flying saucer" (Frisbee) knocks over her castle, or when it gets an unintended moat (via dog pee). But the lessons aren't just breezy, they're solid, and the pages at the end explain the coding concepts of sequence, loop, and if-then-else more fully.

Illustrator Sara Palacios makes sure the crowd at this beach is racially diverse, with lots of African American beachgoers, and families that are racially mixed. Pearl, the narrator, is way cute in her heart sunglasses and springy pigtails, and Palacios cleverly works in illustrations of people absorbed in beach reading, with one newspaper sporting a propos headlines -- "Programmer fixes bug!" and "Memory leak disaster!" -- and a magazine with a photo of an African American subject. The lesson goes down as easily as a refreshing ice pop on a hot beach day, and it's just as welcome.

Talk to your kids about ...

  • Families can talk about the coding concepts in How to Code a Sandcastle. Do you understand sequence, loop, and if-then-else? Did the story make them clear? Did the explanation at the end help you understand?

  • Are there other times in life when you've had to break down a big task into a little one either to understand it or to accomplish it? How did you do that? Are there tasks you do over and over that it would be helpful to "loop?"

  • If you had a robot, what other fun tasks would you break down using these coding concepts? Try making your own story and instructions.

Book details

Themes & Topics

Browse titles with similar subject matter.

For kids who love math, science, and coding

Our editors recommend

Top advice and articles

Common Sense Media's unbiased ratings are created by expert reviewers and aren't influenced by the product's creators or by any of our funders, affiliates, or partners.

See how we rate

About these links

Common Sense Media, a nonprofit organization, earns a small affiliate fee from Amazon or iTunes when you use our links to make a purchase. Thank you for your support.

Read more

Our ratings are based on child development best practices. We display the minimum age for which content is developmentally appropriate. The star rating reflects overall quality and learning potential.

Learn how we rate