Teaching about Programming: LOGO

The semester is almost over. I was convinced that I will actually have one regular class in May before the finals, but I was wrong. The regular schedule at MSU ends on the 5th and then we go into the two week final examination period. Since I teach an evening class, I get to give the exam on May 13th which is I think the very last day of exams. So naturally I already have students clamoring that we should push the exam up.

One guy even told me he booked a trip on the 10th and he doesn’t know what to do now. Sigh… I could understand this if the official final exam schedule was not posted on the university website on like the first day of the semester. But it was, and I could have told him the exact date and time of the final on Sept 1 if he asked. Sigh… I had professors who didn’t even tell us when the final was – they expected you to look it up and show up at the right time, or they failed you. I sometimes wonder how some of these folks actually survive in college.

So I’m not moving the exam up (I’ll work with my “special” cases on individual basis, and figure out what to do with them) but since I only have 1 regular lab period left I think my students will get to skip the LOGO exercise. I actually never did this lab before and it was supposed to be sort of a test run. But they won’t have enough time. will need to skip it.

Back in February I asked you what programming language should we teach first to CS majors. We pretty much established that it is usually a good idea to start with a lower level language like C or C++ and then bump them up to something more friendly like Java or Python as needed. What do you teach non CS majors though? It is generally a good idea to expose people to programming to show them it is not some sort of scary arcane magic.

This is where LOGO comes in. It is a is a functional programming language considered to be a distant cousin of Lisp. It doesn’t share Lisp’s peculiar syntax though. It is actually very, very simple – it uses one word which usually take a single argument. There are no brackets, semicolons or fancy control structures. It supports very simple loops and naturally recursion (after all it is based on lisp) – which is probably not something I would show to my 109 class. Simple iteration though is probably something that they could handle.

I was planning to have them use Tortue which is a Java based app with a built in interpreter and a canvas for drawing shapes. I actually found it via the CMPT 109 community on blackboard and it seems for this purpose. It doesn’t support all of LOGO but it does support a significant portion. In fact, it makes the language even simpler. For example, it does not support the short versions of the keywords, or the square bracket notation, which make code more compact, but may impact readability if you are a fresh user.

I like it because it requires no installation (which is something students cannot do in the lab) and is astonishingly simple. Students simply type the code in the left pane, hit run, and the results are drawn on the canvas. Yes, logo programming revolves mostly around drawing shapes. Let me show you a very simple code snippet:

REPEAT 4
	FORWARD 100
	LEFT 90
END REPEAT

This little snippet for example will draw a 100 pixel wide square on the screen. Tortue basically only supports drawing functions and very basic arithmetic. Logo itself is actually full featured and can be used to solve complex problems, but drawing on a canvas is really it’s favorite thing to do.

I’m not exactly sure what kind of program I would assign them. Probably something really simple that could be accomplished even without loops. I was thinking along the lines of tetris blocks since there is more than one way to draw them. You can either use stacked squares, rectangles, or just draw them with a single continuous line.

Perhaps I’ll manage to squeeze this exercise in next semester. What do you think about this approach? I’m not really expecting to teach these people any hard core programming. I just want to expose them to coding, debugging and solving problems. Or is logo to complex? I know some teachers use the 3D Alice framework to teach these concepts. It was being pimped at the same community portal where I found Tortue and I actually saw Alice files all the computers in the adjunct office so someone out there is using it. I looked at that toolkit, the first impression kinda to my first time using Macromedia Flash – I was overwhelmed by it’s complexity. I had to look at the tutorials to actually figure out what was one supposed to, so I can only imagine how my students would feel.

In comparison, simple textual commands like FORWARD 100 or LEFT 90 don’t seem that bad. Which reinforces my long standing opinion that CLI interfaces are actually easier to learn. While a well designed GUI can be self explanatory and can be learned by instinct, complex ones quickly become overwhelming. CLI on the other hand has to be learned gradually and because of it’s inherent modal nature, the user is only exposed to small portion of the system at once.

If you had a choice, would you teach Alice or Logo?

[tags]logo, programming, tortue, alice, school, teaching[/tags]

I just think Alice

This entry was posted in Uncategorized. Bookmark the permalink.



