Programming is not Mathematics

This is programming.

total = 0
for (i in 1:100) {
  total = total + i
}
total
## [1] 5050

Figuring out that you ought to do this instead is mathematics.

100*101/2
## [1] 5050

There’s a lot of excitement about technology education, which is good. Teach everyone to program! Yes! Program or Be Programmed!

What there isn’t enough of yet is the realization that programming is a basic skill, more akin to multiplication tables than it is to critical thinking, more done by rote than innovative.

Like elementary-school calculating, there is value in learning to program, both for the pure utility and foundational nature of it and for the organized patterns of thinking that it can begin to inculcate.

And programming does provide another avenue for the deepening of thought, just as writing an essay can allow for careful reflection and refinement of thinking. It allows it, but it does not require it, and in this way there is a clear similarity across many fields and all their basic toolkits.

Programming by itself is not enough. Learning the mechanics of one programming language this year does not prepare you for a job a year from now. It may be necessary, but it is not sufficient. I hope educators and learners will reach for deeper learning objectives as they work with technology. It is a means, not an end.

Alternate titles:

  • Programming is not Computer Science
  • Calculating is not Mathematics
  • Calculating is not Computer Science

(Examples above work in R. Apologies to <-.)