Do computer programmers need to be good at math?

I’ve known several first-rate programmers who have little or no facility with mathematics. Their high competence comes from their facility with language and their skill with linguistic (i.e., non-symbolic) logic. I am a systems programmer, and never have I needed to employ any non-trivial mathematics in my work.

Naturally, though, you don’t want such a programmer to write things like mathematical functions and other math-dependent code. For example, such a programmer is unlikely to be good at graphics programming or simulations.

Still, math skills are unnecessary for many programmers, and it must be said that, in my experience, programmers whose skill set is primarily mathematical tend to write less readable, less maintainable code.

Unions. Intersects. Lists of comma-separated numbers. Y’know, “New Math”.

Base 8: Just like base 10. . .

If you’re missing two fingers.
Tom Lehrer, mathematician.

I’m an excellent programmer (IMHO :slight_smile: ) and my mathematical skills are very average and I have no love of numbers at all.

I have to agree with nearly everything ftg said. The key skill is the ability to abstract. In my experience poor coders are those who have failed to abstract the design enough. Everything is too literal and turns out long-winded and totally inflexible. As ftg says; the world is full of poor coders who can grind out 1000s of lines, but their overall design sucks because not enough thought has been put into it. This isn’t necessarily a skill you need to be born with. Half of it is being taught good design and coding practices.

Then good programmers need the ability to break that abstraction into a series of logical, foolproof, little steps. This isn’t far removed from mathematical thought, I suppose.

My BS degree is from 1973, and MIT made us take lots of algebra classes (not high school!) which covered this in part. I must admit that the undergrad programs where I went to grad school did not have them. We didn’t have an analysis of algorithms class, but I’m not sure it had been invented yet. :slight_smile: I picked that up in grad school.

Just as an example of how useful this can be, I became a star when I started to work by becoming the first person to do the analysis of the complexity of an algorithm I developed. My boss and my bosses boss were both mathematicians, and were impressed.

I believe they are referring to “naive” set theory, in Paul Halmos’s sense, but with less detail.

I am a programmer with a CS degree. I have never taken a course in formal set theory, but I have picked things up on the side while taking various math courses. I know about the Axiom of Choice, and some of its equivalents, and have a layman’s (not sure if this is the right word) understanding of ordinal and cardinal numbers, but I don’t know much about the details. However, from my observations of the usage of the term “set theory” among my fellow programmers, I believe they do not usually include such things when they use the term. I think they mean just an understanding of what a union, intersection, complement, and Cartesian product are.

Most older programmers don’t. It’s almost impossible to get a job if you are younger and don’t have the CS degree. I think it is interesting that my company wouldn’t hire you if you didn’t have a CS degree, and most of our senior programmers don’t have a CS degree.

Nope.

Yep.

Yep (to both).

Yep.

I don’t think I’m nit picking, though Mrs Geek might disagree. Personally I think a good programmer needs to be detail oriented when needed and abstract oriented when needed, and needs to know the difference of when to be which.

Yep.

I got 5 out of 6. Make of that what you will.

Indidentally, I have gone to school for both EE and CS. There was a lot more math required for the EE degree. The only math the CS required that the EE did not was a course in advanced discrete mathmatics. This made a lot of sense later. I’ve done a lot more calculus type scribble on paper math for EE work, and more discrete math while programming.

If you do low level machine programming (assembly code and such) then you have to be pretty decent at discrete math and integer math, otherwise you are going to get really confused by why 14 divided by 45 multiplied by 16 is zero. As others have pointed out though, there are plenty of programming jobs where math is not such a requirement.

Computer programming is mostly about how to make the computer do what you want given the small number of instructions you can give it. Computer programming is actually more of an art than a science. When you are done, your program is a piece of art composed of tiny little fragments all arranged in a particular order. If another programmer had been assigned the same task, their program may have looked the same from the user, but it would have been made of different little fragments all stacked together in a slightly different way.

Okay. Not set theory in any real sense, then.

My best friend is an extremely successful and respected computer engineer with years of programming experience. He sucks at math.

