Mathematics and Programming

In this wonderful blog post, Ted Dziuba talks about learning programming like a mathematician. I am glad that the emphasis of mathetic thinking is coming back.

This article is a little more abstract, talking about the similarities between learning mathematics and learning a programming language. The goal of this article is to give programmers a framework by which they can effectively learn a new programming language, much in the way that a mathematician learns a new area of mathematics to the point where he or she can be effective.

In conclusion, Ted summarizes the essential similarity between math and programming.

  1. Find the fundamental theorem, the sine qua non, of the language.
  2. Understand how this fundamental theorem influences the structures and design decisions of the language, and how it is used to establish relationship between different parts of the language.
  3. Practice and read documentation to the point where you can mentally picture how to fit the language structures together in the most efficient possible way to solve a problem.

Peter Norvig in his Teach Yourself Programming in 10 years says:

Learn at least a half dozen programming languages. Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal).

I think the essense of programming is to build powerful mental models of the problem and the ability to deal with abstractions. A training in Math definitely helps in developing this skill.

One thought on “Mathematics and Programming”

Comments are closed.