Math is programming

Lately the people of the Internet have been concerned about whether programming is math. Sarah Mei has written a good post about this: Programming Is Not Math. Here I want to record my internal dialogue on the matter.

Is programming math?



Because programming and math are so deeply interlinked that it’s impossible to distinguish them in their core. For example, have a look at type theory. Does it describe mathematics? Yes. Does it describe programming? Yes.

Is that the only reason?

No. Doing programming and doing mathematics feel the same to me. Thinking about proofs feels like debugging programs. Exploring mathematics feels like exploratory programming.

Do I need to be good at math to be a good programmer?

Yes. Programming is math, so you can’t be good at programming if you aren’t good at math.

Do I need to learn math to learn programming?

Yes. Programming is math, so you need to learn math.

What kind of math should I learn to learn program?

Since programming is math, your best bet is to start by learning programming.

What if I’m bad at math? Can I still learn to program?

When you say you’re bad at math, you probably mean you didn’t do too well in the school math class. Programming is math, but luckily it’s very different math from what they teach at schools. You should give it a try, you might be surprised by how good you’re at math.

Do you agree with Sarah Mei?

Yes, even though programming is math.

Does it matter whether programming is math?

Not at all. Math is programming, though, and that is interesting.

Comments or questions? Send me an e-mail.