To be good at programming you can be good at math, however the two disciplines are completely unrelated to each other. The people with the highest aptitude for programming are people who are also gifted in the compositional arts such as music, painting, writing, film or theater directing or even choreography.

In the 1960’s an insurance company did a study to find out who they should hire to train to program their mainframes (as computer science as a college major did not exist yet). They found that musicians and English teachers made the best programmers (in that order).

I’ve been working professionally as a software developer since 1982. And indeed the best programmers were those people who were good at music, in particular composition and arranging. The very worst programmers I ever worked with had PhD’s in math. I’ve worked with two such people and they had zero knack for programming.

I was always good at math, but I’m also a musician, composer and writer. It is these latter talents that allow me to be a good programmer.

Do computer programmers need to be good at math?

No. They need to be good at Logic. (Btw, a computer can only add.)

But when using higher level languages this is something rarely seen by a modern programmer. We don’t tend to get down and dirty in assembler much anymore.

Regarding set theory, computer science crosses over into pure mathematics when you study semantics of programming languages. You go high enough and you’re basically writing mathematics papers.

Calculus is basically math 101. The very beginning of math study at the college level. Most computer science degrees require a little more math but not much more. And the requirement stems from a general requirement of having X number of course in math that is common to all the sciences or engineering degrees. Not because you use calculus to from most programming tasks.

Almost all computers can multiply. At the most basic level of hardware there is something that take to numbers and outputs the product of them in one clock cycle. If that is not multiplying then people can’t multiply either we just use look up tables and addition same as computers.

Addition? Man, that’s way too posh. Computers can only do NANDs.

Set theory and discrete math in general are helpful. Continuous math, not so much. In the years that I’ve been working as a developer, I can only think of one time that I actually used any calculus.

Discrete math is the foundation for formal languages, which leads to compilers. Understanding this is quite helpful sometimes.

I think it is true that the discipline necessary to learn, and/or obtained from learning, calculus, trig, linear algebra, etc. does contribute to being a good programmer. Programmers have to think logically as well as creatively. Having explored different mathematical techniques gives you a world perspective that is conductive to problem solving.

As a former programmer, that makes total sense to me. Both of these professions allow (indeed, they demand) a good deal of artistic creativity, but they also demand that one follow the rules. If a note is too flat or too sharp, or a verb is in the wrong tense, the musician and teacher will cringe as much as an average person does when hearing fingernails across a blackboard. And programming too, is totally open to creativity, but also demands that the rules be followed. The computer will do exactly what you tell it to do - whether that’s what you meant or not.

Zombies make the best programmers.

I’m a business programmer. My specialty is in payroll, insurance and other related reports.

I’ve had to program some basic insurance calculations. For example our Opt LTD insurance is a percentage rate times the employees salary > than 20k.

so a 30k employee pays for 10k of opt ltd insurance. take that times the rate and divide by the number of pay periods. We’re semi monthly. a 9 month employee has 18 pay periods. 12 month emp 24 pay periods. 10 month, 20 pay periods

Not exactly high math. :smiley: But, you have to do this sort of thing working around payroll/HR offices.

To continue what ftg said (although what’s a PHB?), I will recount a conversation I had with a friend of mine at U. Ill. who knows Steve Wolfram well (my friend’s son did much of the mathematical algorithms for Mathematica). I mentioned to him that I read somewhere that the average programmer produces 7 lines of commented debugged code an average day. My friend remarked that Wolfram produces 1000. I said, “Is Wofram 140 times as productive as the average programmer?” My friend replied, “Yes.”

Now here is my experience. I have done some programming, including a mini-interpreter for tex (back in the early '80s when tex on microcomputers didn’t exist). Did I use any math at all in doing that? Not that I can think of. On the other hand, my ability to analyze that serve me well in math were certainly relevant.

This has little to do with computer science, however. That is heavily mathematical. In fact, some of my own mathematical results have been heavily used in some kinds of CS. I have to say, I don’t understand what they have to do with computer theory, but I’m happy enough to see them used. So if you want to go into computer theory you will have to learn lots of quite advanced math.