Teaching LOGO to non-CS Students

Back in April I mentioned teaching bits of LOGO to my Fluency in Technology class using the Tortue interpreter. I actually did not get to it last semester so this experiment had to wait. I finally managed to cover it in the last lab, and it turned out better than I expected. Strangely enough most of my students were more confused by Access than by LOGO. Some even seemed to enjoy it. I think I lost them when I attempted to show them how to calculate a factorial using a loop and a temporary variable. So note for the future: do not do that again. I’ll just keep it simple.

I do think that it was actually a useful exercise. Why? Because it allowed me to show students somewhat abstract concepts such as variables, loops and functions with working examples. When I was explaining these things in lecture using pseudo-code snippets from the book I saw a wall of blank stares. But LOGO makes these things astonishingly simple. For example, I show them how to draw a square:

FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
FORWARD 100

Then I point out how the two lines are repeated over and over again, and show them a shortcut:

REPEAT 4
    FORWARD 100
    LEFT 90
END REPEAT

They can try it themselves and easily see that it does indeed draw a square. I can put both these things on the screen and show them how the loop unrolls back to the sequential statements, and then show them any repetitive code can be rolled up into a short and succinct loop to save a lot of typing.

Same goes for functions/subroutines. It seemed fiendishly hard to convey this concept to my students in lecture. And yet, when I used Tortue to Explain it in the lab I saw people actually doing the “Oooh, I get it!” expression. I started my explanation with that loop to draw a square and asked them how would I draw another one or two on the canvas. There is the hard way (type in more loops) or the easy way – create a subroutine and then call it.

LOGO actually has an interesting syntax for it:

TO DRAWSQUARE
    REPEAT 4
        FORWARD 100
        LEFT 90
    END REPEAT
END TO

It almost suggests an approachable way to explain what you are doing here. You are telling LOGO “how to draw a square”. You are defining a new keyword, and below you explain what should this keyword do. You set aside some code, and give it an explicit name which you can use later to invoke it. I used all these explanations and they all seemed to somewhat resonate with different people.

When I was going over these concepts the second time around, while preparing them for the final exam, and I referred back to the LOGO lab, I saw people nodding with new found understanding. So I consider the LOGO experiment a success and will definitely do it again next semester. I just need to remind myself to keep it simple.

Also, it may be worth it to re-write some of the code snippets on my lecture slides to use something as simple as LOGO. Again, these students are not going to be programmers. If they wanted to be programmers they would not be in my class. They would be taking Intro to Java instead. So I’m not really concerned about teaching them practical stuff. I want them to know basic concepts and keep it short, sweet and simple. My goal would be to give students an impression that programming is actually not all that scary and mysterious as they might have thought.

This entry was posted in school and teaching. Bookmark the permalink.



6 Responses to Teaching LOGO to non-CS Students

  1. Matt` UNITED KINGDOM Mozilla Firefox Windows says:

    We were playing around with LOGO way back in my second year at school :P

    Nothing complex… it was being used to teach shapes more than anything, and just for fun, and we never heard anything about the functions more complex than forward/backward/left/right, but we still used it to draw squares and triangles and stuff.

    Reply  |  Quote
  2. Milos UNITED STATES Mozilla Firefox Windows Terminalist says:

    My goal would be to give students an impression that programming is actually not all that scary and mysterious as they might have thought.

    Keep fighting the good fight. :)

    Is this a required part of the course or do you have some freedom to decide what else you want to throw in outside syllabus? While it is certainly valuable in explaining concepts and ideas it might be a bit more than what a typical CMPT 109 student can handle.

    Reply  |  Quote
  3. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    @Milos: Well, I’m pretty much sticking to the book for my lecture material and it has a whole huge chapter about programming. They really try to cover a lot material there. The have a whole section on OO, try to explain polymorphism, and then go into logic programing and show snippets of prolog code. It’s actually quite intense, and most of it flies right above their heads. I cut a lot of it out but it is still too technical I believe.

    I’m not sure what other instructors do with this thing. Some I think just skip this whole chapter.

    I believe that LOGO was originally Bredlau’s idea. Or someone from the department. I found Tortue via the 109 Community on the old Blackboard. I don’t see it in there now – I don’t know what happened to it. But I did like the idea of using it.

    Reply  |  Quote
  4. Adam Kahtava CANADA Google Chrome Windows says:

    Man… I’m in the wrong profession, teaching LOGO would be fun.

    Reply  |  Quote
  5. I love seeing references to LOGO as it was the first ever programming language I was taught. I was 7 or 8 years old and it was on an 8bit BBC Micro…Ahhh they were the days. *goes misty eyed*

    Part of the attraction was that we didn’t even realise that we were learning how to program. As far as we were concerned we were just ‘playing turtle’. We used to compete to see who could come up with the prettiest logo pattern.

    Those lessons taught us the basics of logic, geometry and programming and yet we were just fooling around. Wonderful stuff.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>