View Poll Results: If you are good at math, you are a good programmer.

Voters

28. You may not vote on this poll

True

27.14%

False

2692.86%

Math

This is a discussion on Math within the A Brief History of Cprogramming.com forums, part of the Community Boards category; If you are good at math, you are good at programming. True or False?
When I was in school, my ...

Math

If you are good at math, you are good at programming. True or False?

When I was in school, my dad showed me a picture on the cover of my math textbook. The picture was of a kid using a computer. He then said, "You want to learn computer, you should be good with math."
I never really understood what he mean't by that because I was okay on the subject, but not brilliant. And another fact was that PCs were using GUI interfaces. Why would someone need to be good at math to use a computer?
It is now that I only realised that the statement might have more relevance if you are into programming not facebooking.

So is this statement true or false? Since I new to programming, I thought I'll leave it to the experts to answer.

I answered false because I think it is not a direct relation. That is I don't think that being good at math automatically makes you good at coding. However, it does give you quite a lot of tools to have a better understanding of some concepts and to learn faster as well.

I've been a math whiz for a long time, but it's only recently that I've gotten into programming. Programming is not just math, it's also logic (and puzzle-solving/problem-solving in the case of finding and fixing bugs). There's probably several around that are bad at math, barely able to add two-digit numbers that could still program.

I've been a math whiz for a long time, but it's only recently that I've gotten into programming. Programming is not just math, it's also logic (and puzzle-solving/problem-solving in the case of finding and fixing bugs). There's probably several around that are bad at math, barely able to add two-digit numbers that could still program.

That depends on what you're programming usually.

And sure there's nothing stopping you from "using" X. Even if you don't understand how X works, but you do understand that X is better than Y (for whatever reason). Although not sure I'd call someone like that a "good programmer" :-).

But certainly being good at maths does not make you a good programmer, but it sure would help (again, depends on what you're doing or what aspect of programming you're talking about). Clap clap if you can prove that your Z sort is faster on average than my W sort, but that's not really going to help you implement it

I was never particularly great at math in School, and whilst I can add small numbers up, or calculate the VAT (used to be 17.5%) by using "10% and half therof, and half again" is probably more down to having to do that all the time when programming, rather than having an innate ability for math.

I also have a colleague who is a PhD in Math - he's certainly more clever than me in both programming AND math - but I don't think there is a DIRECT correlation.

Certainly, to solve math problems, you need similar skills to programming skills. But there are many parts of programming where the math you need to solve the problem ranges between "none at all" to "what you learn in the first three years of school" (that is, simple add, subtract and some multiplication).

Of course, being able to figure out how to go from two X,Y coordinate to an angle and back again will certainly help in 3D graphics, even if you don't need it in 2D graphics.

It's not that anyone good at math is good at programming, obviously, since someone good at math may never have seen a programming language.

However, I think that any one smart enough to be really good at math is smart enough to learn a programming language properly. And to be really good at programming, you need to be not-too-bad at maths.

I doubt there's any good mathematician whose brain is not capable of comprehending the concept of programming and debugging properly.

I would like to agree with the conclusion that "most programmers are smart enough to learn whatever math they need just in time to attack the problem at hand", but I fear that tomorrow I'll find out that it was an April Fool's joke

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

Well I just hope that math isn't useless(!), because I just took statistics for the summer. I was going to ask if that would be helpful in systems analysis or business applications programming, but all the other math threads had half the people saying it was helpful.

It depends on what kind of programming you want to get into, really. I almost never use much math at work, because I program web apps. If you get more into the theoretical side of CS, statistics might come a bit more in handy!

I was never particularly great at math in School, and whilst I can add small numbers up, or calculate the VAT (used to be 17.5%) by using "10% and half therof, and half again" is probably more down to having to do that all the time when programming, rather than having an innate ability for math.

Of course, being able to figure out how to go from two X,Y coordinate to an angle and back again will certainly help in 3D graphics, even if you don't need it in 2D graphics.

--
Mats

Adding tax in is fairly easy - "FinalCost = BaseCost * (1+TaxRate)" is how - TaxRate is converted to decimal form. Thus, for 17.5%, you'd multiply the base cost by 1.175 to get it.

How about finding how to go from two X, Y, and Z positions instead of just X and Y? How about finding this angle (pan and tilt)?

I believe that everything in the universe is numerical in some form or another and since it is, there are mathematical rules that can be applied to pretty much anything.

To me, programming is just a way of communicating ideas in a very simple manner, namely writing down instructions in form of a recipe. If you can write it down in your native tongue, then you can also write it down in a programming language once you know how to make programs. From this point of view, you don't need "math" to be a good programmer. You just need a text editor.

If on the other hand a programmer is not just the guy who turns specifications into code, but is instead required to come up with his own ideas and designs, math (or more correctly, theoretical computer science) may become highly necessary. Consider the following tasks:

Write a program that
- solves Tetris (or any other binpacking problem) in O(n^a) for some a
- generates a compiler
- tests whether another (arbitrary) program always terminates
- finds the corresponding function based on arbitrarily many (x,y)-pairs
- sorts a set in less than O(n*log(n))

With programming skills alone, you will have a hard time implementing these programs. With a bit of experience in math/theoretical computer science, you'll know in advance that it's impossible to do, or you can at least come up with the according proof. But even if the problem is solvable, you will need a high amount of math to argue about soundness, correctness and efficiency of your program. Forget about web applications and think of operating systems for atomic power plants, aircrafts, traffic lights or your car. If you can't prove that your program always does what it's supposed to do, it is worth nothing.