Classroom Video

Copyright 1990 Daniel J. Barrett. This article originally appeared in .INFO Magazine, April 1991. This article is freely distributable as long as it is not modified.

Learning computer programming at the college level can be a difficult task for beginning students. I see their struggle, because I teach hundreds of these students every year at The Johns Hopkins University. Even if they have previously used languages such as BASIC, Pascal or C, the students soon discover that knowledge of the language is totally different from knowledge of programming methodology. There are important, underlying concepts that few students learn before reaching college.

Many of these concepts are difficult to illustrate to hundreds of students in a large lecture hall. To combat this problem, for the last two years I have been using my Amiga to create instructional videos for computer programming. They are displayed in the lecture hall using a video cassette player, a projector, and a movie screen.

These videos are not self-contained presentations that are meant to replace a human instructor. Instead, they replace the blackboard, and they are more powerful and dynamic than slides or overhead transparencies. Of course, it takes much longer to create a video than it does to write on the blackboard, so I cannot replace the board completely. At present, I try to show one five to ten minute video for each of the major concepts covered.

My goal in writing this article is to encourage other educators, particularly those with large classes, to use custom-made instructional videos in class. They are easy to create on Amigas; you don't have to be a great artist by any means. (I'm certainly not!) I can testify that my videos have a positive and lasting effect on my students.

Why Instructional Videos?

A college student typically has many learning aids: the teacher, teaching assistants, textbooks, and friends. Why add instructional videos? Because they can improve the quality of lectures in several ways:

  1. Blackboards are fine for illustrating static processes, but terrible for displaying things that change over time. Video is a great alternative. For example, I often want to demonstrate pictorially what happens while a program is running. Rather than fill the blackboard with dozens of drawings, I would much rather use a video so students can see the process in "real time."
  2. Videos stand out in the viewers' minds. At the end of every semester, when the students rate the course, many of them remember the videos and call them helpful and enjoyable.
  3. It's a fact: in a large, stuffy lecture hall, late in the afternoon, students tend to get sleepy. Videos wake them up!

The General Method

The methods I use for creating videos are available quite inexpensively to Amiga owners. Some of the techniques are somewhat brute-force, but the results are perfectly good for classroom display. I tend to use a mixture of animations, still screens, and C programs. Once all of these are made, I just connect a cable from my Amiga 1000's composite output to my home VCR, and then dump the results to tape.

In place of expensive videotape editing facilities, I often make a CLI script that displays the different parts of the video in order. For example, the script might display some title screens using an IFF picture viewer, run an animation player, and then execute some C programs. To minimize loading time, I often move everything to a RAM disk. For faster transitions on tape, I make careful use of the VCR "pause" key.

The output quality would be better if I used a genlock, but clear resolution is not very important in my work. This is because any fine details in the final product get washed out anyway by the video projection equipment.

Here are several examples of some videos that have been used in my classes, or are currently in progress.

Life In Different Dimensions

LIFE is a famous program that simulates the evolution of single-celled creatures in a Petri dish, generation by generation. Based on a set of simple survival rules, creatures in a colony are born, grow old, and die. The "dish" is often represented by a 2-dimensional grid (an array), with one creature per grid cell. Here is a sample set of rules:
  • If exactly 3 creatures border an empty cell, a new creature is born in that cell in the next generation.
  • A creature with too many neighbors dies of overcrowding, and a a creature with too few neighbors dies of loneliness.
  • I used Deluxe Paint III to draw a rectangular grid and a sample "creature":

    Then, using Aegis Animator, I designed animations to illustrate the rules, showing how new creatures appear and old ones disappear in the grid.

    For a full-blown demonstration, I chose Tomas Rokicki's Freeware program LIFE from Fish Disk 306. It displays thousands of creatures evolving at 20 generations per second.

    Maze Solution

    The concept of recursion (a subprogram that invokes itself) is difficult for beginning students to master. One of the most involved recursive programs we cover is that of maze solution. Given a 2-dimensional maze (a grid) with a start and end point, the program must find an unbroken path from the start to the end.

    Because it is important to understand the underlying algorithm, I wanted my students to be able to watch the entire process of maze solution, including correct and incorrect attempts. This problem was too tough for Deluxe Paint and Aegis Animator, so I pulled out my Manx C compiler and Amiga manuals and went to work.

    First, I wrote a small program that generated a random maze on a custom screen. (The program "flipped a coin" for each area of the maze, to see if it would be empty or contain a wall.) For simplicity, I used ASCII characters for the display, since the students themselves would be working on non-graphic terminals.

    Once this was done, I added code for solving the maze. The program would drop a "marker" as it explored a particular square of the maze. If that square turned out to be part of the solution, the marker remained; otherwise, it was "picked up" (removed) and another path was explored.

    In this way, the students could watch the program explore one path, reach a dead end, turn around, and try another route.

    Finally, I used Deluxe Paint to create a few motivating title screens, made a CLI script to execute everything in order, and dumped it all to videotape. This turned out to be the most popular video of the semester.

    Dynamic Memory Allocation

    The toughest subject in the course is definitely dynamic memory allocation and pointer-based data structures. This is the process of asking the operating system for chunks of memory, and then chaining these chunks into structures that can grow and shrink. One such structure, the "linked list" is simply a chain of memory chunks linked together, much like the cars of a railroad train.

    Since all of this "asking" and "chaining" occurs in memory, it can be difficult for students to visualize the process. Instructors typically have to draw many pictures on the blackboard, erasing and redrawing as needed. Through video, I have found a better method.

    Using Deluxe Paint and Aegis Animator, I constructed an abstract "machine" (with a little conveyer belt) that produces a chunk of memory whenever asked. This is a model of what happens inside the computer. Initially, the memory contains undefined (garbage) values, indicated by blotches and bent arrows.

  • The above picture does not display well on monochrome or 4-bit greyscale displays. Try to view it in color if possible.
  • The students watch as the new memory chunk is filled with proper data values, and then inserted into the linked list. The arrows (pointers) are animated so the students can see the order in which pointers are linked and unlinked. The students also see what happens when a programmer is careless with unlinking: part of the list can be lost.

    The Future

    One problem I would like to overcome is that my video-making method is primitive. Since the time that I started making these videos, some fine multimedia packages have come to market. In the near future, I'd like to get a faster Amiga with a genlock, and use AmigaVision and AREXX for more integrated and convenient presentations.

    Another problem is that video projectors are not interactive; I need to plan the entire video in advance, and narrate as it is displayed. Instead, I would like to bring an Amiga directly into the classroom and connect it to a projection unit, giving me greater flexibility during the presentation.

    In this article, I have tried to demonstrate the usefulness of video in teaching introductory computer science. If anybody would like to discuss this topic with me in more detail, you may send electronic mail to me on the Internet at barrett@cs.umass.edu.

    About The Author

    Daniel Barrett is a former Associate Research Scientist and Lecturer in the Computer Science Department at The Johns Hopkins University in Baltimore, Maryland.

    - barrett@cs.umass.edu