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?"
Field dependent requirement (Score:5, Insightful)
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.
Comment removed (Score:5, Insightful)
graphics programming uses math extensively (Score:5, Insightful)
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
Study math (Score:5, Insightful)
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.
Re:Read More (Score:5, Insightful)
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.
Short answer (Score:3, Insightful)
Others do what they can, mathematicians do what they want.
What a piece of work is man... (Score:5, Insightful)
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.
Re:Optimization (Score:4, Insightful)
Also, if you can't handle the math, you aren't cut out for the job. Even if you don't use it daily. Same reason that premedical students take physics (to keep morons out of medical school).
Concepts versus skills (Score:5, Insightful)
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.
If you want to write games, you need calculus (Score:5, Insightful)
Better question (Score:5, Insightful)
Logic is Math (Score:5, Insightful)
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.
Re:Field dependent requirement (Score:5, Insightful)
Re:Instead of calculus (Score:5, Insightful)
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.
Re:Yes (Score:4, Insightful)
And of course, the obligatory XKCD (Score:5, Insightful)
High school level programming. (Score:5, Insightful)
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.
Re:Yes (Score:4, Insightful)
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"
It Teaches How to Play Ball and Complete a Project (Score:5, Insightful)
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.
Re:Instead of calculus (Score:4, Insightful)
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.
Re:Field dependent requirement (Score:5, Insightful)
Taking away the obvious implication of "You don't program differential equations" the logic skills gained by math help greatly in programming. I don't use derivatives per-say in programming or IT work, however understanding how to simplify complex problems has been invaluable to my career.
I graduated with a Mathematics degree and minored in Liberal Arts. I learned about computers during courses in programming that were required for the Math degree. I have never worked as a Mathematician, it was boring compared to Information Technology.
Re:Field dependent requirement (Score:5, Insightful)
Calculus is a study of continuous mathematics. C, C++, and every (?) other programming language work on principles of discrete mathematics, which is why you can read all about strange calculations with floating point variables. So, what you've seen is only natural.
My understanding of it is that most colleges/universities do not even consider offering discrete mathematic courses until at least Calculus 2 is completed, and in some places not for a year after even that.
Re:Field dependent requirement (Score:5, Insightful)
I've yet to see calculus applied by any programming.
How does your laptop computer calculate remaining battery life?
How does your browser calculate remaining download time?
How does your tablet distinguish between gestures?
"I'm an experienced automobile driver and I don't think that pistons and piston rings exist, because I have never seen them."
Re:High school level programming. (Score:5, Insightful)
Re:Field dependent requirement (Score:5, Insightful)
You've just reduced computer science to monkeys plugging the right wire into the right socket. 1,000,000 such monkeys can reproduce the collected works of Kernighan and Richie.
Without math you'll be unable to:
If you cannot do those things, I wouldn't call you a programmer, I'd call you a monkey.
This ongoing discussion about lack of math is ludicrous. Math is one of those things where if you don't know it, you can't see what it's for, and if you know it, you can't imagine a world without it. You can always argue you don't need knowledge, and if you're nothing but a device for turning food into poop then that's true, but those with knowledge will rule you. EVERY single thing in the world comes down to math. The monkeys don't know that, and they shouldn't program computers. Every single job you can think of can be improved by judicious application of a little math in the right places, and those who can will get ahead.
To be specific, take combinatorics, and as much statistics as you can get your hands on. That in my opinion is the bare minimum for life as a human being. Then you can understand poker odds, political polls and elections, and you'll know enough to not blow your money on lottery tickets. For programming or any scientific/engineering field, you'll also need linear algebra and calculus. If you're smart enough to realize that you don't live in 1-dimensional world, continue with vector calculus and complex analysis, and laugh as everyone around you tries to do linear regression on everything they can find. One or two more courses out of interest and you'll have a math major.
Re:Optimization (Score:5, Insightful)
Hear, hear.
You don't necessarily do a lot of math as a programmer, but being able to think like a mathematician will be a great help. General problem solving involves logic and inference, in much the same way as proving theorems does. Some concepts from Discrete Math become so commonplace (decimal to bin,oct,hex,etc) that you hardly even notice them anymore, but will glaze the eyes of a non-programmer. I have also had to explain floating point evilness to more than one accountant.
The most hard-math thing I have done recently in programming was double linear regression to project the time required for a file copy operation to complete. Some quality time with Wikipedia, a couple of pages of algebra, and a couple of days of debugging later, and I had a "time remaining" display that counts down like a clock. Take that, Windows Explorer.
Re:Field dependent requirement (Score:5, Insightful)
Just as one example, as a game programmer your ability to implement, say, Newtonian iteration would likely make a difference in your salary ask by a factor of two. Without math skills you are a worker bee, but with strong math... maybe a rock star.
Re:Field dependent requirement (Score:4, Insightful)
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 when I asked What's the point of having 30 freshman engineering students if only 2 survived to the end?
Lots of college degrees are like this. The supply is higher then the demand for open jobs, so they give tough courses to limit the number of grads. (And degrees that don't weed-out students, like English, end up with a lot of degreed students working at Mickey D's.)
Re:Instead of calculus (Score:4, Insightful)
not specific knowledge but good testament (Score:5, Insightful)
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.
Re:Field dependent requirement (Score:5, Insightful)
Battery charge / discharge rate is not constant over the charge level of the battery. The percentage reported by the battery to the OS is just the voltage reading, which is not truly linear to the actual charge level. It even depends on the load being placed on the battery. See this image [ladyada.net] (from here [ladyada.net]).
So sure, you can do a bad job of reporting remaining battery time that way. Or you can do a good job by involving some more advanced mathematics. This is a good example of why math is useful, even if most jobs don't fundamentally require it. Most programmers I know would look at the above chart and declare they have no idea how to deal with that, but it is pretty close to linear, and they know how to write that math, so that's what they'd write, then call it good enough.
You can be a programmer without higher math. But you can be a better programmer with it.
Algorithms (Score:4, Insightful)
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.
Re:A job or a calling? (Score:4, Insightful)
Wouldn't you also say, that having heavy math chops allows you to see clearly when the line from problem to solution is non-optimal? Wouldn't you say that because you've grown your mathematical mind you can clearly see natural symmetry to problems and their data sets? Wouldn't you agree that the rigor of mathematical thinking is precisely the kind of mental ecology in which to couch programming problems? A football player might spend thousands of hours running through obstacle courses lined with tires... I've never seen a single tire on a football field, and yet they keep running them in training. Because those tires exercise the precise muscles those football players will need in the competition in the real world. Grow you math chops. Its worth it.
Re:Field dependent requirement (Score:5, Insightful)
And with a good concept of math, you can get all those question, plus tell them there likely stock flow, better ways to organize inventory storage, and advance logistics regarding said inventory.
Re:Field dependent requirement (Score:5, Insightful)
In fact, the definition of these concepts, with a realization that interesting and ingenious considerations could be applied to them, is the first demonstration of the ingeniousness of the mathematician who defines them. The depth of thought which goes into the formulation of the mathematical concepts is later justified by the skill with which these concepts are used.
Within computer programming alone, topics as diverse as decidability and Turing completeness, computational complexity, discrete probability, number theory for cryptography, calculus for almost any optimization problem, geometry not only for graphics but also for information theory, which is necessary for compression and coding - show that math is the heart and soul of all of these concepts! Beyond that, so many of the operations that computers are actually useful for carrying out are inherently mathematical. I get why so many people are dismissive of "higher" math - there is no shortage of lousy teachers or rote arithmetic in early education, boring classes and an overall negative reinforcement that can leave people jaded and scornful. But I've learned from experience that it IS possible to get young kids interested in real math, mostly by knowing some of the relationships to fascinating phenomena. Regardless, I think it is tragic to see such disparaging opinions of mathematics.
Re:Field dependent requirement (Score:2, Insightful)
Ware are talking about ow level programming. i.e. You write the tool, and access the api of some other tool.
" Then divide by a sliding frame average of current consumption."
and that's how you get a completely unrealistic idea of how much time until you need to charge that battery.
"It divides the remaining file size by a sliding frame average of the download speed."
And that's the worst way to get an estimate.
" You can do an enormous amount in programming without calculus."
Bad, bloated, sloppy, error prone results programming.
Re:Field dependent requirement (Score:4, Insightful)
I use math constantly (Score:5, Insightful)
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 [realtimerendering.com] are some of the papers from SIGGRAPH this year. Take a read through some of them. This [berkeley.edu] 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.
Missing the Point (Score:4, Insightful)
Math is not for "weeding out" ... (Score:5, Insightful)
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.
Re:Field dependent requirement (Score:5, Insightful)
I don't know if college calculus helped me be better at data analysis or not. But what I do know is I can see, spot, and recognize trends and anomalies in data.
I know high school calculus did not teach me this.
My belief is that the suffering through college calculus, has helped me build the toolsets to understanding the data, identifying the normal and outlier behaviors and then determining what are the probable causes and solutions.
Re:Field dependent requirement (Score:5, Insightful)
Yeah, as technical fields go I'd say computer programming is actually one of the *least* mathematically intensive, any engineer or hard science researcher will need calculus far more than you. (Of course if you wish to work in any of those fields you'd better know calculus, your colleagues are unlikely to want to use algebraic baby-talk to communicate basic concepts with you, and frustration leads to hiring someone better qualified)
I would say the biggest value of calculus to programmers is that it's an extension of the mathematical language, and allows you to simplify your thinking considerably. For comparison think of any arithmetic-based physics classes you took compared to any algebra-based physics classes - I'm willing to bet that (assuming you actually had a good understanding of algebra) the algebra-based physics course seemed a lot simpler and more consistent (or alternately covered far more complicated and broadly-applicable topics without being more difficult). If you were to then to learn calculus and take a calculus-based physics class the "simplicity factor" is even higher - rather than hundreds of special-purpose equations to keep track of there's only a dozen or so fundamental equations from which all others flow naturally. Sure, you probably memorize the ones you use frequently, but for the other 10,000 you can derive them from the fundamental equations at any time. More importantly an intuitive understanding of the interrelation of the formulas will allow you better understand the interaction of the physical processes which they describe.
Discrete mathematics is likely to be far more useful to a rank-and-file programmer, but the catch is that mathematicians are unlikely to dumb down the class to teach it using only algebra when the more powerful language of calculus makes the basics easier to discuss as well as opening the door to more advanced concepts. Still, if you don't know calculus and have to opportunity to take a "Discrete math for programmers" or similar algebra-based course, go for it. Just be aware that you're getting a version of the subject similar to the programming coverage in a 100-level "programming for people who don't know where the on switch is" class. Immensely better than nothing, but...
Re:Field dependent requirement (Score:5, Insightful)
Mathematics (does anyone say mathematic? No - thought not) is a large collection of subjects: geometry, trigonometry, algebra, statistics ... ...
Sport is a large collection of disciplines: football, rowing, ice-skating, ten pin bowling
Language usage is not logical, nor consistent. Certainly the difference between British English and American is not consistent, nor even sane. It's a collection of pretty random changes, some the result of mistakes, some of changes in opinion (color -> colour), changes of usage (gotten is almost never used in the UK).
I admit a favourite is Aluminium vs Aluminum. Now that was just a plain old battle, which both sides being a pain in the neck. (And as for the gallon/US gallon thing, I mean really! Let's all get over it and use litres).
But why should I care, I live in neither country? I live in Australia (land of silver medals, apparently) where we just mix them all up and do what the heck we like.
Mind you, I do feel there is a strong argument for claiming the English should be the reference for speaking - English.
Re:Field dependent requirement (Score:4, Insightful)
Liberal arts is not useless.
Math is a beautiful thing, it helps us explain the world.
So does philosophy.
History teaches us about our past, inspires and frightens us.
The liberal arts are a vital part of holistic education. Math and science are wonderful tools in a holistic education, but so are the liberal arts.
It helps cultivate creativity and teaches people how to examine things from different perspectives, essential tools that augment the search for deeper scientific knowledge.
Need them both; otherwise what are you doing with your ride on the merry-go-round?
Re:Field dependent requirement (Score:4, Insightful)
I've never had a Liberal Arts Major explain it either. I've never heard anyone explain it. You know why? Because it doesn't really mean anything specifically.
From "Wikipedia"
Thanks Wikipedia, I think you proved my point. "General and Wide Ranging" ... meaning ... whatever.
Re:Field dependent requirement (Score:4, Insightful)
Learning math is learning to think in a disciplined way. Math is not only calculus, it's also logic, discrete math and complexity. If these are not part of your natural thinking you will not be the best software engineer you can be.