## Programming Is Not Math

*October 4, 2014 at 8:36 am* *
9 comments *

Fun and interesting blog addressing the belief that mathematics is necessary for programming, a misconception that Nathan Ensmenger claims has reduced the percentage of women in computing. Sarah Mei goes into some depth addressing (and dispensing with) each of the three claims below

Specifically, learning to program is more like learning a new language than it is like doing math problems. And the experience of programming today, in industry, is more about language than it is about math.And my next thought, of course, was why doesn’t anyone else think this? Why do we still have this idea that math skills indicate programming potential, while language skills mean you should go into poli sci?Well, when I feel out of my depth, I usually start by looking for “official” opinions. So I looked for relevant academic research.

WTF ACADEMIA?!?I found absolutely none, which is pretty flabbergasting. I found a lot of opinions, both from computer science educators, and from people in industry. Perhaps within academia, the link between math and programming is considered such an obvious truth that it isn’t worth confirming with research.It seems more likely, though, that this research exists, but not under the search terms I tried. Please let me know if you are aware of relevant papers.In the meantime, if we can’t have data, we can at least examine the conversations people have on this topic. Here are some things people often say when asserting that people must be good at math to be good developers.Generally, they fall into three categories:

1. “You need to know math to be a good programmer.”

2. “You need to learn math to get the skills you need for programming.”

3. “Plenty of programming is still math!”

via Sarah Mei » Programming Is Not Math.

Entry filed under: Uncategorized. Tags: computing education, math education, programming.

1.Scott Turner (@scottturneruon) | October 4, 2014 at 10:56 amThere is some interesting work out there on this, showing linkages between languages and learning programming languages for example http://thecodingbrain.wordpress.com/2012/12/14/evidence-suggesting-that-young-computer-programmers-have-bilingual-brains/

2.alfredtwo | October 4, 2014 at 11:04 amI was never that good at math. I did ok but never really got to the point where I thought “hey I want to do that.” I discovered programming in college and that more than anything else improved my ability and interest in math. Writing programs to do my statistics homework made me realize that math was fun but arithmetic was boring. And really mathematical and scientific programming is about automating the boring parts of doing the actual calculations. As a professional programmer, which I was for about 18 years, the mathematics I needed was very basic. Sure a lot of real computer science requires serious math but most people don’t do that. Computer science departments often have as their goal turning out more PhDs in CS with everyone else taking courses as less of a priority so there is a push for very high level math there. I suspect that in software engineering the need is a lot less though.

3.Peter-Michael Osera | October 4, 2014 at 2:01 pmThere’s two aspects to it, I believe:

(1) Realizing mathematical computation within a software artifact.

(2) Utilizing math to reason about your programs.

Not every programmer does (1) but certainly every programmer does (2). What I mean by reasoning is answering questions such as:

+ How do I know the code I just wrote does what I think it does?

+ How fast does my code run?

+ What assumptions am I making about my program?

+ What set of tests should I construct to help verify my program?

All of these questions require logical reasoning and (mathematical) models of computation to answer. When people say mathematics and programming are intertwined, they usually (implicitly) mean (2) rather than (1).

4.Bonnie | October 4, 2014 at 1:12 pmA lot of programming jobs, though, are in fields that do require a lot of math knowledge – finance, bioinformatics, big data…

5.Baker | October 5, 2014 at 12:17 pmWe are kindred spirits. I frequently in my programming classes held a (tongue-in-cheek) antagonistic view of mathematics. I had poster in my classroom that showed the words “This is NOT math class” on sign post. I often tell students who come into the class with a lot of preparatory privilege with math that “I won’t hold their fantastic math education against them, and that I will do my best not to let it get in the way of learning computer science.” I do this in a fun-loving way to level the playing field in terms of classroom culture, and in terms of whose ideas will get privilege in the room, and to make it ‘ok’ if up to this point you didn’t do well in math class.

It’s not that there is a not a relationship between math and computer science, obviously, it’s that promoting that relationship to students immediately throws up barriers and biases about what computer science is, who will be good at it, and how (ir)relevant it will be to their lives.

My own personal experience is similar. I don’t think I ever realized I was good at math or understood it until programming let me make quantitative problem solving my own. One way that I say it is: I always loved math, I was just never good at it. Which is another way of saying the way I learned it in school made me think I was not successful (insert every quote from Mindstorms about instilling math phobia). There is one exception to my general experience and that was in geometry – I liked geometric proofs.

