Tuesday, April 1, 2014

Lesson 57 - Careful Planning

I had prepared a new learning environment for this lesson. Such that you can easily implement simple programs like

    var number = random(1,20)
    ask("Guess a number 1-20", guess)
    function guess(answer) {
        if (number == answer) 
          print "Correct!" 
          ask("Guess again", guess)

Easy eh?

Well, we had gotten past the part of cd'ing to the new directory and listing the files when she suggested we do Turtle Roy instead and write the number guessing game later. So we did some Turtle Roy hacking again.

She wanted to create a "red spiderweb", like the "spider" program we wrote earlier. But red. So she opened the earlierly written program like

    open "spider"

She remembered the command and the quotes quite well.

When we inspected and edited the program a bit and she seemed to understand at least part of it. Then we added the red color and it was like

    let askel=s [fd 100,lt 90]
    let neliƶ=r 4 askel
    let xz=s [neliƶ,rt 5]
    let spider=r 72 xz
    color "red"

And that was enough for her. I had promised that we'll do some nice extras after the "hard" part so we did. She answered one email, took a fun picture of us using Photo Booth and mailed that to me. Then she downloaded a picture of a rose from the internet and set that as her profile picture. With a little help of course.

Nothing went as planned and that's ok!

Coders do what coders want to do.