The Code Experience vs. the Math Experience

In the book The Mathematical Experience, the chapter on symbols mentions computer programming [1]. But it really doesn’t do justice to programming (aka coding). In fact it’s actually one of the lamer parts of an otherwise thought-provoking book. It’s not that it’s dated—a concern since the book was published in 1981—but that the authors only provide the paltry sentence, “Computer science embraces several varieties of mathematical disciplines but has its own symbols,” followed by some random examples of BASIC keywords and some operators.

cover of the edition I have

As mentioned in “The Disillusionment of Math,” I’ve always thought of programming as different than mathematics. And I almost always choose the experience of thinking in code over the experience of thinking in equations.

But I suspect others think of these as similar activities occupied by mathematical people. Likewise, if a programmer tells somebody that they are a software engineer, the keyword “engineer” can create a response of “oh you must do a lot of math.”

It’s understandable that programming would appear to be a math activity. After all, they both involve wallowing in pools of nerdy symbols and syntaxes. And computing in general does have an intertwined history with mathematics.

It’s actually a bit hard to actually try to see what basic things I take for granted. This is not a researched exhaustive list, but here are few of the overlapping things between programming and math that come to mind:

  • The use of numbers
  • Symbol manipulation
  • Specialized grammars
  • Symbols representing variables
  • Staring at aforementioned symbols for long periods of time
  • Generalization
  • Representing real world objects and processes with abstract concepts
  • Creating meta-concepts (e.g. structures about structures, symbols referring to symbols) within their systems

But programming and math are also very different. Abstract concepts are not merely written down symbolically—they are actually implemented. General ideas are instantiated. The computer executes the code. It is running. It is alive.

“The electric things have their lives, too.”
—Philip K. Dick, Do Androids Dream of Electric Sheep?


[1] P.J. Davis & R. Hersh, The Mathematical Experience, Houghton Mifflin, 1981.

Tags: , , ,

Leave a Reply

You must be logged in to post a comment.