Ask Slashdot: How Many of You Actually Use Math?
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?"
The bulk of programming jobs have nothing at all to do with math beyond the high school level.
Its mostly counting beans and keeping records. Really, it is.
Gaming, (image rendering and manipulation), statistics, and rocket science are a few of the obvious areas that come to mind where more advanced maths may be necessary. Even these fields have packages available to do the heavy lifting once you figure out what it is that you want to do. Knowing what to do the key. This kind of programming constitutes about 1% of the available jobs and 98% of the chest thumping on slashdot.
Sig Battery depleted. Reverting to safe mode.
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.
How Many of You Actually Use Math?
Last I added it up, three of me.
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.
There's no -1 for "I don't get it."
Comment removed based on user account deletion
go google quaternions, or rotation matricies
properly understanding these sort of techniques that are used widely in 3D programming applications without having knowledge of linear algebra is damned near impossible
It doesn't matter if you use it in practice. You'll learn to think critically to solve abstract problems. Don't buy into the hype that you don't need math.
Follow-up:
Math is nothing more than a language that allows the speaker to make very precise statements. If you can't see how this is useful in programming then no-one can help you.
Others do what they can, mathematicians do what they want.
You are probably not gonna use what you learned in Huckleberry Finn or History, either.
There's a reason these are taught, and it's not all about pure facts.
(-1: Post disagrees with my already-settled worldview) is not a valid mod option.
While programming is not necessarily math-heavy, mathematics gives you experience with problem solving, sometimes in unconventional ways. It's really the only technical problem-solving you do in school, and it's an important learning step, for what it teaches indirectly as well as what it teaches directly.
It's not necessarily the actual math skills that are important - it's the understanding of the concepts behind it that will increase your understanding of any kind of process, job, or task - programming being one of them. Knowing what the area under a curve means is probably more important than knowing how to calculate it.
I don't use calculus or any kind of advanced algebra in my day to day work (in communications, far from programming) but I'm sure glad that I understand the basic concepts, thanks to a first degree in engineering.
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.
Realistic physics requires it. On top of that, the more math you learn before entering the field, the more opportunities will be available to you as a programmer. Don't cripple yourself while you're still young.
Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
How many of you use the problem solving skills that were developed in math class? I may not use math everyday, but I certainly solve complex problems that I'm sure others with less math education would struggle to solve.
Logic is math, and EVERYONE needs logic.
Even if you never write a proof or solve an integral in your working life, it's important to understand how math works. Life, all of it, is one big word problem. If you don't have a basic understanding for the mathematical nature of the universe, you're simply not going to be able to navigate it as well. If you don't understand how mathematical arguments work, you won't be able to offer useful opinions on the matters of the day.
I'm not sure that everyone needs to know calculus, but everyone needs to know what calculus is and what it's used for. Everyone needs to be numerate.
Give me Classic Slashdot or give me death!
Clearly I've been watching too much Breaking Bad.
The CB App. What's your 20?
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.
Calculus is pretty much a modeling language when it comes to programming, not an implementation language. When it's appropriate, calculus is generally done outside of the program implementation, its output being the algorithmic shortcuts and validations that you can rely on when writing the actual code.
Agreed. Any graphics engine uses a ton of linear algebra under the hood, so you'll need that if you ever want to modify one or write your own. Also, if you want to do any kind of physics simulation (which you probably will, if you're doing games), you may need calculus (but maybe not, since video games fake as much as they can get away with).
I explicitly release the above into the public domain.
Purity
The CB App. What's your 20?
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.
Which is also why there is a lot of high school level code out there.
If you never learn more than you need then you'll never know if you have learned as much as you need.
Learning more math won't always make you a better programmer. But it will show you whether you can do something better than someone who knows less math.
Also, you'll never be able to verify that your algorithm is working by manually processing sample inputs. That's a tremendously useful ability to have. See the following thought process:
>> "See if I give it A, it should give B, but instead it gives C"
>> "Let me try it by hand"
>> "My algorithm is wrong" or "My implementation of the algorithm is wrong" or "I'm using the wrong algorithm to solve this problem" (knowing the difference saves you notable amounts of time)
>> "I now have an understanding of the actual problem and can solve it"
Yeah, you'll notice that a lot of the richest and most successful people never completed college. And that's fine but in my humble opinion, that's a risky bet to take. I've done interviewing for developers for a fortune 500 company and seeing a college degree on the resume doesn't cause me to kick back and say "Oh thank god, they have taken Multivariate and Differential Equations calculus, now all my Spring applications are going to be able to compute the triple integral (by parts) of a toroid in three dimensional space as it passes through a fluctuating field exerting a force on it!" (Yes, I know that makes no sense at all) No, what that tells me is that we're going to be able to throw you in an environment where you have no clue what to do but resources to go out and find what to do. On top of that, you're going to be able to digest the driest and shittiest of documentation (like a calc book) and come back to me and have gleaned some working knowledge from it. Sure, you might have to go to the next cubicle and say "What is up with this stack dump?" And you may have to seek out an authority (like a professor) but you're going to come to some answer for our problems.
In short, it tells employers that you know how to play ball and high order concepts don't frighten you. I'm not going to throw integration by parts at you on the job but it is good to know that you stepped up to that challenge -- even if it was just to get to a final, pass it and move on. In short, I went to a liberal arts college, I took classes on music theory, calculus, physics, Native American studies, advanced literature, etc and in those classes I created four part inventions, mounds of calculations, papers, powerpoints, etc and I have used little if any of that in my day to day job post college. But in mastering those processes I learned how to play ball. Now, I'm not saying you need to go take music theory and Native American studies. But the thing with Calculus is that all software development is logic and math. So don't you think you'd want to get all your i's dotted and t's crossed so that any employer that looks at you knows you have studied beyond the requirements of math for writing software into a realm so lofty they won't even be able to use it? I'm sure glad I did.
My work here is dung.
This is completely backwards.
Calculus is used to describe nature in the most fundamental way. Computers simply work with approximations to nature that are reasonable for most types of predictions.
So computers are the ones using a shortcut that is faster. Finding analytic solutions to differential equations is the most fundamental way of understanding nature that we have in science, but this is often much more difficult than using a numerical approach with a computer.
In any case, most people need to learn the full way of doing things (ie the typical calculus way) before they can move on to shortcuts that may be faster.
I developed a game using Unity3D.
I make heavy use of trigonometry, and a very small part of calculus.
Your question really depends on what you want to do:
There are other fields that are not typically taught in math courses but in CS that are heavily math related. Like performance analysis. This I use a lot, but once again, it really depends on what you work on.
I do a lot of database work so it's set theory all day long. It's in a bit of disguise as it isn't what normally is though of as math but set theory is a math field.
You won't command much credibility if you can't even spell "orthogonal" right.
I do most of the design and programming on A Tale in the Desert and Dragon's Tale and I've seldom/never needed to do an integral or solve a system of differential equations. Understanding those concepts does frequently influence game design, however, so having taken those courses was important, at least for the kind of games I do. (Giving specific examples would require that you are familiar with gameplay for each of those games, but feel free to contact me directly if examples would be helpful.)
:)
But on to specific branches of math: You'll certainly use linear algebra doing 3D programming, and IIRC that's considered "beyond" calculus. (If you're using OGRE or Unity 3D, at least at the API level then I'm surprised you haven't run into this.) Applied Math, which is often a college freshman course for a CS decree is crucial to all sorts of programming, especially games. Combinatorics is critical for game design, though if you're just planning to be a programmer, not so much. Numerical Methods will teach you exactly when and why rounding errors to happen, how they can compound each other, and in general help you write squeeky-clean math code. The game I'm working on now is a gambling MMORPG - I probably don't even have to say how important statistics is, if this sort of thing is in your future
Notice how different each of the math subjects above is? A lot of this comes down to learning how to learn, and that's the one thing that in my experience differentiated high school academics from college.
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
"almost all programming can be viewed as an exercise in caching"
You need calculus to actually understand statistics for continuous random variables.
Students who do well in the more advanced undergraduate math courses (real analysis, abstract algebra, etc.) may never specifically use those precise topics, but good performance in those courses serves as a strong testament about being able to deal with abstraction, work precisely, and construct correct arguments. Those skills will serve students well and may impress employers/managers that the student actually is pretty good at thinking and problem-solving.
Linear algebra as mentioned above is probably more likely to be specifically useful in applications: modeling, graphics, science and engineering settings, as typically relationships are too complicated to be understood effectively by anything besides a linear approximation. But many linear algebra courses are technique-based and rather cookbook, missing an opportunity to take advantage of good more abstract approaches.
It's psychosomatic. You need a lobotomy. I'll get a saw.
I have an MSCS from Stanford, but it's from 1985, when the logicians and expert systems guys were running things. So I have lots of number theory, combinatorics, automata theory, and mathematical logic. I even took "Epistemological Problems in Artificial Intelligence" from John McCarthy.
So what did I end up needing? Tensor calculus. I realized that expert systems AI was stuck. The future of AI capable of dealing with the real world seemed to be in nonlinear control theory. Which is all calculus and statistics. I struggled with that, and got legged running over rough terrain figured out and patented. But this was 1994, and the simulators sucked, and I couldn't get any further without better simulators. So I spent a few years beating on that problem, and produced the first simulator that could do a ragdoll falling downstairs.
By 1997, I had that solved, but it was kind of slow. A 200MHz Pentium Pro just wasn't enough engine to get it up to real time, and that was the top of the line in CPUs back then. By then I was burnt out on the problem, and it wasn't making much money, so I sold the technology off to Havok and went on to other things.
I didn't see that what was needed was to couple nonlinear control theory to Bayesian statistics. That's what makes all those quadrotors zip around so precisely. Modern statistics barely existed when I was in school. Now it drives everything from finance to speech recognition to advertising, so it gets worked on and people study it. Nonlinear control alone never had that big a market, so the field didn't get enough attention to move it forward.
So I needed more math, and different math, than I got in school.
But a huge amount of computer science is not about modeling the physical world. It is about organizing data or doing accounting or serving up web pages. Advanced calculus does not help at all with that.
Not everybody needs to use a nondeterministic finite state machine every day, and not everybody needs to calculate the transitive closure of a sparse connectivity matrix every day, but these are (simple) examples of reasonably commonplace algorithms that you can't really understand without being able to do the maths.
As an even simpler example, you can't really use SQL effectively without understanding the maths behind a relational database. I know this for sure, because I keep coming across SQL applications that were clearly written by people with no understanding of the maths, and I get paid lots of money to fix them up properly.
US: Math
UK: Mauthe
In undergrad (CS) I did more math than was required, and honours math at that. When I started grad school I was introduced to a transform we were using to analyze medical images. There's an article somewhere where I'm quoted as saying that some smart grad student is going to come along some day and improve the algorithm for calculating that transform so that it's actually practical. It turns out the smart grad student didn't come along, so I had to do it. That involved a lot of calculus, both continuous and discrete. Now I mostly develop new medical image processing techniques and analyze data, which involves fairly high level statistics. Statistics is all calculus and, when you get further on, calculus and linear algebra.
You say you want to be a game programmer? Here are some of the papers from SIGGRAPH this year. Take a read through some of them. This one might be a good place to start... most of the authors are from Pixar. How much math do you see? How much math do you understand? These are the algorithms you'll be working with by the time you graduate. Note that there isn't a lot of continuous calculus in these (but a lot of discrete!). Somebody has already done much of the hard work of discretizing it for you. That's not always the case.
You can probably get away with not learning any math and being a run of the mill code monkey. If you want to be good at what you do though, learn the math.
No, the point of a challenging degree program is to maintain academic standards. To be awarded a degree you need to have achieved a certain standard. If the sole aim was to limit the number of graduates in a program you would simply limit the enrolment. When we have been hiring IT staff one of the things we have looked for is a degree because this shows that they have some depth of knowledge beyond the basics. Sometimes the confidence that this brings can be very important for adapting to new situations.
The point of high-level math and physics classes is not because you "need" them in your job as a programmer. It's a way to limit how many CSE degrees are granted. I was told this straight-up by my college advisor ...
Then like some advisors he is a dumb-a**. I've been offered some pretty crappy advice and insight from advisors, don't take what they say too seriously.
You are basically getting into the trade school vs university argument. A trade school can produce as good a programmer as a university. The point of the university is to provide a more well rounded education so that a person has more options.
I too had some chemistry, physics and years of math that appeared to serve no purpose other than to "weed out" people from the program. However to my surprise I once had the opportunity to participate in a project that would port some chemistry software from mainframes to PCs. I would be interacting with world class polymer chemists. They did not expect me to be a chemist but they did expect me to be scientifically and mathematically literate. The general ed chemistry and physics and the years of math for computer science actually turned out to be useful.