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?
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?
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.
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}
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.
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.
Last edited by camel-man; 11-30-2012 at 01:29 PM.
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.
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.
How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.
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.
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.
Code - functions and small libraries I use
It’s 2014 and I still use printf() for debugging.
"Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.