Should Competent Programmers be "Mathematically Inclined"?

Hmm. I got my first degree in Fine Art, then took up programming. Always saw it as an entirely creative/artistic process, just a different bag of brushes. I’m old enough to have programmed in assembler 'cus no-one told me it was hard. Along the way I picked up Maths (note, the ‘s’ on the end, it is short for Mathematics. Math is, well, just short.) Enough to get a second degree in it anyway, but that was just for fun. 25 years on and several hundreds of million of dollars of development spend later, I still see it as a creative/artistic process but with an even bigger bag of brushes.

I used to develop the math I needed back when I programmed for fun. Like reinventing the wheel. For instance, I used to do it with 3D software rendering for ex. Trouble was, whereas you can rotate a vertex around some point with 9 operations I did it in 12. It hadn’t immediately occurred to me there was one lest simplification to be applied.

I ended up making myself look like a fool to people with inferior skills that had just been taught to mechanically apply matrices to the problem without ever bothering, or being able, to intuitively grasp what was happening and why. Whereas I hadn’t even learnt of rotation matrices in school but had developed the needed math myself.

Right now I’m working on open problems and algos no one has trekked before. Again developing the math I need as I go.

Mathematical inclination and agility or intuition is the difference between a mere coder and a programmer.

You can probably train simians to code.

I agree with the last point made “most programmers are smart enough to learn whatever math they need just in time to attack the problem at hand.”

Of course as you mentioned it depends on what you’re programming.

As far as what types of math courses there are that are actually pretty useful in programming, I’d definitely have to go with finite math. I was having some trouble in the course but I found an online math tutoring site that really helped me out. Anyone else interested in finite math or taking a finite math course it’s http://finitehelp.com. I also find that http://projecteuler.net/ is a lot of fun for learning programming and solving math problems.

1 Like

Note that he specifically says native tongue, not English. Which makes me wonder why all of Dijkstra’s most important writings were in English, not his native Dutch.

Because, as you point out elsewhere, English is the language of international communication, especially in computer-related disciplines.

But you don’t need to have an exceptional mastery of English for what he’s talking about: you have to have an exceptional mastery of some language, and almost by definition your native language skill will be better than (or at least as good as) your English. If you can come up with the ideas in your native language, and you have good enough English, you can probably translate the ideas into English. (Or into code, for that matter.) Without that mastery of your native language, you just can’t have the ideas at all. (Or at least not in a way that they have sufficient rigour.)


Others here have pointed out that Math Is Not Numbers. But let me give one of my favourite examples. Consider the following functions.

def f0(a:int, b:int) -> int:
    return a + b

def f1(a:set, b:set) -> set:
    return a + b

def f2(a:str, b:str) -> str:
    return a + b

def f3(a:Thingie, b:Thingie) -> Thingie:
    return a + b

For a start, they are functions, which is right there a mathematical concept. But let’s look at what they have in common: they all use +, and + has a different meaning in each one.

Or does it? It sorta feels like there’s some sort of similarity going on there, right? And there are other things one could do say that clearly don’t make sense: intuitively most people would say, I think, that you couldn’t write a similar function with the signature (a:str, b:int). Why?

As it turns out, the + operation above is a semigroup, one of many algebraic structures embedded deeply in almost all code and used by programmers every day. Even if she has no idea what a semigroup is, a good developer will still have some sort of intuitive understanding of this, and the better the understanding, the better the programer.

Your math-fu is much greater than you think it is.

(If you don’t believe me, consider how well you understand the symbol =, which four hundred years ago would have been a mystery to most professional mathematicians. Not to mention the idea of ‘zero,’ which two thousand years ago was a big mathematical program, not something taught to grade school children.

1 Like