Ask Slashdot: How Many of You Actually Use Math? 1086
An anonymous reader writes with a question that makes a good follow-on to the claim that mathematics requirements in U.S. schools unnecessarily limit students' educational choices: "I'm a high school student who is interested in a career in a computer science or game development related position. I've been told by teachers and parents that math classes are a must for any technology related career. I've been dabbling around Unity3D and OGRE for about two years now and have been programming for longer than that, but I've never had to use any math beyond trigonometry (which I took as a Freshman). This makes me wonder: will I actually use calculus and above, or is it just a popular idea that you need to be a mathematician in order to program? What are your experiences?"
Optimization (Score:5, Interesting)
If you want to be an efficient programmer in some specific domains, an understanding of higher math allows you to optimize your code. In game development this becomes important when you are trying to have your cutting edge game run on older hardware.
Depends whether you include discrete math (Score:5, Interesting)
The only math course in college that I felt applied directly to software engineering was discrete math. It's all about logic, graph theory, etc. and provides the basis for computer science.
That said, most software doesn't really require calculus, geometry, or even trig. But certain fields (AI comes immediately to mind) require a significant math background.
Thinking differently (Score:4, Interesting)
Although you might not use a lot of advanced math learning it changes how you solve problems. I found it abstract algebra and formal logic the most useful.
Re:Field dependent requirement (Score:5, Interesting)
I've gone all the way up to calculus 3 (vectors, multi-dimensional functions, and doing differentials and integrals therein) and I've yet to see calculus applied by any programming. I am curious how one actually implements it though, in what (limited) programming I've done, I haven't seen any clear way to calculate say an integral using something like c++ or c#.
Is it typically library/api driven and you just feed an equation to those functions? Or do most programmers hardcode them?
I'd like to see some code examples. I'd probably never have a use for it, but I am curious.
One data point (me) (Score:5, Interesting)
Trig as you already know is great for 3d stuff.
Calc is great for decision logic and business intelligence
Stats are great for business intelligence type work
As someone who did horribly in high school and college math, I did the minimum for my degree. I've retaught myself much of stats and calc because I found them useful in my personal projects. I find them more rewarding now that I have applications to use them in. I was a bad student though early in life. YMMV
Most of the math in the corporate programming world is really elementary. Basic algebra or less.
Algebra and Statistics are key (Score:5, Interesting)
The key areas for math in general computer science are algebra and statistics. Even if you are not actively using algebra, the thought processes in programming are very similar. Statistics are critical for analyses of system behavior. Linear algebra is useful occasionally, but mostly it's just something that is nice to have been exposed to.
I never use calculus, but it was in taking a calculus class that my algebra skills solidified, so the coursework was not wasted. In general, you should always progress one step further in coursework than you expect to actually need.
Also, there's a big difference between knowing enough to get an entry-level programming position, and knowing enough to have a career where you end up designing major projects.
Re:Field dependent requirement (Score:5, Interesting)
Two out of three Of my jobs after graduating have required math. The first job involved video encoding, decoding, and cryptographic signatures. If I didn't have knowledge of advanced math I would have found it almost impossible to understand the algorithms, and to make optimizations that were required.
The second job required linear algebra to do calculations of target positions from a moving aircraft to track up to six moving ground targets. I'd say the math experience is also nice to have just from a problem solving Standpoint.
A job or a calling? (Score:5, Interesting)
If you just want to make a living, then you'll probably never need any higher math.
OTOH, if you are at all serious about programming as something you want to be really good at, then you need a _lot_ more.
I've worked with low-level game code (Quake asm), with video & audio codecs (MPEG2, h.264, ogg vorbis), with crypto (one of the AES candidates) and I wrote most of the code for the compiler sw workaround for the Pentium FDIV bug.
I doubled the speed of a Computational Fluid Chemistry code base, so that simulations ran in half a week instead of 7 days.
I've also won a couple of international code optimization contests.
The key here is that except for the h.264 optimization all of this has been pro bono, my daily job at a Norwegian IT company has almost never _required_ me to know a lot of math, but having math as a hobby means that I tend to spot all the bogus calculations in Powerpoint presentations. :-)
Terje
Re:Field dependent requirement (Score:5, Interesting)
These exemples are simple interpolation/extrapolation.
Other exemples involves: how does a computer compute sine, cosine, sqrt ?
How does any programming language work ? (Hint: it is not called lambda CALCULUS because it sounds fancy)
How to solve systems of equations? (also known as "where does curves intersect?")
Re:Field dependent requirement (Score:5, Interesting)
I look for places to use my math skills, and find plenty. I was differentiating to find minimums this morning, and I've used a lot of calculus, linear algebra, and even number theory recently. However, I could find plenty of work which requires nothing more than knowledge of how to use a 4-function calculator. I just don't personally find such work very satisfying.
I've been instrumental in hiring decisions of couple of dozen programmers by now. If a person says math isn't their thing, it's not the end of the interview, though strong math skills are a plus. I'll often be interested in a physics Ph. D. or mathematician, even if they don't yet know how to code, but if a guy can't show strong analytic skills in math, I need to see some demonstration of coding skills. For example, a person with strong 3-D visualization skills can become a good router guy without advanced math skills, though they have to be competent in high school level math. We just put such people on projects that wont require advanced math.
In our work (chip design related algorithms), we have to have some serious math geeks, but it doesn't have to be the whole team. We've got a brilliant IIT grad who did our sparse matrix backwards Trapezoid interconnect delay simulator, running 1000X faster than SPICE, with the same accuracy. There's some cool discrete math in our logic optimizer. The linear algebra in the placer is cool. We're also doing some analog design aids, and it really helps if you understand the math behind the algorithms you're expected to code, and analog optimization is heavily mathematical. Advanced logic optimization some advanced math, as does many algorithms that come up in chip design. I've been doing a bit of analog, which is heavy into Z transforms, and Laplace transforms. I've also recently done a bit of signal processing involving custom optimized FFT code. Transformer design can be done by "rule of thumb", but to write the code to do it well requires solid understanding of both the physics and the math behind it. Those who enjoy advanced math appreciate being assigned projects where they can put their mathematical reasoning skills to good use, and those who hate math appreciate not being on those projects. It all works out. You just need a good mix.
Re:Field dependent requirement (Score:5, Interesting)
When I hear "discrete math", I think of map problems, circuit minimization, bipartite graphs, and what boils down to PhD level computer science (or pure math, whatever floats your boat). You can take this as a freshman, I did.
What you mean is "discrete time math", which is an entirely different type of math that has very strong roots in calculus. Discrete time math, at least as it is useful to me, is the mathematical method of working on sampled signals.
You can get jobs with both, I think the former is far more useful to computer scientists in general. To be honest, most jobs won't really require it of you, but understanding why things are is frequently more important than understanding what they are, if you're going to have a long lived career. If you just want to code up someones lifecycle management DB, it's probably not useful. But if you want to do something new that solves a hard problem for a new industry, it is a tool you may find valuable. I know that tools I use as a EE rely on someone having a discrete math background to have solved them.
The latter job is normally reserved for electrical engineers specializing in digital signal processing. You can definitely get a job with it, and you will use it in your job, although usually in the form of block diagrams you lay out in matlab. You may or may not use C to implement it, although most people I know at least start there since it's faster to write than verilog or vhdl.
Video game programming is mostly trigonometry, but there's some calculus in there too. Physics engines of course use calculus and a lot of matrix math. You may use those as packages, but I think if you want to do something the library designers (who are mostly focused on physics and execution speed) didn't conceive of, it would be good to know the math that gets you there.
As always the value of higher education isn't teaching you practical things that you can use today, it's teaching you how things work so you can use them in new ways tomorrow. I can understand frustration on this, we've all been there, and I do wish universities would spend a little more time on "practical" to augment the abstract and toss the liberal arts stuff which is useless for the intentions of 99% of people attending school.
Re:Field dependent requirement (Score:4, Interesting)
A big example here may be in just using floating point arithmetic. Almost every programmer does this but I am astounded at how many don't really understand it or who do it wrong by naively assuming infinite precision. Not just programmers but I've seen actual scientists mess this stuff up.
Re:Field dependent requirement (Score:5, Interesting)