Do computer programmers need to be good at math?

I’ve noticed for a long time that distinguished computer programmers (for example, those that are mentioned in journals like Scientific American) tend to have strong mathematical backgrounds. Is there any reason for this?
Some computer programmers that I have met have less technical backgrounds, such as those in the arts or maybe English. Yet they are skilled nonetheless.

So is there any need for a computer programmer to have a strong mathematical background or not? If so, then why? If not, then how come so many people from math go into computer programming?

Just how much mathematical know-how must you have to be a good computer programmer, and is it absolutely essential?

Yes and no. Certainly, I’ve known programmers who can’t do trig, or calculus, of the like. But certain kinds of math use the same parts of the brain (or seem to) as programming. Set Theory was taught as part of my CS curriculum.

More generally, the step-by-step logical problem solving aspects of math are very much like those of CS.

Yes, I’m sure Engineer Comp Geek will be along shortly to back me on this, but Computer Programming is basically a matter of coming up with formulas to tell the computer what to do. For basic (not BASIC, basic) programming a solid grip on algebra and trigonometry is helpful, more advanced programming requires more advanced math skills such as Calculus, Statistics, Geomotry, Analysis etc… Like I said, programming is basically writing formulas, wheather it’s formulas in the common sense of the word (y=x+2…) or a little more abstract (if then clauses, Different types of loops and how to get out of them). It comes down to just being a differnet type of mindset then say someone with a degree in communications. I’ve always said (BTW I have a BS in Math) that you’re either a Math person or an English person. Programming is more for the Math people.

I’m of the opinion that it’s not weather you’re good or bad at math, but that people who understand math have the cognizant thinking skills required for computer programming. It’s my understanding this is also true with musicians.

So, I guess my answer would be: You don’t necessarily have to know math, but a good computer programmer would probably be good at it if he knew it.

E3

Though it is mostly true that math skill is a good sign of potential computer skill. There are other traits that can be equally useful. If you are the sort of person who is good at collecting things and cross-refferencing things into different groups, that is a useful computing skill. If you are into the Grammer side of English and how words fit together to make sentances, rather than the more poetic/inventive side of English. If you can follow logical arguments and know any formal logic systems that is also good. If you have an apptitude for seeing the small things that make up a system (like leaves and twigs on a tree) but can also grasp the full system as a whole (the forrest) that is also a good trait.
Complete lack of basic Math would be a very large dissadvantage in a pure programming job. But anyone who notices when they are short changed by a casheer has enough skill to be able to do some good programming if they have other useful skills or traits from the above list.

Nope. Obviously it depends on what kind of programming you’re doing, but really, it’s all about communicating with the computer. Analyzing the problem, figuring out how to solve it in as elegant a fashion as possible, and then expressing your solution in terms that the computer will understand. Does that last part sound like Math to you?

It is true that if you want to be a Big Name in theoretical computer science, it certainly helps to be good at the proofs, the theorems, and the notation.

For anecdotal purposes, I’m a mid-600’s Math, 790 English on the SATs , PhD computer scientist and I make my living programming.

Which generalizes out of existence those programmers who have become novelist, poets, and technical writers. It also ignores all those literary types I know who can program circles around me (a rather competent programmer) using their word processor macros. This kind of generalization is usually used by programmers who are too lazy to spell-check their documentation and/or by writers who won’t (not can’t) balance their checkbook.

Programming itself often does not require much math, but the problems programmers write programs to solve may be very math heavy. If you’re writing code to do an ecommerce shopping cart or a text processor, the math required may be very low level. If you’re doing graphics (ray tracing, geometry, etc.), statistical analysis, data acquisition, crypto, or any number of other applications, the math involved in the problem you’re working with may be hairy. So, you could probably be a good programmer with no math skills if you were careful about the problems you addressed.

I think the reason you see a lot of mathematical background in programmers is self selection. People who have a certain inclination for logic and analysis may excel at math early in school and end up choosing math, science or engineering career tracks which then shift into CS work. But someone with those skills might choose another path like English and still have the underlying mindset to be a good programmer. At their roots, a lot of liberal arts like languages can use the same logic and analytical skills that make a good programmer.

1: Depends on the field you’re in
2: No.

I have forgotten all the higher maths I ever knew, I can do enough trig for simple graphics but calculus is long gone. Neither of these come up in the programming I do anyhow. I also never did a CS course, most of my learning has been on the job. The same goes for nearly all the other programmers in my office, good and mediocre, only one has a Mathmatics degree and only one studied CS.

To work in cryptography or statistics you will need a solid maths background, for other stuff sixth form (high scholl?) maths will get you by.

I do it for a living, and I think I could do it with a fraction of the math I learned in high school. In standardized tests, I’ve always tested about 88th percentile in math, which is pretty good, but not exactly burning down the house.

I think the most important things are logical skills, a compulsion to get problems solved, and the patience to deal with documentation. Most modern development has more to do with finding and using appropriate APIs than with writing elegant, mathematically sophisticated programs.

If you’re doing the software for a mission to Mars, everything I just said is utter bullshit. But very few developers do that kind of work.

As a programmer, I agree that you only really have to know math if you are doing programming that relates to math (though this can come up in all kinds of ways - like graphics programming). And I also agree that there’s a “way of thinking” that probably means that the sets of people good at math and people good at programming probably overlap quite a bit.

