Home ] Counting Integers ] Tube Plots ] 3-D graphs ] Guess and Check ] Monte Carlo Simulations ] [ Progamming to Develop Abstract Thinking ] Interpret Charts ] Matrices/Transformations ] Find a Formula ] Probability ]

Using Computer Programming to Develop Abstract, Analytical, Geometric, and Algebraic Thinking

(How to Make Good Use of All the Old Computers in the School)

Introduction

A major emphasis in the mathematical curriculum as we move into the 21st century is for an integration of different areas of mathematics. Despite any preconceived notions you may have about computer programming, it has continued to be one of my students’ most enjoyable and rewarding experiences. The activities I will describe have been invaluable in developing my students’ knowledge of analytic geometry, the concept of variable, and enjoyment of mathematics. Students are often so eager to complete parts of these projects that you may even find them working on them before or after school, or during study halls. Do not be deceived by using programming to teach the mathematics, these activities are about learning mathematics, not computer programming. Once the small initial problems with the syntax of a particular language have been overcome, the mathematical problems become the focus of students’ thinking. These lessons can be started with children at least as young as sixth grade and be made challenging enough for the most advanced seniors. Since I have taught all ages from elementary students to adults, many of the activities I use with students differ only in the levels of abstraction built into them. For example, both the sixth grade and twelfth student must build a house, but the levels of abstraction built into the assignments distinguishes the different age levels.

The languages I am using for these examples are Think Pascal 4.0 (Symantec, 1991) and Hypercard 2.2 (Claris, 1997) for the Macintosh. You can use any language you prefer, although one with some basic built-in graphics procedures would be best. Or you may want to start from the ground floor and develop your own routines for drawing rectangles and circles. The simpler activities can also easily be done on a graphing calculator. You may find yourself amazed at how engaged your students become. I especially like to use these lessons as a Friday or pre-holiday lesson. I allow students as much time as they need to complete their projects, each student works at their own pace. They move on to the next phase of the project only when they have completed their current phase. I do not put any pressure on students to complete anything by a certain time, and I have never had any problems doing this. In fact students seem more eager to be involved when the pressure of time and grades have been removed. Assessment of students is based strictly on performance and participation.

The Beginner’s Projects

I start with a simple project. Students must first "draw" their names in stick letters using a computer language. See Figures 1, 2, 3, and 4 for examples in Think Pascal and Hypertalk (Claris, 1997). I do not know if Symantec still supports Pascal for the Macintosh, it is unfortunate if they do not, because it has proven to be one of the most valuable technological tools for learning mathematics that I have encountered. After doing a stick name, students next must write their name in block letters using rectangles and circles (See Figures 5, 6, and 7). These "name" activities are often students’ first introduction to a coordinate system. They usually grasp the concepts quite firmly by the time they have finished both names. For teachers unfamiliar with computer screen coordinates, the origin is located at the top left of the screen and as you move to the over to the right and down from the origin, your coordinates are both positive—(positive, positive). This is unlike the Cartesian system we usually teach where the computer screen would correspond to quadrant four, in which the coordinates would be (positive, negative).

The next project for students is the house project, this idea originally taken from my own beginning Logo programming projects. Students must build a simple house (See Figures 8 and 9). This house does not usually pose too much of a problem for students. Making the peak of the roof stay over the middle of the house may be a little challenging for some students. We have here a straightforward application of the midpoint theorem. You may be surprised that despite the fact that students may have just finished a section in the text on midpoints and distances, and successfully completed your unit test, they can not immediately apply what they have learned. I do not tell students the answers, but guide them through the process, giving them as much time, and as many trials and errors as necessary for them to build their own knowledge.

Students are allowed to conjecture and then check their work over and over again. I provide very little input after initial explanations. I will occasionally help with the syntax of the language. When students do get stuck with these beginning projects, I emphasis ways of verbalizing what they are trying to locate or draw on the screen, and try to get students to think in terms of those words. For example, when a student is having trouble drawing a line between two points, we practice thinking in terms of "over, down" to locate each point. The programming language, and language of the computer’s coordinate system is shaping students’ thinking. This is a good thing. Even though they may be constricted in their thinking because their language is limited, they have mastered a specific environment. When exposed to new situations and technological environments, they will more quickly master these systems because of their experience.

