As a high school computer science teacher, I’m always trying to find ways to increase interest in this rich subject. Of course, there’s the obvious “the more students who take CS courses, the more my school will need my services to teach CS classes” aspect. But aside from that, I have long recognized that CS is a subject that a lot of students shy away from because they don’t know anything about it. I’ve got a growing list of students who, after taking their first programming class, discover a new passion. The unfortunate reality in my school is that the majority of students take just one class, and making matters worse is that it’s Microsoft Office. (Granted, it’s important that students be functional in Word, PowerPoint, and Excel, but this class hardly qualifies as “Computer Science”.) And since my state only requires one semester of CS to graduate high school, this is all the majority of students will ever see of the computer lab.
About two years ago, my fellow teacher and I began to realize that by carefully changing the Office class, we could do something about this. By selectively trimming away some of the less critical parts of the curriculum, we opened up 4 or 5 days in the semester’s schedule that we could use for enrichment, or as I call it, Explorations in Computer Science. Borrowing ideas from CS Unplugged, I used these days in the past few semesters to teach the fundamentals of binary (thus letting the kids figure out for themselves the “There are 10 kinds of people” poster in my lab), sorting algorithms (they sort themselves by their phone numbers without ever letting anyone see theirs!), and data encryption (sending messages using a simplified ASCII), and we ultimately get into a day or two of extremely basic programming in VB. The students find the material fascinating, and we’ve seen an uptick in enrollment in our programming classes.
This year we have a bit of a problem, however. Doing these lessons after the Christmas Holidays makes the most sense, as I don’t have to worry about anyone forgetting anything important that they learned two weeks of vacation earlier, and I can usually count on a week and a half to two weeks before the start of midterm exams. The nature of this year’s calendar means that there’s two and a half weeks between these milestones, which means … I need a couple three more “out of curriculum” lessons.
Think, think … what can I do, what can I add? The only rough spot I’ve noticed in the past year or so was when starting up VB. The students seemed to have a good footing with the “unplugged” concepts I showed them, they just had a mental hurdle when we got to “now let’s add some instructions to this VB Form we created.” And I’d rather NOT pack more VB lessons on the end, because I don’t want to have the students who DO decide to enroll in a VB class to essentially start over too much when they start that class. So I started thinking about the various “gentle introduction to programming” paradigms I’ve seen or heard of over the decades. Alice is an option, but it seems too big an infrastructure to tackle (from my perspective), and I don’t have a good feel for what can be done in 2-3 days. Kodu similarly looks like a lot to add to a computer system (in the lab or at home); but maybe I just don’t understand it well enough. I even thought about ChipWits (see several past blog entries), but neither my (now ancient) version nor the (forever under development) commercial version seemed finished enough; plus, like Alice, I’m not sure how those lessons could be applied in a real programming environment.
Suddenly the words “turtle graphics” popped into my mind. This was something introduced decades ago, intended to be the “gentle introduction to programming” for the world. The theory was you have a canvass (the computer screen), with a “robot” turtle in the middle. You give the turtle simple commands (“forward 100” pixels, “right 90” degrees, etc.), and the turtle moves on the screen. The permitted instructions make up what was called the LOGO language. The turtle has a pen attached to its tail, so lines are drawn as it moves. Without a great deal of effort, you can create some fairly complex drawings with very simple instructions. Obviously, it never went anywhere, but could I find use here, I wondered. A quick web search turned up a number of links to sites describing the various programs available (Wikipedia says nearly 200 implementations over the years), but I couldn’t find any self-standing versions (not that I looked that long). Geek that I am, my first thoughts were, “I wonder if I could write one?”
I must admit, I impressed myself. Starting from scratch, and a few websites to describe the LOGO language, I had a simple Turtle Graphics program with LOGO interpreter written in VB in about 2 hours. An hour later I had looping. Another half hour and I had file capability (to save and restore your creations).And about three hours later (2.5 spent “thinking”, half hour coding) procedures were working. There’s still more to add (variables, and the “turtle” icon itself come to mind), but it’s quite amazing how quickly this came together. (Click on the image to zoom in.)
The pretty pattern of circles was generated from the eight lines of LOGO program on the left side. Aside from knowing that “forward 2” means draw a line two pixels long, and “right 1” means turn one degree to the right, the rest is entirely easy to understand even for non-programmers, which is the whole point!
Now, how will it be received in the classroom …