I read an interesting article a while back that talked about IBM’s attempts to identify promising programmers in the days before there were established programming courses at universities. They developed a programming aptitude test, and found that - contrary to all expectations - the best candidates tended not to be mathemeticians, or even engineers but… musicians.

To some degree, of course, music has an underlying connection with mathematics, so maybe this is just another overlapping population.

I wish I’d kept a reference to that article, though. If anyone can pinpoint a cite I’d appreciate it.

Like everyone else says, the skills a good programmer brings to the table are the sort of skills that help in doing mathematics. While higher math skills might not be absolutely essential, it’s hard to argue that they’re bad to have. Most algorithm descriptions beyond the basic stuff are written in English, not pseudocode (IME), so math skills are important for implementing that kind of stuff.

Remember the old adage, “When all you have is a hammer, everything looks like a nail.” The more tools you have in your mental toolbox, the more likely it is you’ll have the right one for the task at hand.

In my experience mathematicians can also make really BAD programmers. They are often very good at implementing complex algorithms efficiently, but less good at putting things in context. Writing applications (as opposed to ‘systems’ programming, about which I have too little experience to comment) requires the designer to ‘stand back’ and view the whole. Some very able math-inclined programmers I have known tended to produce really awful code where all the parts worked perfectly, yet they just did not fit together at all well.

Saying this as a programmer who’s both a math and an english person… :slight_smile:

In addition to all the (generally very relevant) stuff about how aptitude at math generally corresponds with aptitude for logic, and aptitude for logic comes in very handy at programming – a lot of the things people want computers to do for them comes down to manipulation of numbers… not just geometry stuff for graphics, but basic statistics, financial algebra… all kinds of stuff.

True story, on a subcontracting gig, the client was trying to explain to me how the old version of the software generated a particular value, and it used the obvious formula to generate a result… and then went back and plugged that result into one of the variables in the formula, and ‘repeated that five times.’

Me: Ohh, so it’s doing that as a crude way of finding the limit of the series??

Client: What the hell’s the limit of a series??

Neither the client or, apparently, the people who had devloped the old version understood anything about limits, but it was a relevant idea, and my version of the software is, I believe, more accurate and able to do more because I was familiar with the concept.

I’d say it’s probably more likely that to be a good mathematician nowadays, you have to be a good programmer. From what I’ve seen, that is going to be true for engineers as well. I think you’re seeing a certain amount of selection bias here. If you are considering a programmer distinguished because he or she is featured in something like Scientific American, you’re only seeing a slice of the programming spectrum - that slice being the people who are working in the scientific community. Unless I’m mistaken, you’re missing people who are working with database and business applications.

Another issue is that many University computer science programs came out of the math or engineering departments. The school I went to, the comp sci program actually came out of the business department, but I believe that is fairly unusual.

In the mumble**mumble years I’ve been a professional programmer, I don’t believe I’ve ever had a problem that required any exceptional mathematical skills or knowledge - I’ve gotten more use out of the typing class I took in HS. I’ve even been known to say “I’m a programmer, I don’t have to know math”. (Usually after an especially stupid math error. )

However, like others above have said, math and programming probably use similar areas of the brain. Boolean logic is related to math and an absolute must for programmers. And programming for business if very often like solving story problems, only more so.

Still, if you’re intelligent and not afraid of numbers, you can do very well in programming, even if you never got past algebra in high school.

I know so many programmers who wish they were writers (including myself) that it’s almost a stereotype. In my experience, engineers who are interested in writing and linguistics are at least as common as the math-head software engineers.

As to the OP - No, you don’t have to be good at math or even especially enjoy math to be a programmer. The last math class I took was sophomore geometry, not even the “advanced” class (although up until then I was in the advanced math classes - I simply got sick of it in my sophomore year and dropped down to basic math.) I went on to become a programmer, and worked pretty low down in the code - that is, I wasn’t designing GUIs in Java or VB, I was writing low level libraries in C++, typically considered one of the more difficult and math/logic oriented programming tasks.

There’s a great deal of overlap in the kinds of thinking required in mathematics (upper level, at least), and computer science. The kinds of things a computer programmer does are a lot closer to the kinds of things a mathematician does than many other professions—developing algorithms, attention to logical detail, thinking things through step by step, seeing the logical implications of something, working with formulas and operations, etc.

In my experience with math and computers, it has been not at all uncommon for a concept from one of these areas to relate to or give me insight into the other: things like recursion/induction, overloaded operators/functions, variables of different types, boolean logic, sets and classes, etc.

Of the 10 programmers at work, only one of us has much in the way of mathematical ability. I was dreadful at pure maths, but I find programming fairly natural, they are quite seperate skills.

Don’t most computer science degrees require calculus or even more?

I’m on a CS degree right now. We’re required to take loads of maths, especially in the first two years, after that it’s pretty much optional. This year we’ve done set theory, linear algebra, algebraic coding theory and graph theory. Last year (first year), we did tonnes of calculus, geometry and some statistics.

I have been programming since the 1960s and have worked with lots of programmers on projects. I would say about 30% have a strong mathematical background, about 80% have an average mathematical background and the other 25% have no maths background at all.