Teaching Perl to Middle School Students

I have taught Perl to middle school students over the last several years. They have learned how to program in Perl and I have learned how to teach them how to program in Perl. I think we've both learned a lot! My purpose in describing this effort here is to show you what worked for them and me and what did not.

The First Effort

During Spring 1998, the Computer Club advisor (who was a Science teacher), the LRC Director, and I organized the first effort to teach Perl to Washington Junior High School students who were members of the computer club. The Computer Club met every Monday after school from 3 pm to 3:50 pm. Students were asked whether they wanted to surf the web, download various games, etc., or learn Perl. The advisor worked with the group that chose the former while nearby I worked with those that chose the latter.

Initially, my goal was to teach the students enough Perl that they could write a "hangman" spelling game, using as spelling words the lists that were part of the sixth grade curriculum. I wanted to have something which would be fun to do, would be a learning experience for the students, and could be fed back into the main curriculum. As the sessions progressed, it became clear that a more well-specified project was desirable. We therefore switched to the project of writing a tic tac toe game which we did achieve.

I wrote the lesson materials for this effort along the lines of a traditional text book. You can explore these by following the links below. I began with an approach that tried to connect learning a computer language to learning a natural language. You can see some of this motivational connection in the early links.

An Evaluation of the First Effort

Overall, the first effort worked out well. We began with six students (all boys) and two teachers taking the class.  We ended with one student. All in all it was a fun experience and the students, including even the ones who did not finish all the sessions, appeared to have learned something as well!

My analysis of the reasons behind the attrition is as follows:

Finally, though the English language motivation made me happy and seemed to be of interest to the adults in that it connected the effort to something they understood, as near as I can tell the students didn't much care. They just wanted to learn to make the computer do something.

It is clear that the text book organization did not work very well. What I found did work was an organization that consisted of a short paragraph of information followed by an example perl program demonstrating that information. You can see that I adopted that format with increasingly frequency for the later lesson materials. I also learned that having to type the examples in resulted in the students spending a lot of time debugging their own typing mistakes.

The Second Effort

During Spring 1999, a different Computer Club advisor (who was a Language Arts teacher) and I organized the second effort. Again, the club met every Monday after school from 3pm to 3:50 pm. This time, though, the session was solely devoted to Perl.

My goal was to teach Perl to the level that the students could begin to see how to write a simple game. I re-wrote the handouts entirely structuring it as a series of single pages.

Each page was organized along the lines of a short paragraph of information about the Perl language concept being presented, an example demonstrating it, followed by two or three open ended questions about the concept. Usually, one of the questions asked them to go back and change the example to do something slightly different.

In addition, I provided the examples on floppy disk and an initial set of instructions describing how to move the examples from the floppy disk to a folder on the computer's hard drive.

An Evaluation of the Second Effort

This organization worked very well. Not only did the students seem to be excited by their quickly being able to make the computer do something but the format allowed each student to proceed at their own pace--as slowly or as rapidly as they desired. They were asked to raise their hand each time they completed a page. The advisor or I would come around, ask them to tell us their answers to the questions at the end of the page, and then we would "sign off" by initialing the bottom of the page. They would then go on to the next page.

The difficulty here I found was that many students were doing the individual pages almost by rote. The examples and the questions did not require them to think very much. Instead, they could almost guess the answer, get us to sign off and then move on.

Still for a club it was quite successful in that the students were really having fun as evidenced by the commotion, the frentic pace, and the high activity level in the room.

Handout Materials of the First Effort

Below are links to our handout materials for the first effort...

Handout Materials of the Second Effort

I am considering whether or not to post the handout materials of the second effort. It may be that I will try to develop the handouts in a way that can be made available for modest cost. Please contact me if you are interested.



To: David J. Ritchie - Volunteer

To: The Web Site of David J. Ritchie