"There is no one way"

Friday, October 16, 2015

Programming and Math Education

Some responses on Twitter made me realize I was probably not clear in yesterday's post where I argued that computer programming is a kind of literacy.

Some people say that students should be exposed to computer science because that's where the jobs will be in the future. There may be some validity to that, but the part of that argument which I think is solid is that not introducing the subject before college almost certainly will help reinforce the gender, race, and class biases in the culture, and in that part of the economy. More kids being exposed to this discipline early on helps fight the damaging stereotype that programming is strictly for nerdy white boys.

But in any case, my point is not about career possibilities, but about powerful ideas. I am old enough to have been inspired by Seymour Papert's vision along these lines. (See his classic 1980 book Mindstorms.) I will mostly clarify what I mean with the help of examples in math, but a similar argument can be made about a possible synergy between physics education and programming. (This is a line of thinking that was pursued by Andy diSessa. See his book Changing Minds, from 2000.) I doubt programming can enhance every curriculum strand, but it can certainly enhance some. Here are some ways it can enrich math education.

- Turtle geometry is engaging, lends itself to experimentation, and rapidly yields fascinating images. At a beginning level, it is a way to explore angles and polygons, or to dramatically generalize spirolaterals (aka loop-de-loops.) At a more advanced level, it provides an environment to explore fractal geometry. Here are some high school student-programmed images:


A single program generated the images on the left, which illustrate a tree structure, combined with rotational symmetry. The image on the right deserves close examination, as it includes an overall three-fold symmetry, but locally has four-, five-, and six-fold symmetric substructures. These examples show a combination of creativity and rigor rarely seen in math classes that exclude programming.

For yet more advanced applications see Abelson and diSessa's Turtle Geometry (1981). My point here is that the right programming environment allows a third grader to be creative, while also offering possibilities for college-level explorations. This combination of access and challenge started with Papert's Logo, a computer language which has had many descendants over the years. One contemporary example I particularly like is UC Berkeley's Snap.

- Probability can be introduced with physical coins and dice. But experiments with those quickly get tedious. Programming makes it possible to experiment at an appropriate scale.

- Some mathematical ideas are algorithmic by their very nature, and can be taught better with the help of programming. Mathematical induction, for example, is not unlike the sort of iteration that is fundamental to programming. Or take Riemann sums: those can be created and manipulated by way of a student-written computer program.

I don't claim that programming is necessary to teach math well, only that it can be helpful. The programmer's habits of mind (breaking down large tasks into small ones; thinking about structure hierarchically and logically; seeking clarity in presentation and precision in language; and so on) are useful in a wide range of human activity. I hope that much resistance to bringing this to all students stems from lack of acquaintance with a appropriate curricular examples in a suitably "low threshold, high ceiling" programming environment. (Certainly using C++ or other languages professionals use is not the way to go in the classroom.)

Alas, some resistance comes from the fact that this is new (i.e. 35 years old, not 135), or perhaps it's just good old American pragmatism, the idea that thinking is for them intellectuals, and that us normal people are happier just clicking mindlessly on buttons other people have programmed.


No comments:

Post a Comment