One of the first things you may observe about students is how each one solves problems. The computer environment allows us to " see and hear" each students thinking. If we are not critical of students during this process and allow them to experiment and develop their ideas, we will see their ideas as they try them out in the programming environment or on paper, and hear their discussions with us and with other students. I’ve found computer activities such as this provide teachers with invaluable insights into individual student thinking in ways not possible in "normal" classroom activities. We can even get a better understanding of many students’ thinking than through student writing about mathematics. Student writing about mathematics is now being pushed in assessment of students and has value. Many students however, lack the sophistication with the English language, and the language of mathematics, to express themselves coherently. Teachers who seriously use student writing as a tool to evaluate students’ learning must often interpret and infer meanings, which really is a subjective process, opening up the door to prior beliefs and knowledge of students. When communicating in a computer programming language, the students are limited in their vocabulary in a good way; their thought processes are entirely exposed through what they have written. Students are no longer covered by our perceptions of them. If the program works, then they are correct, if it doesn’t, then they need to rethink the problem Computer programming naturally requires debugging, and a lot of the student’s time will be in re-thinking their ideas. I help with some syntax such as parentheses; they must solve problems with logic and algorithms on their own. When students do encounter an error you may observe many of them change many different things in their programs, hoping to get the problem corrected. They may delete several lines of code, and change several parameters in a function all at the same time, even if parts of their code are correct. When they are still in the experimental stages of learning in this new environment, the most obvious method of solving a problem is to change only one parameter or line at a time, and then watch the changes. Many students need to be taught how pinpoint a problem. This is a learned behavior, and the problem solving skills alone acquired by students through this project are invaluable.

Developing the Concept of Variable

After basic construction of the house, a subroutine is added to draw some grass on the lawn. The grass is used to develop students’ understanding of variable and their ability to think abstractly. See Figure 10 for the program a student may create when starting to draw the grass. Students must first create each blade of grass individually working their way from the left edge of the screen to the right edge of the screen. After about 20 blades of grass they will naturally begin to look for an easier method, or else question your sanity as a teacher. They can see from the lines of code on the screen what part of the grass remains constant, and what part is varying. They are now ready for the introduction of a repeat loop and a variable. You can use your favorite form of loop such as for or while, I am beginning to favor repeat simply because the word "repeat" is closer to how we conceive of the process in our language. See Figure 11 for how a student’s first repeat loop may look. I especially like the English-like syntax of "add five to grass_hor_location" of the Hypertalk language.

When introducing variables in a computer environment, I believe strongly in the using variable names that reflect what the variables represent. I require my students to use extremely descriptive variable names, without abbreviating any more than necessary. I feel allowing our minds to go through less translations frees us to concentrate on understanding concepts and solving the larger problem. Variable names such as "x" or "h" are not acceptable. If students have not worked on these projects for several days, they must be able to come back and step right into where they left off, using descriptive names is important for this. As a teacher, you will be helping many different students with their programs, as they get more complex you must also be able to read and understand each student’s program, descriptive names facilitate this process. When students begin to translate thoughts in their mind into English and then into the computer language such as Pascal or Hypertalk, keeping as many similarities as possible is essential. You will in fact begin to see and hear students think in terms of the computer language, bypassing much of the English translation, especially if you use descriptive variable names. Students as young as seventh grade can grasp and apply the concepts of variables and computer loops.

The first time a loop is introduced it will obviously require a lot of input from the teacher. Students must be instructed on the proper syntax and structure of a loop. You may choose to create a loop and then step through it using a variable watcher which are available in most debugging programs so students see the variable change step by step. However, you will not be doing all of the work for students because they must next create more rows of grass and create their own loops for each row. See Figure 12 for a picture of a house with several rows of grass. Older students will be able to use nested loops to draw all of the grass (See Figure 13). At this point in the house program you may choose to move on to the picket fence or to a whole new level of house. I am going to add the picket fence later and start the more advanced house.

Create a movable house

The advanced house must be based upon four variables or constants if you prefer—left, top, right, and bottom, or you may prefer to use left, top, width, height (See Figure 14). Figure 14 is an example of an interactive house that allows the user to input the size of the house frame. The objective is to build a house that can be resized and/or moved by changing any or all of these four variables. When the house is moved all of the components of the house such as doors, chimneys, frames and windows must move and fit with the house. By the way, everyday that we operate a computer in a window-like environment we apply the basic concepts of the house program. Move a window around the screen and watch everything contained in the window move with it.

This is where you can actually watch and hear students beginning to think abstractly. They move from talking about numbers to variables, but unlike many applications in a mathematics textbook, these variables have a concrete meaning to them on the screen that they can refer to as needed. Students working in pairs or side by side on different computers will engage in much discussion about the correct way to approach the problems. The conversations center on things like "Let’s take left+right divided by two and add it to the left of the house." The language students are using depend upon the computer microworld we as teachers have established. Thus students’ thinking has also been influenced by this environment. Students as young as eighth grade will be engaging in conversations about abstract concepts typically taught in an analytic geometry class, and the problems and language make sense to them.

