Thursday, August 29, 2013

Lesson 11 - Turtle Roy

Today our lesson took almost 45 minutes. We had no plan but we did cover a lot of topics. Not just computers, but Englis, Math and Geometry too.

We had been singing the (in)famous Head Toes And Knees And Toes song quite a bit today, so we chose to have the computer sing it for us. We started to write the lyrics into a file and had the computer speak it out load. We got as far as

    head

.. and she was exhausted with typing.

So, I took her to Turtle Roy, my little Logo-ish learning environment using the Roy programmin language. There was some issue with Chrome this time and I joked that the turtle must be sick, which made her a bit upset: "Is the turtle really sick?". But we opened it in Safari and it was ok.

We discussed pixels and used the Mac magnification feature (ctrl-two-finger-drag) to have a close look at them. Then we used "fd 50" to make the turtle move 50 pixels. It was not trivial that the number 50 is typed 5-0.

Then we discussed angles, and especially the 90° Right Angle. She was able to deduce how 90 is typed based on earlier experience with the number 50. So we did "lt 90" and the turtle turned left.

Now she was really determined that she wants to draw a Rectangle. And there we went, repeating the previous command until a perfect Rectanble was formed. She wanted to save it and was a bit disappointed that Vim commands don't work in Turtle Roy. But she was o.k. with being able to save it using a Web UI. And yes, the Rectangle is now saved for you to marvel at.




Now she wanted to make triangles, circles, suns, smiling faces and whatnot. I convinced here that they all can be done and we'll make them later, but she'll have to learn some English, Maths, Geometry and Programming first. I even showed here some of the aforementioned shapes and she was like "WOW". Now I'm her programming superhero:) 

Anyways, I think we've found a nice tool for learning to code.

Then we discussed Lists and Geometry a bit. The concepts of head, tail and empty list were surprisingly easy for her so I think she'll learn to write recursive algorithms very soon. Before that I think we need to refactor her Rectangle to adhere to the DRY principle.

Meanwhile I'll have to make Turtle Roy support some vim commands to integrate our editing and coding skills more nicely.

1 comment:

  1. There's quite a lot of things a Logo-like language can do to help kids code. Those include human-friendly error messages, a REPL to try things out, a userspace that keeps track of "dirty" (unsaved) definitions and lets the user save them in a batch, a tracer utility to see the evaluation of more complicated expressions, etc.

    If you haven't taken a look at "traditional" Logo implementations, please use an hour to do so. A very traditional Logo is available in Debian as the ucblogo package.

    ReplyDelete