10 Responses to Teaching about Programming: LOGO

  1. Starhawk UNITED STATES Mozilla Firefox Ubuntu Linux says:

    Wow Logo that brings back memories :) About every programmer of my generation wrote a Logo Interpretor in one language or another in the stone ages prior to the MS/Dos Era.

    How about giving your students K&R’s book on C and have them write there own Logo like language? Wouldn’t that be fun ;)

    Just joking but Logo is kind of a kids language so the question for me would be how much time do you get to spend on introducing a toy language? And would the adults get offended at what is obviously even a dumb downed version of Logo? But Logo can be great fun for some so that counts for something.

    I looked at Alice before but I didn’t download it and play with it. It does seem a bit complex for your needs. I would think you need something kind of in between. Have you ever looked at Context Free before? The language for it is C like and formally is a context free grammar hence its name. Like Logo it draws graphic images but unlike Logo it is easy to draw wild looking fractals and stuff like that. I think it is pretty cool but I think it requires installation.

    Reply  |  Quote
  2. Starhawk UNITED STATES Mozilla Firefox Ubuntu Linux says:

    Btw I just looked at Context Frees web site and I think they have a stand alone version of the program for windows. I haven’t tried the Linux version of the program tho.

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

    [quote post=”2383″]Just joking but Logo is kind of a kids language so the question for me would be how much time do you get to spend on introducing a toy language? And would the adults get offended at what is obviously even a dumb downed version of Logo?[/quote]

    Well… My class consists mostly of dance, music, drama, telecommunications and phys-ed majors. I was actually thinking Logo might be too difficult for them. Anything with a higher degree of complexity might be too much. :P

    Reply  |  Quote
  4. Ricardo INDIA Mozilla Firefox Windows says:

    Wow, logo!! That surely does bring back memories, as Starhawk mentioned.

    I remember learning it for the first time when I was 9-10 years old. Many years later, I also wrote a Logo Interpretor.

    So, my point is going to be essentially the same of Starhawk: Isn’t it to simple? I think in Brazil they would get offended once they realize this stuff is for children.

    Reply  |  Quote
  5. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    [quote post=”2383″]I think in Brazil they would get offended once they realize this stuff is for children.[/quote]

    Well, it’s not really just for children. It is a generic teaching language and Tortue doesn’t really have an appearance of a kids application (ie no silly turtle or anything like that).

    Anyways, this was recommended in the course materials posted on the online portal for CMPT 109 teachers at my school – so whoever was putting together that collection figured it was a good idea to use it. :P

    Reply  |  Quote
  6. vacri AUSTRALIA Mozilla Firefox Ubuntu Linux says:

    regarding your foolish student, an answer you can put into programming terms:

    “It’s very simple: you have a scheduling conflict. Resolve it”

    When I was younger I would have argued for leniency, but keeping tabs with old lecturers still in academia, they lament the significant drop in quality of the students over the past 10 years. For example, I finished my course in the mid-90s. For us, applying for ‘special consideration’ meant “I am pregnant”, “my parent died” or “my girlfriend has cancer” sort of thing. Talking to one of the lecturers two Christmasses ago, he said that over half the class had applied for special consideration, and it was typical of classes in general these days. He used to be a guy that lived with an incredible passion for educating people, and he was haggard with exhaustion and frustration.

    I support you in not moving the exam – he’s the one who organised a trip without bothering to do a sanity check. Let him do the work of rearranging timetables, not you. It’ll be a nice life lesson. I mean, if it’s no effort to change to an earlier slot, sure, do that, but if you have to make two exams or fight redtape to do it, fuck ’em. I mean, teaching is a job you do for the love of teaching, but if your students aren’t learning for the love of it, don’t bend over backwards for them. Otherwise he just gets it reinforced that he can get things changed to suit him.

    /curmudgeon

    Reply  |  Quote
  7. Ricardo INDIA Mozilla Firefox Windows says:

    I totally agree with both of you. Students must realize on their own how to solve their problems not only content-wise but with such proceedings and other related issues of time and task management.

    The professor is there to help but not to please the student, fulfilling his/hers wishes. They must learn how to fight for that.

    Reply  |  Quote
  8. Wow, your going to work with them to help them get their tests in?
    Your a nice guy, I would be like FAIL! (maybe I would be a little more compassionate but not much)

    Okay, as a new guy… and only breifly looking at the wiki for both… I am going to say Allice because it looks a little more new, edgy, and fun… (mind you when you first mentioned it, i thought we were talking about the AI)… However it kinda also looks like the Ruby on Rails of coding, something thats cool but not going to practically carry over to anything else. Like if you learn JavaScript you can still apply those fundamental skills to PHP

    Reply  |  Quote
  9. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    Yeah, I know. I should develop thicker skin, and just let them screw themselves over if they insist on it. Then again, when I think back to some of the ultra-boring Gen-Ed classes I took in college I can sort of relate to them.

    But yeah, I’m way to nice. :P

    Reply  |  Quote
  10. jambarama UNITED STATES Opera Windows Terminalist says:

    I took CS in high school and was first taught pascal, then c++. No complaints with either. However, I got the most practice on my TI-83, seriously. I wrote a tone of games – tic-tac-toe, a bowling game (with graphics), and all sorts of puzzles & mazes. Everyone had mario which was being passed around as a binary, but I liked my games, and I probably got more experience there than in pascal or c++.

    I’ve recently started playing around with something I find just as great. Robocode. I’ve never wanted to pick up java before, but I’m getting quite good. It is fun, engaging, and with examples it is simple enough to be doable but can be complex enough to really learn. Check it out: http://robocode.sourceforge.net/

    Reply  |  Quote

Leave a Reply

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