Monday, June 30, 2014

That turtle code

For the last several days, the children have been playing with pencil code. There is so much to love about it:

  1. Cute turtle that makes everything seem silly and fun
  2. Simple, interpreted code that lets even a 2 year old command the turtle (with some spelling help). Save the for-loop that I added later, this is the level of code Jane was typing: Jane's First Code. She would tell me what she wanted the turtle to do ("Get bigger"), then I would tell her the command and which buttons to press to write it.  Of course she can't read the code or remember the commands herself, but she seemed to get the connection between telling the turtle what to do via typed code and then having it move. 
  3. A powerful, "real" programming language that lets you write programs with increasing complexity. This Galton Box animation is one of the nicest  I've seen (and was the example that first got me interested in pencilcode).
  4. Your code is inherently on the net, so you can run your animations on any connected machine, share them with friends, even send them to Grandma and Granpa!
  5. . . . and more
By the way, here's the source for the two animations above: JFC and GBA.

These two were the result of the boys playing: Jin's Gun (source code) and Jate's Star (source code).

I've also shown them cool programs written by other people.  For my own reference, I've been building a repository here: It doesn't even include all the great code that I've already seen (before I had the idea of making a favourites list), so don't feel offended if your awesome work isn't included. Just point to it in the comments!

Now that I think about it, I should also let them browse other people's files and see some simple code that might not quite meet my definition of "cool."

What did they get from this playing, so far:

  • fun and stimulating new game that puts them in control, not because they demanded something, but because they planned what they wanted to happen and worked out the commands to make it work
  • introduction to angles and angle measures, length presented in a new context, coordinate systems, negative numbers, variables, arithmetic calculations, 
  • safe place to experiment
  • a reminder that it is great to learn from other people's work and to credit the original authors

In case you are interested, here's my folder of different pencilcode experiments (at least the ones that were worth saving!):

Note: When I figure out how to do it, I'll embed some of the animations in this page.

No comments:

Post a Comment