Slashdot Mirror


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?"

35 of 1,086 comments (clear)

  1. Field dependent requirement by icebike · · 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.

    --
    Sig Battery depleted. Reverting to safe mode.
    1. Re:Field dependent requirement by fredprado · · Score: 5, Insightful

      On the other hand, almost all IT jobs require at the very least a good part of high school math, especially logic, algebra, arithmetics and combinatory analysis.

    2. Re:Field dependent requirement by jittles · · 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.

    3. Re:Field dependent requirement by bannable · · Score: 5, Insightful

      I haven't seen any clear way to calculate say an integral using something like c++ or c#.

      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.

      --
      "If you see a man on a horse, he is likely an enemy. Kill the man and eat the horse."
    4. Re:Field dependent requirement by FranTaylor · · 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."

    5. Re:Field dependent requirement by mcelrath · · 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:

      1. Understand big-O algorithm analysis
      2. Analyze the output of a profiler
      3. Understand any encryption algorithm
      4. Work on any data analysis (every application has some element of statistics -- even if it's in the app's own internal call graph)

      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.

      --
      1^2=1; (-1)^2=1; 1^2=(-1)^2; 1=-1; 1=0.
    6. Re:Field dependent requirement by Tough+Love · · 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.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    7. Re:Field dependent requirement by FranTaylor · · Score: 5, Funny

      I haven't seen any clear way to calculate say an integral using something like c++ or c#.

      You are aware that there isn't a clear way to calculate integrals using pencil and paper either?

    8. Re:Field dependent requirement by afidel · · Score: 5, Funny

      The answer to your first two questions is universally poorly.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    9. Re:Field dependent requirement by Nemesisghost · · Score: 5, Informative

      Another reason you don't see any calculus(or other advanced mathematics) in programming is that you derive the equations you'll need on a piece of paper or white board then use the results in the actual application. An example is the velocity & distance equations that are derived from constant acceleration(V = V0 + a*t, d = d0 + V0 * t + 1/2 * a * t^2). Those equations are the 1st & 2nd integrals of the acceleration. Now instead of trying to recalculate the entire integral each time you need to know how far something traveled, you simply use the already derived equation. The same goes for most applications of various mathematics. But knowing how to derive those equations doesn't stop you when you are presented with something outside the given(say for example if a = 2 * a0 * t).

    10. Re:Field dependent requirement by Genda · · Score: 5, Informative

      Alright, how about global weather models? Fluid dynamics? Protein folding? Field tensor analysis for everything from power inductors to energy recovering braking systems to fusion modeling? All of these and a thousand more require higher mathematics to model. Ray tracing, rendering and animation being used in virtually all movies and games today involve all kinds of fascinating math problems, and interesting optimizations are popping up all the time. Statistics are important for everything from traffic regulation to neural networks to population control to quantum mechanical modeling to predictive analysis on genomics and proteomics. As has been said, it completely depends on what you're trying to do and what field of computer research you're taking on.

      What hasn't been said is that the critical thinking skills required in visualizing mathematical problems and their solutions is precise that same little chunk of gray matter that's going to help squeeze out a better algorithm, or find the lines of symmetry in your data set so you can fold it and reduce space and time required to make your solution run faster and more reliably. Its all part of the puzzling mind, and math is the heavy lifting needed to give you the mental muscles required to move the intellectual mass you're interested in moving. That and at some point you begin to actually see the world mathematically. The elegance and beauty of the language and its freedom to build new and surprising contexts describing anything you can imagine. If computers are engines of realizing human imagination, math is the fuel that engine runs on.

    11. Re:Field dependent requirement by nahdude812 · · 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 (from here).

      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.

    12. Re:Field dependent requirement by WaywardGeek · · 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.

      --
      Celebrate failure, and then learn from it - Nolan Bushnell
    13. Re:Field dependent requirement by icebike · · Score: 5, Funny

      Excellent Pedantry Mr Nemesis.

      But what I need from you at the moment is how many are in inventory right now, and can we fill this bulk order today or are we going to have to back order?

      --
      Sig Battery depleted. Reverting to safe mode.
    14. Re:Field dependent requirement by geekoid · · 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.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    15. Re:Field dependent requirement by Jeremiah+Cornelius · · Score: 5, Informative

      Math = USA usage

      Maths = UK usage

      Der.: MathematicS

      --
      "Flyin' in just a sweet place,
      Never been known to fail..."
    16. Re:Field dependent requirement by robably · · Score: 5, Funny

      I just have the hardest time getting used to seeing people spell math with a "s" on the end of it

      It's so it balances out the word "Lego", honestly.

      In the UK we have Maths and Lego. You swap the "s" over and have Math and Legos. From either side the other side looks strange and frightening and it makes you wonder how the people on the other side can get through a day while being so WRONG, but seeing as Math(s) and Lego(s) are two of the most wonderful things on Earth I say just accept it and move on.

    17. Re:Field dependent requirement by avandesande · · Score: 5, Funny

      That's not true- one way is to plot your curve on the paper (a pencil will do), cut it along the line and weigh it.

      --
      love is just extroverted narcissism
    18. Re:Field dependent requirement by Immerman · · 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...

      --
      --- Most topics have many sides worth arguing, allow me to take one opposite you.
  2. Optimization by Anonymous Coward · · 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.

    1. Re:Optimization by DJ+Jones · · Score: 5, Informative

      i work in Finance so perhaps I'm a little bit of an outlier but I use high-level mathematics every day. The other day I caught two programmers (who lacked mathematical backgrounds) attempting to use a binary solver to find a solution to a polynomial algorithm. They had spent two months of time and energy trying to figure out why their model sporadically failed. I had to pull a numerical methods textbook off the shelf and show them the Newton-Raphson iterative method.

      You don't use it often but there are definitely occasions when a lack of understanding leads to pitfalls.

    2. Re:Optimization by Kiaser+Zohsay · · 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.

      --
      I am not your blowing wind, I am the lightning.
  3. Comment removed by account_deleted · · Score: 5, Insightful

    Comment removed based on user account deletion

  4. graphics programming uses math extensively by parshimers · · 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

  5. Study math by Anonymous Coward · · 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.

  6. Re:Read More by Anonymous Coward · · 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.

  7. What a piece of work is man... by Impy+the+Impiuos+Imp · · 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.

    --
    (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
  8. Problem Solving by MatrixCubed · · Score: 5, Informative

    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.

  9. Concepts versus skills by addie · · 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.

  10. Better question by need4mospd · · Score: 5, Insightful

    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.

  11. I misread the headline. by bennomatic · · Score: 5, Funny

    Clearly I've been watching too much Breaking Bad.

    --
    The CB App. What's your 20?
  12. High school level programming. by khasim · · 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.

    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.

    1. Re:High school level programming. by fredprado · · Score: 5, Insightful

      And that is also why most programmers can't even choose which sort algorithm they should use, and have no clue about why their SQL queries are taking 100x the resources they should take.

  13. One thing's for sure by Anonymous Coward · · Score: 5, Funny

    You won't command much credibility if you can't even spell "orthogonal" right.

  14. Linear Algebra by Teppy · · Score: 5, Informative

    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.