It’s not that there isn’t math in computer science, it’s just that there is much more than that. The way we go about solving problems computational resists reduction to formulas – which is my generalized stereotype of the “way” math is frequently taught in K-12 – or at the very least renders them unnecessary. In learning programming there is little reason for a formula. We can always compute things from first principles as long as we can express the steps of solving the problem. Some might argue that logical reasoning about programs or algorithms’ correctness, efficiency, etc. IS mathematical thinking. To that I say, fine, but it’s not the type of mathematical thinking that I think most K-12 students get out of school. If they do it is the exception rather than the rule.

6.shriramkrishnamurthi | October 5, 2014 at 10:02 pmIsn’t this a matter of defining what you mean? If you define “programming” to be “throwing together some code that seems to work”, you sure don’t need any math for that at all. If you define programming as “reasoning carefully about your program and being able to justify its properties”—the kind Peter-Michael Osera does—then you are engaged in _mathematical thinking_ (not math itself). You only need math per se in the third case (your domain needs it: finance, etc.), but the second case depends heavily on the sort of thing math classes are supposed to make you good at (but most don’t, indeed fail at miserably).

Of course, pointing out that an argument doesn’t make sense—because each position is valid if you pick the right set of axioms—is…mathematical reasoning.

7.Michael S. Kirkpatrick | October 6, 2014 at 4:31 pmConsidering the author is a self-described “Ruby & JavaScript developer,” yes, I would guess that her definition of programming is custom tailored to the type of work she does. And, no, you don’t need math to throw together some web hacks. Do you need math to get a job as a web developer? Nope.

But she starts with a good premise (programming != math) and takes it too far. For instance, take the obligatory dig at functional programmers being “cordoned off” into their own languages. Except they’re not. Closures and lambdas, type systems, etc., exist beyond Haskell. Heck, even Ruby has them. Then, there’s the slam on theory and Big-O notation. Her blithe dismissal suggests that she doesn’t understand this comic: http://xkcd.com/1425/. Understanding a little bit of theory of computation and complexity theory can really help you from wasting a whole lot of time on problems that us pedantic academics can tell you are unsolvable.

If she seems to have such strong feelings that programming != math, she might also consider her own false assumption: math != calculation. Her examples of “doing math” focus on scientific applications (probably linear algebra/matrix manipulation), calculating Riemann sums, calculating missile trajectories, etc. In her words, “Computers were for doing math,” which meant “solv[ing] mathematical problems.” That’s a very poor and limited understanding of math and its value.

Overall, I would say that she has a valid point, but it’s misguided. It’s not that math is unimportant or unhelpful for programming. Rather, it’s the

kind of maththat matters. Does calculus or differential equations help you become a better programmer? Doubtful. Would a solid foundation in probability/statistics, number theory, regular expressions, queueing theory, automata theory, type theory, etc.? I would argue so. But her post doesn’t seem to recognize these things as “doing math.”8.Paul Chancey Gowan | October 8, 2014 at 11:24 amActually, I know an author that claimed that English majors made great programmers. I have also often heard it said that music students make great programmers.

9.cristi1010 | February 5, 2015 at 4:16 amReally? What is Math?

That thing done by mathemathicians you say. Some physicist said that he learned very early the difference between knowing something an knowing the name of something.

Mathematics is the language of science. So yes, programming is about language. It is also about problem solving. Programming is Math.

About that saying that programming is for boys, when I was in high school, after I told the head of the computer department of a large industrial enterprise that I wanted to study CS at Uni, he told me “Why? Programming is for girls.” 🙂

After Uni, I worked at a business NGO where none of the employees knew what computers are for or how to use one. My boss was a lady (lawyer) who was willing to listen to me and was not afraid of dialogues that involved computers. When I used jargon, she would ask questions to understand what I was talking about. The lady that replaced here after retirement (also a lawyer) would terminate any discussion that mentioned the word computer (or any related term). “I know nothing about computers, she said” even when the subject really was about solving some problem that needed her expertise.

So don’t use the word computer in your classes. Or any computer jargon.

In my experience, the smart kids are the ones who are not willing to put an effort to learn programming. You see, there is too much work and is boring.

About the misunderstanding of computers, I used to joke that I missed the best career by not studying electronics. My job would be to watch television all day long 🙂

May I suggest you start teaching programming with the language Prolog?