PDA

View Full Version : Math



knightjp
03-31-2009, 09:56 PM
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.

Desolation
03-31-2009, 10:01 PM
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.

jrahhali
03-31-2009, 10:57 PM
false, but it's a great tool to have.

ulillillia
03-31-2009, 11:04 PM
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.

zacs7
04-01-2009, 12:24 AM
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 :)

vart
04-01-2009, 04:06 AM
He then said, "You want to learn computer, you should be good with math."

But your poll is asking something different: "It is enough to know math to be good with computers"

While first sentence could be true, your poll question is still false

matsp
04-01-2009, 04:10 AM
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.

--
Mats

EVOEx
04-01-2009, 04:56 AM
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.

sean
04-01-2009, 10:00 AM
Just saw this on Hacker News:

Coding Horror: Should Competent Programmers be "Mathematically Inclined"? (http://www.codinghorror.com/blog/archives/001249.html)

laserlight
04-01-2009, 10:08 AM
Just saw this on Hacker News:

Coding Horror: Should Competent Programmers be "Mathematically Inclined"? (http://www.codinghorror.com/blog/archives/001249.html)
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 :(

whiteflags
04-01-2009, 10:52 AM
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.

sean
04-01-2009, 10:58 AM
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!

ulillillia
04-01-2009, 03:34 PM
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.

VirtualAce
04-01-2009, 04:36 PM
False. But math can never hurt.

Snafuist
04-01-2009, 04:58 PM
If you are good at math, you are good at programming. True or False?


This depends on what you mean by math and programming.

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.

Greets,
Philip

brewbuck
04-01-2009, 05:09 PM
What does it mean to be a good programmer? If you can solve any problem that's solvable, but your code is impossible for anybody but you to understand, are you a good programmer?

I've seen code written by geniuses that's efficient at solving the problem at hand, but still full of bugs -- basic sorts of bugs like checking for an error then doing nothing about it, double-deletion, resource leakage...

And some of the worst code from an engineering standpoint that I've ever seen, was written by computer science professors.

I think a better implication would be "good at math => good at computer science," but computer science is not the same thing as programming.

nonoob
04-01-2009, 05:36 PM
Logical thinking is the key. Math requires it... so does programming. So that's the common link. But one does not imply or require the other.

I've seen chemical engineers and atomic scientists be terrible programmers. I'm sure they're smart in their fields but they couldn't create algorithms. Perhaps their disciplines do not require that kind of logical reasoning.

Perhaps they got their degrees by being able to learn by rote and they have some fantastic memory retention abilities. But I'm sure they wouldn't mind double integrals with their tea. Whereas my brain started hurting by the end of 1st year university math. Yet I excelled in 3rd year computer science. So there is a disconnect.

Programming (I'm not talking script-kiddie stuff) requires being able to come up with new combinations of functions and data types which aren't obvious from the stated problem or even the desired solutions. Directly. It is the ability to generate a chain of intermediate steps, of some arbitrary length... until the problem is done.

I think the question is too broad. "Math" is an unknown. I'm sure there are some branches of math that overlap the same areas of the brain as does programming. But certainly not all math.

I think a more interesting question might be: "Can an accomplished programmer be good at other tasks? Such as taking apart an engine, fixing house-wiring? Putting up drywall? Once they are shown how once or twice?" I think the answer is YES. In my opinion programmers have that inherent ability to apply logical thinking and keen observation in every-day situations. No they won't do those other tasks as well (business wise) as a veteran mechanic, but they will do them meticulously and likely with better quality.... and take 10x as long. Hence not be able to make money on that.

The same can't be said for most other disciplines trying to come over to programming as an afterthought.

My biased opinion of course.