Harold and the purple crayon is a great book that introduces programming concepts, but it doesn't beat you over the head with any computer lingo.
This book is a neat idea and the illustrations look cool, but here is one concern:
Why name the main character Ruby? Good kids books are timeless and ruby the programming language is not, and it dates the book too. Why associate any programming language in particular with programming concepts like sequences or sets? That seems like a message from "learn to code" school. So does DRY to a lesser extent.
Harold and the Purple Crayon is the first book I ever read in my life. Now I draw, paint, and program - and when I do these activities, it is all literally an attempt to harness the power Harold showed me as a child.
I'd never thought of Harold and the Purple Crayon as related to programming. How is that? In perhaps the broadest sense the crayon gives him the power and freedom to create in the same way software might, but that's a pretty big leap.
Okay, I hope this convinces you it's a leap instead of a pretty big leap:
He lives in a seemingly boring world, but it isn't boring after all. It may not even be a world after all. He invents solutions using the contrived rules i.e. using a purple crayon. Some of the solutions become problems. For example the dragon scares him and makes his hand shake, so he falls into the water, but he comes up thinking fast and makes a sailboat.
Both these lines remind me of computers or programming:
Nine identical pieces of pie that Harold likes best.
A forest with just one tree in it.
Also word play is important in programming and in HATPK.
Lots of things are more like programming than things obviously designated that way such as programming languages. In Hoare's communicating sequential processes he goes on and on about vending machines for example.
This book is a neat idea and the illustrations look cool, but here is one concern: Why name the main character Ruby? Good kids books are timeless and ruby the programming language is not, and it dates the book too. Why associate any programming language in particular with programming concepts like sequences or sets? That seems like a message from "learn to code" school. So does DRY to a lesser extent.