age range: 4-8
genre: informational fiction; coding
With an introduction by Girls Who Code founder Reshma Saujani, a diverse cast of characters, and delightful visual background humor, this painless introduction to coding basics will engage, entertain, and educate audiences. –Booklist
An accessible introduction to coding rules that also easily entertains. –Kirkus Reviews
An excellent, age-appropriate introduction to the world of coding. Highly recommended. — School Library Journal
Please tell us about How to Code a Sandcastle.
First, thanks for inviting me! How to Code a Sandcastle is an informational fiction picture book about a girl named Pearl and her robot Pascal as they code a sandcastle.
“Wait? They code a sandcastle? How does that even work?” you might ask.
Well, coding is just a bunch of logical steps put together to complete a larger task – in this case, building a sandcastle. So Pearl and Pascal use common coding techniques – such as sequences loops, and if-then-elses (commonly called conditionals) to do it.
First, Pearl asks Pascal to find a place to build (and realizes she needs to be very specific with her instructions). Then, she asks him to scoop lots of sand into a big pile using a shovel and pail. But rather than tell Pascal to scoop-fill-dump and scoop-fill-dump and scoop-fill-dump over and over and over again, she uses a loop – and only has to give Pascal instructions once. And so on….
But underneath it all, How to Code a Sandcastle is really just a silly and fun picture book about a girl and her robot who try to solve a problem (building a sandcastle), and coding just happens to be the mechanism they use to solve it.
What inspired you to write this story?
I am a software engineer – I’ve been writing code for over two decades. I only started writing picture books about 7 years ago. It wasn’t until about 3 years ago that I considered (at my agent’s suggestion) writing a picture book about coding. But it took a really long time and many (three and a half) completely different manuscripts to get this to the right place.
There are some great books for older readers where coding plays an integral role, but I see kids starting to code at younger and younger ages all the time, as early as preschool. So it was clear that they could handle a picture book about coding. And I really wanted to create a narrative fiction picture book about coding that would also serve as an entertaining story even if you had no interest in learning about the topic.
And that’s what I set out to do. Hopefully readers will think I succeeded.
Could you share with readers how you conducted your research or share a few interesting tidbits you learned while researching?
At first, I didn’t do much research. I’m a coder, I’ve been coding for years. In fact, I probably knew too much about coding for my own good when trying to write an introductory book for ages 4-12 on the topic.
My research was less about coding and more about how to teach coding to children. And what did my research show? When I was drafting, revising, and submitting my manuscript in 2015 and 2016, the U.S. government was in the process of figuring out which organizations they would fund to research how best to teach coding to kids. (It took re-reading that last sentence several times to make sure I wrote it right, so I don’t blame you if you’re confused.)
In short, there is no consensus regarding how to teach coding to kids. There are no standards. There is no agreed upon curriculum. Everyone is doing it their own way.
But when I looked into it further, pretty much everyone that is teaching coding, starts teaching it the same way:
- First sequences.
- Then loops and conditionals.
- Then variables and functions (or functions and variables).
And that’s what I touch upon in How to Code a Sandcastle – sequences, loops, and conditionals. (Side note: 2019’s How to Code a Rollercoaster covers variables.)
What were some special challenges associated with introducing the complex topic of coding?
Writing a book about coding concepts, something relatively complicated for a picture book audience, was pretty hard to figure out. It wasn’t narrative nonfiction, such as a biography of a historical figure or event, or a deep dive into a scientific topic. And while coding is math-related, it’s a bit more complicated than addition, multiplication, or even fractions – which have been successfully tackled in the picture book arena. Also, it was important that the coding play an integral role in the story and wasn’t just a bunch of buzzwords or a plot mechanism leaving the informational aspect to the backmatter only.
I’m not normally one for mentor texts, but in this case, I definitely learned from Cindy Neuschwander’s Sir Cumference and the First Round Table. If you’re not familiar, it’s a book (series, really) all about geometry, a relatively advanced concept for a picture book – but it’s placed in a kid-friendly and familiar environment (King Arthur’s England).
So when I landed on the kid-friendly, familiar idea of building a sandcastle on the beach, that’s when things really started to click.
What topics does your book touch upon that would make it a perfect fit for the classroom?
My hope is that How to Code a Sandcastle can be used on many levels.
It could be used simply as an introduction to coding concepts such as sequences, loops, and if-then-elses – or even just the idea that coding is “a thing” for those in the younger crowd.
It could be an introduction to offline coding exercises such as writing sequences (and possibly acting them out). A favorite of mine back in elementary school was when everyone had to write down instructions of how to make a peanut butter and jelly sandwich and our fifth grade teacher followed them to the letter – scooping peanut butter with his hands (when the instructions didn’t say to use a utensil) and spreading it on the bag of bread (when the instructions didn’t say to take a slice out first).
Of course, I think it could be used as a primer before diving into an actual coding exercise on some type of screen.
And most importantly, I’d hope How to Code a Sandcastle generates enthusiasm for coding at a young age – because coding is FUN! There’s really nothing like seeing a bunch of symbols on the screen compile, build, and create something awesome!
Thanks so much for inviting me to Classroom Connections!