I like to keep a certain order in building the house when students start the advanced house. First the frame, and then next the roof. And even though students may have recently completed the roof using numbers instead of variables. The problem usually presents a challenge for most students. For the first time they must compute in general terms—left+right instead of 100+200. As with all concepts, students will progress through these stages at different rates, so I do not impose any deadlines on students. They work according to their own ability and progress at their own pace. Since the project will get more complex, the faster students never run out of things to do. Some of my faster students have completed the house in three dimensions and then put in some computer animation. Finding the horizontal midpoint will be one of the common sticking points for students, give them time and they will get the problem solved. For students experiencing too much difficulty I usually use hints that rely on relating the average of two points to the midpoint.

After the roof, students start learning about division and/or multiplying by a scale factor, as they attempt to fit in the doors and windows. They are operating between the "elementary" math world of using manipulatives, and the more "advanced’ world of complete abstraction. Performing mental operations on the objects on the screen, and then being able to check the correctness of your operations by running the program, provides students with mental representations of abstract concepts. Using the computer for an activity such as the house is a hands-on, activity; you will observe the students as they put their hands on the screen to estimate and conjecture. Many students I have worked with at the high school level finally begin to gain a concrete understanding of division because the work they do on the house.

As the project proceeds, from the beginning house to the more advanced house, I provide students with less and less help. My only interventions are to help with the syntax of the language, and provide students with some clues after they have struggled long enough without making any progress. But "long enough" in my terms may consist of several days of class depending on the complexity of the problem. When students do complete the house, it is their own project, not the teacher’s.

At each major step along the way such as the door, window, etc., you may want to give the program a test run, so students and the teacher are not overwhelmed by a too many errors at the same time. I will usually test student projects by going around and changing the size and location the house after students indicate they are ready for a test run. The subroutine for the grass remains the same as in Figure 13. Figure 15 is the handler (subroutine) for the picket fence. Although the fence may appear challenging, by the time students get this far they can usually create the fence without much problem. The lessons learned on the grass will be evident as students enthusiastically attack the problem of the picket fence.

Summary

I do many long-term projects throughout the year and students are essentially given full credit as long as they are on task in class, with work on these projects counting toward their regular report card grade. Classroom discipline problems have been nonexistent for me with these projects, and students often put in many extra hours of their own time in completing projects such as the house. So I would not be overly concerned about student lack of motivation because of no grade or deadline hanging over their heads. The house project can be used with students ranging in age from middle school to adult. The teacher can set the level of complexity. The teacher can let individual students work according to their own ability; students never really finish, they move on to a more complex and realistic problem. And you are certainly not limited to building a house; I started with this because of my initial learning experiences with the Logo language. But there are many good mathematical concepts to be learned from the house.

This project is structured so that detailed explanation and examples of the computer coordinate system are given to students. For younger students, it may be their first introduction to a two dimensional coordinate system. You may want to do examples on an overhead for students to get them to think in terms of the new coordinate system. I will actually give more help to students on the beginning projects. The level of complexity of this sequence of projects is what I strive for as a teacher. The difficulty of each succeeding lesson is slightly beyond what students may think they can do; yet they always manage to succeed. You will observe many of the same "sticking" points for students, and this is also part of the beauty of this project. Knowledge that you may have presupposed of your students will be exposed as lacking because they must now apply it in a new environment. But after they have attempted made enough trial and errors, and developed their own models of the concepts, the knowledge will be their own.

Some teachers may be wondering how the time is found to complete a project such as this and still make it through the "regular" curriculum. I have used projects such as the house on days when students have had a late night athletic activity the day before, Fridays when their minds are ready for a break from the usual routine, pre-holiday days, and as projects they can always work on when finished with routine classroom assignments. I believe working on these projects serves to increase student motivation, and I have never failed to cover enough of the required curriculum. I have witnessed the benefit of these types of project over the years firsthand, and am convinced that these long term projects, which connect many areas of math are far more valuable in developing student problem solving ability and ability to apply mathematics than doing 30 algorithmic problems from a page in the textbook.

Reflecting on my own learning, getting feedback from students of previous years, and observing many adults learn and teach mathematics, leads me to believe that the majority of the mathematics that we have traditionally taught is soon lost by our students, probably soon after the test on the material. If you do not believe this, try asking some of your parents to perform simple 5th grade arithmetic such as adding fractions. When students leave my classroom, they may not remember the binomial theorem, but students from most other classes will not remember it either. And loss of this knowledge will probably not have a major affect on their success in the workplace. Students working on the house—a problem solving project in analytic geometry, in which students must draw upon previously learned knowledge and apply it in new situations, and generalize specific instances into abstract applications, develop and retain far more valuable mathematical and personal skills.

References

    Hypercard, Version 2.2, (1995). [Computer Software], Santa Clara, CA: Claris Corporation.

    Think Pascal, Version 4.0, (1994). [Computer Software], Cupertino, CA: Symantec.