Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Math Education Programming Science

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?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: How Many of You Actually Use Math?

Comments Filter:
  • by icebike ( 68054 ) * on Thursday August 09, 2012 @01:49PM (#40934329)

    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.

    • by AlphaWolf_HK ( 692722 ) on Thursday August 09, 2012 @01:57PM (#40934539)

      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.

      • by bannable ( 1605677 ) on Thursday August 09, 2012 @02:05PM (#40934765)

        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.

        • by Nemesisghost ( 1720424 ) on Thursday August 09, 2012 @02:23PM (#40935221)
          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).
          • by icebike ( 68054 ) * on Thursday August 09, 2012 @03:06PM (#40936123)

            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?

          • by Immerman ( 2627577 ) on Thursday August 09, 2012 @04:50PM (#40937711)

            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...

        • by Austerity Empowers ( 669817 ) on Thursday August 09, 2012 @02:57PM (#40935951)

          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.

           

          • by Darinbob ( 1142669 ) on Thursday August 09, 2012 @04:41PM (#40937559)

            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.

          • by CFTM ( 513264 ) on Thursday August 09, 2012 @10:24PM (#40941293)

            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?

      • by FranTaylor ( 164577 ) on Thursday August 09, 2012 @02:05PM (#40934771)

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

        • by afidel ( 530433 ) on Thursday August 09, 2012 @02:18PM (#40935111)

          The answer to your first two questions is universally poorly.

          • by Genda ( 560240 ) <marietNO@SPAMgot.net> on Thursday August 09, 2012 @02:41PM (#40935615) Journal

            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.

        • by godrik ( 1287354 ) on Thursday August 09, 2012 @02:20PM (#40935161)

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

        • If you're really calculating remaining battery life and download time using *calculus*, I think you're doing something wrong.

          Your data is discrete, and there's no funny function for you to differentiate to find the slope. Guesstimating the average speed (of battery use or of download) merely requires something like this http://en.wikipedia.org/wiki/Moving_average#Application_to_measuring_computer_performance [wikipedia.org]

          If you mean the "concepts" of calculus is used here, uh, I've been drawing slopes on Cartesian planes

          • by nahdude812 ( 88157 ) * on Thursday August 09, 2012 @02:48PM (#40935737) Homepage

            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.

        • by pitchpipe ( 708843 ) on Thursday August 09, 2012 @02:37PM (#40935497)
          From what I've experienced:

          How does your laptop computer calculate remaining battery life?

          Wildly inaccurate guess.

          How does your browser calculate remaining download time?

          Roll of the dice.

          How does your tablet distinguish between gestures?

          Doesn't recognize the bird.

      • by Tough Love ( 215404 ) on Thursday August 09, 2012 @02:12PM (#40934975)

        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.

        • by WaywardGeek ( 1480513 ) on Thursday August 09, 2012 @02:52PM (#40935817) Journal

          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.

      • by cpu6502 ( 1960974 ) on Thursday August 09, 2012 @02:13PM (#40934999)

        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.)

        • Missing the Point (Score:4, Insightful)

          by Roger W Moore ( 538166 ) on Thursday August 09, 2012 @03:42PM (#40936697) Journal
          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.
        • by perpenso ( 1613749 ) on Thursday August 09, 2012 @03:45PM (#40936757)

          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.

      • by FranTaylor ( 164577 ) on Thursday August 09, 2012 @02:13PM (#40935003)

        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?

    • by fredprado ( 2569351 ) on Thursday August 09, 2012 @01:58PM (#40934567)
      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.
    • by khasim ( 1285 ) <brandioch.conner@gmail.com> on Thursday August 09, 2012 @02:03PM (#40934709)

      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.

    • by jittles ( 1613415 ) on Thursday August 09, 2012 @02:03PM (#40934717)

      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.

    • by DanTheStone ( 1212500 ) on Thursday August 09, 2012 @02:04PM (#40934729)

      I've done work in GIS software that definitely used my Calculus and Linear Geometry training (for surface areas and distances and intersections on a sphere, for example). The times you need the math are when there isn't already a "package" available for you, or when you need to do something efficiently (optimizing calculations). In my current job Statistics is shaping up to be more useful.

      Then again, I did also have a math minor and gravitate toward technical jobs, so some of that stuff is expected. But I'm not in gaming or rocket science or statistics.

    • by s.petry ( 762400 ) on Thursday August 09, 2012 @02:05PM (#40934753)

      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.

    • by Anonymous Coward on Thursday August 09, 2012 @02:09PM (#40934893)

      Math changes the way you think. It helps abastractization and logical thinking. You can say you don't use it, but you can't say it's useless to learn it.

      Honestly though, I think most people who complain about not needing math are a suffering from some kind of inferiority complex. They can't deal with it, so they want to get rid of it.

    • by mcelrath ( 8027 ) on Thursday August 09, 2012 @02:11PM (#40934927) Homepage

      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.

      • by zakaryah ( 1344891 ) on Thursday August 09, 2012 @03:18PM (#40936309)
        Mod parent up. It says a lot about math education that this discussion has focused on whether or not programmers ever implement routines related to calculus. Math is as much a way of thinking, solving problems and making useful definitions as it is about specific techniques or computations. To quote Wigner:

        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.

    • 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.

      It's not so much that most programming doesn't use math, it's that different business realms use different type of math. Your standard business application probably isn't going to use much more than basic algebra. But it all depends on the needs of the business you are trying to support. Some will need to calculate & keep track of large statistics. Or you could be working for someone who's business is defined by space usage, so you'll need geometry & calculus. In the graphics & high perform

    • A job or a calling? (Score:5, Interesting)

      by Terje Mathisen ( 128806 ) on Thursday August 09, 2012 @02:17PM (#40935095)

      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

      • by Genda ( 560240 ) <marietNO@SPAMgot.net> on Thursday August 09, 2012 @02:54PM (#40935877) Journal

        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.

  • Optimization (Score:5, Interesting)

    by Anonymous Coward on Thursday August 09, 2012 @01:50PM (#40934359)

    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.

    • Re:Optimization (Score:4, Insightful)

      by Anonymous Coward on Thursday August 09, 2012 @01:56PM (#40934489)

      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).

    • Re:Optimization (Score:4, Informative)

      by SQLGuru ( 980662 ) on Thursday August 09, 2012 @01:57PM (#40934541) Homepage Journal

      This.

      If you are just using libraries and assets, you won't do as much math until you need to tune a section of code. If you are writing the lower level graphics libraries, math will be important. Same for other programming areas -- the high-level programmer doesn't need to know the complex problem domain but the low-level programmer does.

      Oh, and learn Linear Algebra (as a simplification, Matrix Math) if you're doing much in a graphics field. It's not in the straight line of "important" math (Algebra --> Trig --> Calculus) but in a branch from there. It's quite useful in graphics, however.

    • Re:Optimization (Score:5, Informative)

      by DJ Jones ( 997846 ) on Thursday August 09, 2012 @01:57PM (#40934543) Homepage
      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.
      • Re:Optimization (Score:5, Insightful)

        by Kiaser Zohsay ( 20134 ) on Thursday August 09, 2012 @02:12PM (#40934961)

        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.

  • How Many of You Actually Use Math?

    Last I added it up, three of me.

  • by MrEricSir ( 398214 ) on Thursday August 09, 2012 @01:53PM (#40934429) Homepage

    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.

  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Thursday August 09, 2012 @01:53PM (#40934431)
    Comment removed based on user account deletion
    • Re:Yes (Score:4, Insightful)

      by Nugoo ( 1794744 ) on Thursday August 09, 2012 @01:59PM (#40934613)
      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).
    • Re:Yes (Score:4, Insightful)

      by djdanlib ( 732853 ) on Thursday August 09, 2012 @02:03PM (#40934725) Homepage

      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"

  • by parshimers ( 1416291 ) on Thursday August 09, 2012 @01:53PM (#40934433)

    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)

    by Anonymous Coward on Thursday August 09, 2012 @01:53PM (#40934435)

    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.

  • Short answer (Score:3, Insightful)

    by Anonymous Coward on Thursday August 09, 2012 @01:54PM (#40934453)

    Others do what they can, mathematicians do what they want.

  • by Impy the Impiuos Imp ( 442658 ) on Thursday August 09, 2012 @01:54PM (#40934459) Journal

    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.

  • by NixieBunny ( 859050 ) on Thursday August 09, 2012 @01:55PM (#40934487) Homepage
    I don't use much math in my work on radio telescopes, which is mostly making gizmos to control physical stuff. Someone else worked out the algorithms long ago, and I do the hardware end of it.

    But I work with coders who have to do some rather intense math to solve problems (mostly coordinate transformations or path generation) that had been solved poorly in the old software.
  • Problem Solving (Score:5, Informative)

    by MatrixCubed ( 583402 ) on Thursday August 09, 2012 @01:56PM (#40934491) Homepage

    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.

  • by addie ( 470476 ) on Thursday August 09, 2012 @01:56PM (#40934495)

    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.

  • Thinking differently (Score:4, Interesting)

    by ubergeek65536 ( 862868 ) on Thursday August 09, 2012 @01:56PM (#40934503)

    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.
    • All of the Halo games were among the most successful entertainment products of all time -- at the time they were released. Most of the physics was handled by a blackbox physics engine they bought from another company. That's why they couldn't fix the jump hacks in Halo 2 ... the glitch was in the physics engine that spared Bungie needing any advanced math to make great games. It was more economical for them to enjoy their ignorance and let the glitch stand.

      A lot of game compamies do this. Just buy the lates

  • Better question (Score:5, Insightful)

    by need4mospd ( 1146215 ) on Thursday August 09, 2012 @01:57PM (#40934531)
    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 (Score:5, Insightful)

    by Hatta ( 162192 ) on Thursday August 09, 2012 @01:58PM (#40934561) Journal

    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.

  • by John Hasler ( 414242 ) on Thursday August 09, 2012 @01:58PM (#40934573) Homepage

    ...then you certainly won't use any. If you do know some and are comfortable with it you will find many uses. On the other hand if you struggle resentfully through the minimum required math certain that you will find no use for it, you will be right.

  • by bennomatic ( 691188 ) on Thursday August 09, 2012 @01:58PM (#40934587) Homepage
    Clearly I've been watching too much Breaking Bad.
  • One data point (me) (Score:5, Interesting)

    by ukpyr ( 53793 ) on Thursday August 09, 2012 @01:59PM (#40934591)

    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.

  • by Fwipp ( 1473271 ) on Thursday August 09, 2012 @01:59PM (#40934601)

    My current job title is "Bioinformatics Analyst," and I need to at least understand a good bit of math that I didn't learn in highschool. While it's rare that I directly need to implement complicated mathematical programs, much of my job involves tuning parameters for specialized software.

    I need to have a good understanding of the changes that are likely to result from adjusting parameters X, Y and Z before I submit a job that takes upwards of a day to complete. To do that, I need to read the papers and understand the algorithms.

  • by DeeEff ( 2370332 ) on Thursday August 09, 2012 @02:00PM (#40934621)

    I use linear algebra and calculus everyday.

    As a geomatics engineer, my programming often involves using and understanding different levels of vector calculus as well as some basic linear algebra.

    By the time I'm 30, I probably won't use it as much. In the meantime, I use it everyday to solve different problems.

  • by KalvinB ( 205500 ) on Thursday August 09, 2012 @02:00PM (#40934639) Homepage

    The more you know the more opportunities you will have and the more earning potential you will have. I've used college level math in programming projects before. I have a friend who's a PhD making buckets of money doing very high level math. So if you want to make buckets of money doing high level math related programming, you will need to learn high level math. If you're comfortable making decent money limited to projects going no higher than high school math, then that's all you need.

    So Trig is like 3 houses in Monopoly. You've made a huge leap in earning potential but you're not at the top yet.

  • by bennomatic ( 691188 ) on Thursday August 09, 2012 @02:01PM (#40934641) Homepage
    Purity [xkcd.com]
  • by crow ( 16139 ) on Thursday August 09, 2012 @02:02PM (#40934683) Homepage Journal

    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.

  • by Mondoz ( 672060 ) on Thursday August 09, 2012 @02:03PM (#40934711)

    If you want to get into post-graduate studies, this means taking the GRE test. There's a lot of math on the GRE that you have to do quickly.
    None of it is terribly difficult, but I found that I was very out of practice, which slows me down quite a bit.
    If you can do high school math in your head quickly, it vastly improves your score.

    I've been in the CS industry for nearly 12 years and offloaded nearly all my high school era math off to calculators and spreadsheets. Very rude awakening when I took my first practice GRE.

  • 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.
  • by paulpach ( 798828 ) on Thursday August 09, 2012 @02:05PM (#40934767)

    I developed a game [blockstory.net] 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:

    • * For game development (what you seem to be particularly interested on), calculus is almost irrelevant. You need trigonometry.
    • * If you work in operations research, then algebra and linear programming are a must.
    • * If you work on average database backed web applications, just some basic algebra is enough.
    • * If you work on AI related field, calculus is very important.

    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.

  • set theory math (Score:4, Informative)

    by magarity ( 164372 ) on Thursday August 09, 2012 @02:05PM (#40934779)

    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.

  • by k10quaint ( 1344115 ) on Thursday August 09, 2012 @02:06PM (#40934801)
    You should not waste your time with it. Otherwise, you might end up competing with me for the interesting jobs. Neither of us wants that. ;)
  • Linear Algebra (Score:5, Informative)

    by Teppy ( 105859 ) on Thursday August 09, 2012 @02:12PM (#40934963) Homepage
    I do most of the design and programming on A Tale in the Desert [atitd.com] and Dragon's Tale [dragons.tl] 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.
  • by EmperorOfCanada ( 1332175 ) on Thursday August 09, 2012 @02:16PM (#40935055)
    I didn't use math much past counter++; until I learned some hard core math. Then I had a new hammer and the math in my code grew to the point where I now need GPUs to keep up. I love OpenCL.Discrete math rocks. I look back at my old pathetic basic algebra self and shudder.

    Often it is useful for either figuring out what is going to happen when some set of algorithms get pounded (instead of just coding up a script to bash them) or in cool analysis of data that otherwise just sat silently in some log file.
  • by call -151 ( 230520 ) * on Thursday August 09, 2012 @02:20PM (#40935147) Homepage

    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.

  • by Animats ( 122034 ) on Thursday August 09, 2012 @02:21PM (#40935165) Homepage

    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.

  • Algorithms (Score:4, Insightful)

    by Tim Ward ( 514198 ) on Thursday August 09, 2012 @02:54PM (#40935863) Homepage

    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.

  • by ceoyoyo ( 59147 ) on Thursday August 09, 2012 @03:40PM (#40936649)

    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.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...