Teaching Programming

November 21, 2010
  • Math
  • Technology

I recently watched a TED talk where Conrad Wolfram (brother of Stephen Wolfram, creator of Mathematica and Wolfram Alpha) suggested that mathematical education in grade and high schools make the transition from traditional pen-and-paper based computations to computations using computers and programming. (See his talk here)

Its an idea Ive Ive agreed with in principle for a while. In the real world, the vast majority of math that is taught in schools is never used. Im a physicist, and even I (outside of an academic environment) dont ever do an integral by hand, or long division, or many other of the rote calculations I was trained to do by hand. In real research, or in business, the most common problem that one encounters is the task of sifting through a large set of data and making sense of it. One must learn to be a narrator, telling a story through graphs, trends, histograms, regressions, and statistics. And the tool for doing this is the computer. More specifically, the tool to do this is familiarity with programming. And I mean programming in a more broad sense: not limited only to the traditional languages like C, python, and fortran, but instead being able to effectively and efficiently using things like Excel, Mathematica, R, and other means of turning ideas and data into answers.

I would love to see these skills taught in classrooms. However, one should be careful not to go completely over the top with the rejection of traditional methods. Programming requires an extensive foundation in traditional mathematics, especially algebra. After all, most programs are nothing more than the creation and repetitive manipulation of variables, turing input into output, which is exactly what algebra is (in the sense that it is taught to middle schoolers). So, one can not completely toss out the baby with the bathwater (whatever that means). At the same time, the teaching of algebra should focus not on specific ways of solving a small set of well-documented equations, but instead should focus on the creation of algorithms and abstract manipulation. One should see a quadratic equation not as something to plug into a formula but rather as a statement; a relationship between very general quantities that must hold true.

At the same time, I wonder how best to introduce programming into the lives middle-schoolers who already have so much on their plates. Clearly not every child has the time or the interest to sit down in their free time and teach himself C++ for fun. While there are simple languages that avoid a lot of the annoyances that can come with programming (Java, python), even those come with a lot of initial hurdles. Im really not all that familiar with what is out there, but if I were a company like Apple or Microsoft, I would see a lot of potential in writing a programming framework that can work out-of-the-box and can be marketed to schools and kids. I know personally that there are many obstacles that one must overcome even before he begins to write a program: he must deal somehow with a command line, he must figure out how to compile and possibly link, he may need to learn a new text editor, and then he must learn the various syntax of a programming language. Im aware that there are many frameworks that eliminate many of these hurdles, but Im not entirely convinced that there is one that is aimed at beginners programming and that would be suitable to mass distribution to students. The framework I envision would of course integrate the text editor, compilation (if necessary), syntax-highlighting, and the execution of the program. It would make available (in a templated way) the various functions and statements that can be made ( if statements, for loops, simple input-output functions, etc). It would avoid horrible nomenclature ( Im not sure who came up with the term continue in C languages, but its needlessly confusing).

Anyway, details aside, the overall point is that kids should leave high school with some understanding of the types of problems and programs that theyre going to encounter in the real world.