# Correlation between being good at math and thus good at programming?

• 11-30-2012
camel-man
Correlation between being good at math and thus good at programming?
Is that a myth or does it hold some fact to it? I personally am not fond of numbers and hate math. How many of you enjoy math and find it beneficiary to your programming skills?
• 11-30-2012
brewbuck
If you can explain a task to somebody then you can write a program. The computer is a very dumb person who needs to be told everything very explicitly in a weird language, that's it.

There are two reasons you need to know some math to write code: one, to understand the difference in resource usage between multiple approaches to problem solving (whether that's CPU, memory use, network, or whatever). Two, if the thing you want to do requires math, obviously you need to know math. That includes a lot of graphics, image and audio processing, signal processing, simulation, etc.

But the act of commanding a computer to do something is not inherently mathematical.
• 11-30-2012
Matticus
I've always loved math, though never pursued it to the levels I wanted to.

For the most part, I don't think math has directly helped my programming skills. However, I do feel it indirectly benefits my programming. Higher level math requires implementation of algorithms to solve problems. When I was learning calculus, the solutions would span over several pages. I wrote out each step, changing only one thing at a time, so that if I made an error somewhere, it would be easy to go back and find where I went wrong. This is the same kind of methodical, step-by-step process that I employ when I program.

There are a few instances when knowing "math tricks" have improved my programs - sometimes, deriving a clever equation can make code much more efficient than bluntly coding each and every step.

And not directly math-related, as a child, I had a passion for logic puzzles. Those things really forced me to think, and think efficiently. I feel that this definitely forged a mind-frame that is conducive to programming.
• 11-30-2012
camel-man
Interesting, I am hoping once I finish with my cal2 class I won't ever have to use that kind of math again. There is just no passion in me for it, and I don't find much interest in numbers unfortunately. I have never worked with graphics before brewbuck, what level of math is involved typically?

Matticus, do you think that learning to program tricky problems comes straight from the mind(gifted with intense logical thought) or do you think that you learn after having some experience with the problem in the past, giving you a head up on how to approach the problem.
• 11-30-2012
Epy
It's more of the problem solving ability acquired from being good at math that allows you to attack programming problems, not the math knowledge itself.
• 11-30-2012
Neo1
Quote:

Originally Posted by camel-man
Interesting, I am hoping once I finish with my cal2 class I won't ever have to use that kind of math again. There is just no passion in me for it, and I don't find much interest in numbers unfortunately. I have never worked with graphics before brewbuck, what level of math is involved typically?

Matticus, do you think that learning to program tricky problems comes straight from the mind(gifted with intense logical thought) or do you think that you learn after having some experience with the problem in the past, giving you a head up on how to approach the problem.

Breaking a problem down into smaller more easily manageable parts is an acquired skill, most people are exposed to this kind of thinking when learning to spell. Didn't your elementary school teacher tell you to take one syllable at a time when dealing with long words like Antidisestablishmentarianism?

Ofcourse, some people are inherently good at this kind of thing, but anyone can learn it over time.
• 11-30-2012
grumpy
Personally, I make a distinction between software development and programming. Software development is an intellectual activity that requires capturing of requirements, understanding requirements, solving problems, translating the solution description into a language that unambiguously and repeatably makes sense to a machine, and then maintaining the result.

Mathematics is intellectual activity that requires describing problems, understanding problems, solving problems, describing both problems and solutions in a specialised language so they are repeatable, and convincing other people that the solutions are valid. There are differences, but there is some similarity between that description of mathematics and of software development.

One thing in common between software development and mathematics is that people often focus on one of the minor aspects of them, ignore the rest, and then wonder why they don't do the whole job well. Software development is often portrayed as "programming" (the routine transcription of a solution approach into a programming language, using specific techniques at best, or as "hacking"). Mathematics is often portrayed as a rote-learning activity (eg multiplication tables) and the jiggling of formulae using rules. In reality, both software development and mathematics are complex intellectual activities, with specialised, extendable, and highly flexible languages tailored to describing and solving problems.

If you accept those broad characterisations, there is certainly a positive correlation between mathematical skills and software development skills. That is not saying that all good software engineers are good mathematicians. It is saying that a good software engineer will often become a better software engineer if s/he fosters skills in mathematics.

As to whether good skills with mathematics correlates with programming skills, I don't care. There is much more to being a good software developer than programming, and programming is among the least difficult aspects of being a software developer.
• 11-30-2012
nonoob
cal2 class is calculus? If so, I have personally not used calculus directly in the types of programming I do. But sometimes, depending on the problem, I have had to do some curve fitting and equation solving because an engineer asked me to write code to translate a thermistor's value to temperature... embedded into a microcontroller. So I was glad to be able to look at his data sheet and code a small program which included a noise filter and moving averages. In other jobs I had to rely on some geometry I could remember - rotations of coordinate systems when interfacing touch-screen and digitizer tablet input. Or finding whether a polygon encloses thousands of coordinates in a mapping program.

I think your question is more about whether the level of math is ever needed to program well, with the exception of where the stated problem specifically demands such knowledge. As was said very well by Matticus, it's the discipline and meticulousness that's learned and carried forward into programming. Attention to detail. Being willing to stick with a laborious process that does not seem to give rewards until the very end.

Having approached similar problems in the past is certainly the best way to program more effectively in the future. That's plain experience. I can't credit my math memories for that since I don't practice those things.
• 11-30-2012
std10093
Quote:

Originally Posted by camel-man
Is that a myth or does it hold some fact to it? I personally am not fond of numbers and hate math. How many of you enjoy math and find it beneficiary to your programming skills?

Mathematics is a science that can benefit you a lot in your life.

( in early years of university you find out that computational geometry and graphics for example are really given a boost some guy good at maths. )

My suggestion : Be good at both :)
• 11-30-2012
Mario F.
Quote:

Originally Posted by camel-man
Is that a myth or does it hold some fact to it? I personally am not fond of numbers and hate math.

Just take the approach that if some math knowledge is necessary for you to solve a computational problem, just study what is required. It's no different than learning enough accounting to make an accounting program.