Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Math Science

Which Math For Programmers? 466

An anonymous reader writes "It is no news that the greatest computer scientists and programmers are/were mathematicians. As a kid 'hacking' if-else programs, I was not aware of the importance of math in programming, but few years later, when I read Engines of Logic by Martin Davis I started becoming increasingly more convinced of this. Unfortunately, math doesn't return my love, and prefers me to struggle with it. Now, as the end of the semester approaches, I am faced with a dilemma: What math subject to choose next? I have two choices: 'Discreet structures with graph theory' (discrete math; proofs, sets, algorithms and graphs) on one side, and 'Selected math chapters' (math analysis; vectors, euclidean space, differentials) on the other. I'm scared of the second one because it's said to be harder. But contrary to my own opinion, one assistant told me that it would be more useful for a programmer compared to the first subject. Then again, he's not a programmer. That's why I turn to you for help, fellow slashdotters — any advice?"
This discussion has been archived. No new comments can be posted.

Which Math For Programmers?

Comments Filter:
  • Physicists? (Score:5, Insightful)

    by jeffblevins ( 554702 ) * on Wednesday January 06, 2010 @11:20AM (#30669802) Homepage
    I don't disagree that mathematicians make great software engineers, but I think most of the great software engineers in the past were physicists and electrical engineers.
    • Re:Physicists? (Score:4, Informative)

      by John Betonschaar ( 178617 ) on Wednesday January 06, 2010 @12:38PM (#30671092)

      Dude, if there's three kinds of people on earth that make terrible software engineers, they're mathematicians, physicists and electrical engineers.

      While they may write incredibly smart and efficient computer programs that solve incredibly difficult problems, that doesn't make them good software engineers. The libraries and API's I've used that have the worst documentation, the worst programmning interfaces and the most convoluted and non-extendable architecture are invariably libraries and API's written by (and often for) mathematicians, physicists and electrical engineers. Common 'good software engineering practices' don't appear to apply to people from these fields, which isn't bad if they'd stick with solving the problem and prototyping a solution, then hand over their work to skilled software engineers that are qualified to turn it into good software. Using stuff like LAPACK, BLAS, CSparse, Matlab-type code etc is pure masochism for software engineers like myself.

      Ontopic for the submitter:

      Both sound useful to me, but many of the topics from the 'selected math chapters' are probably only interesting to get a basic understanding of what is what, and improve abstract thinking. If you're ever going to have to write software that does differential calculations or linear algebra all depends on the kind of problems you will work on. There's lots of stuff you don't need to know anything about applied mathematics like that for. Graph theory, data structures and algorithms on the other hand, are almost a fundamental part of any CS or software engineering education. While you can write quality software without any knowledge of linear algebra, I really doubt you'll be able to write quality software without knowledge of algorithms, complexity theory, graph algorithms and advanced data structures. They're the cornerstone of software that doesn't suck.

      • Re:Physicists? (Score:5, Interesting)

        by bughunter ( 10093 ) <> on Wednesday January 06, 2010 @03:08PM (#30673320) Journal
        I think you're confusing the art of programming with the engineering of software systems. The minds that are good at one are generally not good at the other, and training for one often comes at the expense of the other. Very few are good at both, though I have worked with such people. The former requires an intimate understanding of the science and mathematics underlying problems to be solved, whether they are actuarial algorithms for life insurance or physical engines for FPS video games. Physics and math are the foundation upon which the necessary intuitive, creative leaps can be made to solve problems in a robust, elegant manner. Turning the crank on an existing process isn't good enough. The latter is fundamentally systems engineering: identifying and quantifying assumptions, risks, and resource limits; chunking problems and deriving requirements; and lots and lots of bookkeeping and documentation. The bookkeeping and documentation parts are the kinds of things that many physicists and electrical engineers have to be cajoled and browbeaten into. Software engineering can seem very, very tedious to a creative mind. Now, which did the GP mean? I think the former. But I think you are talking about the latter, and you are both correct.
      • by Roger W Moore ( 538166 ) on Wednesday January 06, 2010 @03:39PM (#30673718) Journal

        "...then hand over their work to skilled software engineers that are qualified to turn it into good software."

        As a physicist I only have to look at the code we use and write to see your initial point (try looking at ROOT from CERN for C++ that will make you want to cry!). However your solution simply does not work. You cannot "hand it over" to a non-expert in the area because the usage and purpose of the code is something that they do not understand and so the result will be unusable (there was one program I remember as a grad student which was a beautiful design but the overhead was so large that one senior physicist calculated that he would be retired before it had finished one pass through the data!). The best scientific code I have seen is generally written by an expert in the field who has experience of good software design. Even close collaboration between physicists and software engineers rarely works because neither side is willing to compromise functionality for design or vice versa.

    • Re: (Score:3, Informative)

      As a physicist turned software engineer I think you should take both math classes. Alternatively, take physics classes instead -- if you go far enough you will have to learn and apply almost all of those maths, plus others (linear algebra, series decomposition, approximation methods, and derivation skills, and general problem solving).
    • Re: (Score:3, Insightful)

      by recharged95 ( 782975 )
      You're right.

      Famous software engineers were either former Applied Physicists, or Electrical Engineers. Again, to the rest of the CS audience: that's software engineering. That means making things work, proving concepts in hardware and software. The "how" part.

      I've find Mathematicians excel in the [pure] Software Development part (i.e. Computer Science), in other words, the "why". Pure by means of: interested in writing a new language?

      This is likely directly related to your interests: In s/w develop
  • by eldavojohn ( 898314 ) * <eldavojohn AT gmail DOT com> on Wednesday January 06, 2010 @11:21AM (#30669812) Journal

    It is no news that the greatest computer scientists and programmers are/were mathematicians.

    I caution you that there are many other science professions which require math to varying degrees. The above statement could also be true of phycisists, chemists and maybe even biologists. The vectors, proof and algorithms that math provides a foundation to (or is) can be compared to the statistics that a biologist relies on or more generally processing empirical data in any science. We teach our kids basic math so they understand home loans and taxation later in life. Similarly, your best x in any science related field will likely have strong math skills to take what gets thrown at them.

    I have two choices: 'Discreet structures with graph theory' (discrete math; proofs, sets, algorithms and graphs) on one side, and 'Selected math chapters' (math analysis; vectors, euclidean space, differentials) on the other. I'm scared of the second one because it's said to be harder. But contrary to my own opinion, one assistant told me that it would be more useful for a programmer compared to the first subject. Then again, he's not a programmer.

    But he's definitely correct. The second is going to give you practical skills in programming -- a wide array of practical skills. The first is most likely going to give you some automata theory for computers but unless you're going into theoretical research, the second is the obvious answer. Graphics and games are all vectors, the web is becoming even more so with new browser rendering technologies. Rendering is all euclidean space transposed onto a two dimensional plane (screen) using points (pixels). Differentials are huge in the vision and image processing world and again, in graphics. This is your obvious selection although I challenge you to take both. Also, look for courses on classes that blur the lines between stats/math and computer science. Like courses on error correcting codes or computer language design and theory.

    I don't know about you but I would rather take a seriously difficult course and learn a lot with a grade of C+ than take a seriously easy course and learn little with a grade of A+.

    Unfortunately, math doesn't return my love, and prefers me to struggle with it.

    As a brief aside, it's entirely possible you simply were never exposed to fun math or been exposed to a really influential teacher. It will not give you the joy that primary school math league gave me nor will it be a perfect substitute but Martin Gardner [] has some really fun math. While this won't get you excited about graph theory and linear equations, it might spark something in you to devour math regardless of how dry it is. Talking about quadratic sieves in regards to finding primes is really boring stuff when it's a paper full of symbols. But if you know what kind of power this holds in regards to cryptography, one can get really zealous about it. Remember to help your kids with this should you decide to procreate.

    Also if you haven't read Godel, Escher, Bach [], it might be time. Copies of those sell for cheap used online.

    • by VAXcat ( 674775 ) on Wednesday January 06, 2010 @11:31AM (#30669970)
      I took years and years of vector & euclidean math, differential euqations and the like. Mow after working as a programmer for a very long time, I've used data structures, graphs, algorithms and the like on a daily basis. I've used the other, "Buck Rogers" math...once. I realize this is anecdotal, but I can't see how most programmers would have more use for the advanced analysis style math over the discrete stuff. Gradients, divergences, curls, triple integrals and partial differential equations are a lot of fun, but they just don't come up that often unless you're a physicist or a games developer.
      • by dintech ( 998802 )

        Or you plan to work in finance IT.

      • Re: (Score:3, Insightful)

        by delt0r ( 999393 )
        I have used general calculus (ode, integration, vectors and vector spaces, linear algebra) a lot. For GIS systems, and GPS software even some Tensor math was very useful. Clearly some simulation software a company I was working with needed quite a bit of physics too. Solving simulations equations has come up a lot (some spline curves use that!) so basic linear algebra and matrix math is probably very useful too.

        I am asuming you want some job flexibility rather that being stuck doing nothing but business/
      • by Bakkster ( 1529253 ) <Bakkster,man&gmail,com> on Wednesday January 06, 2010 @12:03PM (#30670520)

        Agreed. Discrete math is vital groundwork for a lot of what is expected from a programmer, while the second course seems more focused but less generally applicable. Basically, if you take discrete you will learn how to find your own solutions to an array of problems through logic, set theory, combinatorics, and algorithms; while the second course will basically teach you a few concepts used in 3D graphics and physics modeling. Unless you absolutely know you want to work in a field that would heavily use the second course, take discrete. However, even if you take the 'selected chapters' course, I think you would have difficulties doing much useful with vector math or calculus without knowing discrete math to turn it into an effective and efficient algorithm.

        To be truly successful, though, you should take both, even if you take one pass/fail or not for credit. The information is just too important not to have.

        • Re: (Score:3, Insightful)

          by CodeBuster ( 516420 )
          I also agree with the parents; the discrete math course with graphs, sets, algorithms and proofs has much greater applicability in a larger number of real world software jobs than the second course in math analysis, vectors, euclidean space and differentials. Unless you plan to go into physics, game programming or defense, your future jobs are likely to involve more of the former and less of the later. Also, I would advise taking the teaching assistants' advice with a grain of salt. The teaching assistants
      • by TheRaven64 ( 641858 ) on Wednesday January 06, 2010 @12:13PM (#30670702) Journal
        Absolutely agreed. Discrete maths is fundamental to computer science. Between graph theory, set theory, and game theory, you've got 90% of computer science.

        The other stuff will be useful in some situations, but it's domain-specific knowledge, not foundational knowledge. It's useful, but so are other domain-specific skills. If you want to understand computer science, you need the discrete maths. If you want to be useful, you need to understand computer science and some other stuff. This may include vector and matrix mathematics, but it may not. I've very rarely used the calculus or matrix stuff that I know, but I use the graph theory almost every day.

      • by Nethemas the Great ( 909900 ) on Wednesday January 06, 2010 @12:40PM (#30671116)

        Whether one field of math comes up or not depends upon what you plan on doing as a programmer/software engineer. There are certainly easy paths through which you can run your career, but there are plenty of the opposite as well. Anecdotally I've found those that choose to take the hard path find their jobs far more satisfying.

        One of the biggest advantages of taking advanced math courses isn't that they will necessarily be directly applicable. But what a satisfying feeling when it does and you can solve the problem. Rather, much like those who choose to get off the couch to exercise and strengthen their physical body so too the math workout strengthens your mind. You'll learn new ways to look at problems and their solutions and gain the raw mental horse-power necessary to do the heavy lifting.

        One word of caution though. Watch the grades. Getting a C in Advanced Calc II needs to be buffered against a whole bunch of B+ and A grades in the rest of your classes. Your GPA is regrettably inversely proportional to the degree of difficulty you will have landing your first job out of college. If your GPA is lackluster you won't get a chance to explain how unlike your peers you took the road less traveled, kicked a** and chewed bubble gum.

      • Re: (Score:3, Informative)

        I took both discrete structures and vector calculus classes.

        I have used the discrete structures, graphs, algorithms far more than I ever use calculus. The only time I would have had a need to use 3d space mapped to a map (IE doing a map) there were plenty of examples for the specific task on the internet.

        That isnt, in of itself, an excuse but for the rarity of the need it was useful.

        I avoided video game programming because I realized that it is not a lot of "fun" it is mostly managing vectors and such, whi

      • Re: (Score:3, Insightful)

        by pjt33 ( 739471 )

        Gradients, divergences, curls, triple integrals and partial differential equations are a lot of fun, but they just don't come up that often unless you're a physicist or a games developer.

        Speaking as a games developer, I consider graph theory fundamental too. Basic to intermediate vector calculus is required for physics, and graph theory is required for things like AI pathfinding. The graph theory course has the advantage that it will probably include some stuff on algorithms, algorithmic complexity, etc.

    • by DeadDecoy ( 877617 ) on Wednesday January 06, 2010 @11:32AM (#30670000)
      As a programmer, I've found statistics to be another useful branch of mathematics. It can be more functional when collaborating with others to do number crunching and can having varying degrees of difficulty from drop-dead-easy to omgwtfbbq. Also, probability and statistics in general, are often incorporated in machine learning to make the computer handle non-deterministic problems; good for programming AIs and such. Personally, I always liked learning the 'harder' thing as that might expose my brain to concepts or ways of thinking that I wasn't already familiar with. But regardless, math isn't too bad if you take the time and effort to understand it.
    • Re: (Score:3, Insightful)

      by Cyberax ( 705495 )

      Don't forget numerical algorithms for calculus problems (integration, solving of differential equations, etc.). Their implementation them can give you a lot of practical skills.

    • Re: (Score:2, Informative)

      by erikscott ( 1360245 )
      A couple of thoughts -

      The former will be really useful if you decide to work on database-related things. Not just "using SQL to get my work done" but actually crafting the internals of a database. Similarly useful for compilers - both of them have optimizers, and that's just one big graph traversal. Too big to do in a useful amount of time, so all kinds of heuristics are used for graph pruning. Go for it.

      The latter is a good foundation for numerical analysis, a field occupied by a lot of engineers a

    • by rochberg ( 1444791 ) on Wednesday January 06, 2010 @11:48AM (#30670280)

      [...] The second is going to give you practical skills in programming -- a wide array of practical skills. The first is most likely going to give you some automata theory for computers but unless you're going into theoretical research, the second is the obvious answer. Graphics and games are all vectors, the web is becoming even more so with new browser rendering technologies. Rendering is all euclidean space transposed onto a two dimensional plane (screen) using points (pixels). Differentials are huge in the vision and image processing world and again, in graphics. This is your obvious selection[...]

      I couldn't disagree more. There is no "obvious selection," because the OP didn't mention what type of programming interests him. If you're going to specialize in graphics or scientific computing, yes, the analysis course would be helpful. However, I find that branch of mathematics completely useless for the programming work that I do.

      In more systems-oriented programming (e.g., OS, compilers, networking, databases), a strong background in algorithms, data structures, and graph theory is absolutely essential. If you start moving into security and cryptography, you need to understand modern algreba topics like number theory and group theory; having a solid foundation in set theory is a prerequisite for any of those topics.

      [...] although I challenge you to take both [emph. added]. Also, look for courses on classes that blur the lines between stats/math and computer science. Like courses on error correcting codes or computer language design and theory.

      On this point, we agree.

    • by samkass ( 174571 ) on Wednesday January 06, 2010 @11:48AM (#30670284) Homepage Journal

      If you're going to choose and not do both, then it largely depends on what kind of "programming" you're going to do. Note that "Programming" is a very different profession from Computer Science or Software Engineering. If you're interested in 3D, games, physics, etc., you're going to need a solid foundation in linear algebra and calculus. If you're going to be dealing in large datasets, distributed systems, client-server communications, etc., then discrete math and set theory will probably be very useful. If you're going to go into AI, classifiers, robotics, etc., then you'll probably want both, plus statistics.

      If you're just going to bang out code to someone else's careful spec, then you may not need all that much math.

    • The second class sounds like a crammed together sampling of different topics that will leave you without enough knowledge in any one of them to do anything useful. If you want to do some sort of computational physics in the future then you will need many more classes than that one, so you might as well start at the beginning and take them all individually. It will be less overwhelming, and you will have a much better understanding of the subject.

      If you don't want to do computational physics, then all that c

    • Re: (Score:3, Insightful)

      As a brief aside, it's entirely possible you simply were never exposed to fun math or been exposed to a really influential teacher.

      While the entire post is very insightful, and every word as true as 1, this one had a special reflection on me. Honestly, a fun Stats teacher and a silly Linear Algebra in my Polytechnic courses made the difference between snore and cries for more.

      Also, learning about Vectors, Matrixes, and their transformations was single handedly the most useful math I've ever learned in my life, in regards to programming. It has endless applications. Like you said, Rendering, Cryptography, I even use it in complex organi

    • by beelsebob ( 529313 ) on Wednesday January 06, 2010 @12:07PM (#30670598)

      I 100% disagree with this post.

      Almost *any* complex algorithmic task (programming) comes in the end, down to solving *some* graph theory problem. The first one most definitely sounds more useful to a programmer. This has applications in coming up with algorithms, understanding type systems, proving to some degree that your program works, understanding the logic involved in your program. Sets and graphs are about the most important structures you will ever come across in programming.

      The latter is pretty much only useful for people building 3D tools, to which the former is also applicable.

    • Does math pay? (Score:4, Insightful)

      by Kagato ( 116051 ) on Wednesday January 06, 2010 @12:46PM (#30671204)

      The programmers I know who do serious math, such as very complex DSP algorithms, game programming, complex statistics analysis, etc. get paid a fraction of what a I do for business/consumer web apps. That's not to say there aren't some brilliant folks out there getting paid a lot of money to do complex mathematical program, but they seem to be the exception, not the rule. Most of my work tends to be logic monkey stuff. Algebra I and II would cover it the stuff I do. I say current with tech, know how to talk to business folks, and get paid very well for my services.

      Even when I do things like insurance rating and underwriting application; the Actuary has already done the hard math and distilled it into a fairly very simple table of rating factors that are handled using simple arithmetic.

      It's kind'a sad to see Advanced Math only pays for a small percentage of programmers.

  • Take Both (Score:3, Insightful)

    by Fantom42 ( 174630 ) on Wednesday January 06, 2010 @11:23AM (#30669830)

    Take Both. Make time for it.

    • I had to take both for my degree.

      The first helps with thinking certain ways. The second helps with technology of solutions.

      Sort of like college vs trade school.

      I ended up in business and the heavy math & physics were never used.

      I did a lot of set theory type things for SQL.

      These days, I'm a team supervisor and mainly use it for tasks similar to natural language processing with awk and perl for data analysis.

  • by Jah-Wren Ryel ( 80510 ) on Wednesday January 06, 2010 @11:24AM (#30669840)

    Programming is a HUGE field. There is plenty of work that doesn't require significant math.
    Go with what interests you and let the details work themselves out.

    • by boner ( 27505 ) on Wednesday January 06, 2010 @11:45AM (#30670220)

      I second that, study what you enjoy and see where your interest takes you. I struggled with statistics when I studied for my masters, but my current job is steep in statistics and I am much better at it. Funny how that goes.... It's a lot easier to learn a Math subject when there is a real need to understand it present, otherwise it can remain abstract and obtuse.

      The other piece of advice: do your homework, everyday, and don't give up. Seriously, I was a B+ student until my math teacher started checking my homework - I told him that there were other students more deserving of his attention. Within a few weeks I was an A-student...

      As for making a choice, I would do both, but take the easier one first.

    • by Carewolf ( 581105 ) on Wednesday January 06, 2010 @11:46AM (#30670244) Homepage

      True not all fields require math, but just to answer the question. Yes, choose what you like:

      If you want to do algorithms and language theory, you need discrete math, graph theory, etc.
      If you want to do graphics and signal processing, you need calculus (also called math analysis), geometry and differential.
      If you want to do human computer interface, you don't need math (or a brain).

      If you want to kick ass, you need all the introductory math you put your hands on (advanced university level math is too theoretical though and only useful for quantum physics and math majors).

      • by TheRaven64 ( 641858 ) on Wednesday January 06, 2010 @12:15PM (#30670746) Journal

        If you want to do human computer interface, you don't need math (or a brain).

        Absolutely untrue. You need statistics, graph theory, game theory, and a little calculus. At an absolute minimum.

        Attitudes like yours are why so many user interfaces are terrible.

        • Re: (Score:3, Informative)

          by D Ninja ( 825055 )

          Second this.

          User interfaces are terrible because of attitudes like the GP has because, at the surface, they *seem* simple so many people ignore them thinking that they'll just "slap on an interface" at the end. However, if you ever try doing some user interface design, it is a nightmare of a problem. To add to the list of courses needed, I would also throw in (non-math) courses on psychology - specifically cognitive, social, and visual psychology.

      • Re: (Score:3, Insightful)

        by TheLink ( 130905 )
        > If you want to do human computer interface, you don't need math (or a brain).

        If you want to do HCI well, you need a decent brain with understanding of the various sorts of humans that might be using the interface. And often a fair bit of creativity.

        It's not easy to do well. So many GUI designers end up doing stuff like "add more themes", flashy stuff and wobbly windows, instead of actually improving things.

        Just look at how UIs have changed over the years to see what have been real improvements and what
  • If you ask a university's Comp Sci. program, they'll most likely say either suggest some combination of 4-5 Calculus classes (Calculus I-IV and Multi-variable Calculus).

  • by geminidomino ( 614729 ) * on Wednesday January 06, 2010 @11:25AM (#30669876) Journal

    If you're just worried about the programming (coding and maybe some design) side of things, then the math you need is going to be the math that applies to what you're coding (calculus for physics engines, algebra for accounting packages, statistics for reporting ,etc...).

    On the other hand, if you think it will benefit you to know more about what underlies the code (it does me, but we may think in different ways), then I would say absolutely that you should take the Discrete. Computer Science is 95% applied Discrete Mathematics. Computer Science is also a lot of theory which, truth be told, tends to be very specialized in usage to developers unless they're going to the very low levels. After taking DM for my degree, I found that my code has improved, but I also admit that it is anecdotal.

  • by BigSlowTarget ( 325940 ) on Wednesday January 06, 2010 @11:25AM (#30669882) Journal

    anything its to take business math. It has to take some amazing math to turn - X billion in profits into +xx million in bonuses.

    • by ShatteredArm ( 1123533 ) on Wednesday January 06, 2010 @12:12PM (#30670676)
      This is actually quite simple. The trick is to recognize gains as soon as possible, while waiting as long as possible to write off losses. This is the motivation behind FASB's rule change at the beginning of April 2009 (at the, suggestion...of the large banks) that allowed any asset marked as "held to maturity" to be valued at whatever they want (so long as it doesn't exceed the maturity value). That means that if 50% of your loan portfolio is delinquent and has no chance of ever accruing, you can put a label on it that says you'll hold it to maturity, and you don't have to recognize a 50% loss in your loan portfolio until 30 years down the road (so long as you don't foreclose on the debtors, of course). By simply waiting on the foreclosures, you can make billions off of free money from the Fed discount window (heck, you can even borrow that money from the Fed at 0%, and loan it right back to the federal government at 3%!), and rake in billions in "profits" (and bonus payouts). And then when your bills come rolling in, it doesn't matter that you have no income and all your assets are worth less than a Pontiac Silverdome... you've already cashed in your stock options. As they say, patience is a virtue!
  • Discrete structures (Score:3, Informative)

    by MxTxL ( 307166 ) on Wednesday January 06, 2010 @11:26AM (#30669884)

    This is the fundamental math for computer science. The other is useful for other subjects, some of which will need software... but if you want powerful fundamentals, it's in discrete structures.

    • Re: (Score:2, Interesting)

      by woboyle ( 1044168 )
      I would tend to agree that discrete structures is most useful for general purpose programming. However, if you plan on getting into the lucrative field of high-preformance investment programming (financial derivitives, real-time trading algorithms, etc) then the second would be a good choice. So, take the first one first, and if you can, take the second one later. Both will stand you in good stead.

      FWIW, I used to write risk-analysis software for the options trading industry. We used a lot of calculus and
  • Set Theory (Score:2, Insightful)

    I believe that my courses on Set Theory (aside from the obvious basic maths like Calculus and Differential Equations) have been the most useful to me as a programmer. It looks like 'Discrete Structures with Graph Theory' may be the way to go, but I recommend taking as much math as you can. Like an earlier comment stated, "Make time for it".
  • by jockeys ( 753885 ) on Wednesday January 06, 2010 @11:29AM (#30669938) Journal
    and pretty much the only math I use on a daily basis (when writing code and designing software) is the discrete math. (I did take both classes when I was in school, and lots more besides) so, in my experience the first course would be much more useful.
  • I would take the algorithms course first. I'd suggest taking both of them, since it sounds like you're not doing nearly enough math, but graphs and algorithms are central to so much computer science that it will definitely help to take that one first.

  • by Gothmolly ( 148874 ) on Wednesday January 06, 2010 @11:31AM (#30669958)

    Venn Diagrams. Intersection. Union. AND/OR/NAND/NOR

    I constantly run into people screwing stuff up because they get lost in the logic of stuff like "if this is part of that group but not contained in this set".

  • by Rix ( 54095 ) on Wednesday January 06, 2010 @11:31AM (#30669966)

    Don't rent the attic room in that really old house. No matter how cheap it is.

  • First, any math class can be useful to programmers. I went full double major CS and Mathematics and found all my classes useful. Set Theory perhaps is the most closely related to CS, but all of them can have value depending on what you get into after your studies. Also, whether one is "harder" should not make a difference. If anything it should make you want to take it more. Exercise your brain in all different ways, it will benefit you in the end regardless.

  • by Locke2005 ( 849178 ) on Wednesday January 06, 2010 @11:31AM (#30669974)
    If you struggle with math, I would definitely take the discrete structures class, not the second class. 3D Vector Calculus (e.g. Maxwell's equations) was one of the toughest subjects I've ever taken, and guess what -- I've never used it since! Set theory, on the other hand, is used constantly in CS; in fact, boolean algebra is just a subset of set theory, and I believe Relational Databases are built on top of set theory.
  • I'd go with algorithms and logic if you can only choose one of the two. While the other stuff is doubtlessly useful, nothing will serve you better in programming than a firm understanding of algorithms, and logic which can be used to know when to employ them and how to create them. Just my $0.02, YMMV.
  • embrace the pain (Score:4, Informative)

    by bl8n8r ( 649187 ) on Wednesday January 06, 2010 @11:34AM (#30670036)
    if you don't have a good understanding of algebra and geometry, computer graphics coding is going to suck for you. You will not only find the work daunting, but your coworkers will be very frustrated with the duct tape work-arounds you will need to employ in order to compensate. My advice would be to work your butt off to grok both classes. It will only make your quality of work life more enjoyable later on. Trust me, math hated me as much as I hated it and I've had to go back and do it over.
    • Re: (Score:3, Informative)

      by v1 ( 525388 )

      if you don't have a good understanding of algebra and geometry, computer graphics coding is going to suck for you.

      I decided to write a primitive FPS, and the 3d rendering was an amazing retro back to the days of geometry... it would be totally impossible without a good background in geometry.

      Here's a simple one to wrap your mind around: lets say we're in a 2.5-D world. (there's a vertical element to view, but all walls extend from floor to ceiling, so it's basically 2D rendered in 3D) To draw the walls

  • The first set of topics will give you a solid foundation that you can apply to many areas of programming. I think Discreet Math, sets, algorithms, and graph theory can be used in a wide variety of fields to solve many types of problems.

    The second set of topics will help you in some very specific programming tasks related primarily to games, AI, and graphics programming, which comprise a small fraction of total programming jobs. Also, you don't typically need to be intimately familiar with vectors and eucl

  • take Discreet (Score:5, Insightful)

    by trybywrench ( 584843 ) on Wednesday January 06, 2010 @11:36AM (#30670068)
    Set theory and graph theory come in handing when programming.

    Some variation of the "traveling salesman" problem, a graphing problem, shows up in every industry out there so it would be a good idea to be familiar with its nuances and the various approaches to getting it mostly right (i don't think it has been solved).

    Set theory is a good place to start thinking about just about anything. You'll probably also cover combinatorics, formal logic, and predicate calculas along with set theory which are also great tools to have when programming.
  • by sab39 ( 10510 ) on Wednesday January 06, 2010 @11:36AM (#30670086) Homepage

    I'm not directly familiar with either course (and the one-word summaries are a bit limited for providing informed advice!) but it sounds to me like the first one would be generally useful and you should take it regardless of what programming you intend to do - it sounds like it covers sort of the "mathematical fundamentals of programming". The second sounds more like it's useful for certain *types* of programming - perhaps 3d or game programming. Unlikely to be terribly useful for writing database-backed web applications, for example.

  • by Dr_Art ( 937436 ) on Wednesday January 06, 2010 @11:37AM (#30670102) Journal
    Take the Discrete Math stuff first since you are just beginning to learn Computer Science and it will fit better with those courses. You should then take Numerical Analysis to totally break your concepts that computers are precise. Finally, take the classical Calculus & Differential Equations track just so you can take Partial Differential Equations, at which point the math will start becoming useful for real world Engineering problems.
  • by david.emery ( 127135 ) on Wednesday January 06, 2010 @11:39AM (#30670124)

    I'd strongly recommend going with choice #1. There's a huge amount of application of graph theory, etc. in both computer science and in practical programming.

    My undergrad degree is in Math, and I have -never- used anything I learned in the classical mathematic topics past linear algebra. The courses in statistics and probability, and the 2 Operations Research courses (I was very lucky to get both of them) have been the really useful items. Unfortunately I was unable to take the graph theory course, but I bought the book anyway.

    In conversations with my Alma Mater, they have substantially changed their curriculum, moving away from the classical analysis topics and more into discrete math.

  • For most programming, discrete is very useful, as well as being one of the more fun math courses you can take. It definitely helps in understanding CS theory, and a lot of the more interesting CS problems out there are graph theory questions (e.g. vertex coloring). If you're looking at, say, attacking the whole P vs NP-complete question, that's the way to go.

    However, if you're expecting to do game or scientific programming, then the vectors, calculus, and statistical work of the other course will probably s

  • Agebra... (Score:5, Interesting)

    by RingDev ( 879105 ) on Wednesday January 06, 2010 @11:40AM (#30670136) Homepage Journal

    Proofs, proofs, then more proofs.

    Programming is all about isolating the smallest part of a problem and simplifying it out. Doing proofs is effectively the basis for programming.

    Understanding trig and calc is handy for specific projects, but for every single program we write we have to be able to see the problem, to isolate components of the problem, and to simplify them.


  • by omb ( 759389 ) on Wednesday January 06, 2010 @11:41AM (#30670154)
    Do the Algebra/Logic first, it is more directly applicable to computing and will allow you to understand undecidability (Goedel) computability (Turing) and of course graphs, groups and algebras. Also modern approaches to what people call Calculus, ie diferentialability etc are much more algebraic in the arena mathematicians call Analysis. Read Don Knuth's Fundamental Algorithms in parallel
  • I always thought it all boils down to simple arithmetic. Add, subtract, bit shifts...etc.
  • He's an idiot. (Score:4, Interesting)

    by bluefoxlucid ( 723572 ) on Wednesday January 06, 2010 @11:42AM (#30670168) Homepage Journal
    Discrete maths are more useful because you can prove the operation of your program. The other crap is useful for you to write scientific applications, physics simulators, and clones of Quake-- in which case, you need to be able to understand your own complex logic flow to make sure your program is executing those complex mathematical computations correctly, on the correct data, with the correct output.
  • Take both (Score:3, Insightful)

    by xZgf6xHx2uhoAj9D ( 1160707 ) on Wednesday January 06, 2010 @11:42AM (#30670172)
    You could take an entire math degree and still not have enough math to be a decent computer scientist (being a programmer is another matter, I suppose). Discrete math (or at least I hope you meant to say "discrete". "Discreet" math would be much less useful) is extremely useful for all areas of computer science. Analysis is extremely useful for a lot of areas of computer science, but I don't think as comprehensively as discrete math.
    • To follow up on my own post, the big practical advantage to the first course is graph theory. Graph theory is a huge field and I have yet to come across any discipline of computer science that does not reduce to graph theory.
  • by Tharsis ( 7591 ) on Wednesday January 06, 2010 @11:43AM (#30670180)

    Programming is about algorithms. Proving them, or better yet, deriving them (you may find deriving is a lot easier than proving, I did). Graphs may come into play, but that depends on your particular interest, they do give a great insight into complexity though. Knowledge of sets is extremely useful.
    To me the first looks absolutely essential for a computer scientist. The second is nice if your interest lies in that direction, but it doesn't have anything to do with programming in general (it does seem essential for a mathematician though).

    My advice: Learn Logic rather than math. It is far more useful.

  • by hardburn ( 141468 ) <hardburn&wumpus-cave,net> on Wednesday January 06, 2010 @11:43AM (#30670188)

    It ultimately depends on the kinds of problems you're going to end up working on. Any sort of graphics programming is going to require a solid understanding of geometry. Designing games requires probability/statistics, where the actual math could often be understood by a bright junior high student, but gets combined in complicated ways.

    Calculus is overrated for anyone not going into Physics or Engineering. I wish schools would put more emphasis on statistics instead, since that's useful for anyone who picks up a news report and sees that there's a 2% spread of support for a pair of political candidates.

    More importantly than any of that, IMHO, is being able to see how the program fits together on an abstract level. This can be described as a form of math, but it's well outside of what most people think of as math. Which is fine, because what most people think of as math has nothing to do with what mathematicians do all day. Just the same, it's not necessarily anything that gets taught by formal math courses, either, at least not directly. Rather, more advanced math leads to better abstract thought in general. So just take more math, whatever it is, and you'll be indirectly learning how to be a good programmer.

  • Linear algebra is how every single difficult problem is ultimately solved on a computer.

    Ordinary Differential Equations (ODEs), Partial Differential Equations (PDEs), Vector graphics manipulations, etc. are always reduced to a system of linear equations to produce an approximate solution.

    Learn linear algebra first, how to program its solutions, then move on from there.

  • arithmatic. Billing rate times billed hours. Remember, if your job actually requires that high level of math, most likely the pay will be very poor. The real money is in writing SQL queries to data bases for finance software.

    Basically the logic goes like this. Jobs requiring high level of math are managed by people with high level of math knowledge. They tend to be hard nosed and quite stringy with money and difficult to bullshit with and get a phat pay check. Financial managers, on the other hand, are of

  • Optimally, you'll want to get as much math as you can, especially in the realm of proofs, number theory, and combinatorics. They're particularly useful because they directly map to computer science in computational complexity and computability. Knowledge of complexity and the ability to establish the best, average, and worst case performance of an algorithm is quite helpful in ensuring your programs run quickly -- especially if they have slow parts outside of your control (GC, I/O, etc.) or if you're workin

  • I use concepts from my discrete class on a daily basis, and have at my game software job, my enterprise software job, my cable tv software job, and my gps software job.

    I've also taken the other kind of class, but I've never used:
    math analysis; euclidean space, differentials in 15 years of work.

    I have used vectors on occasion, but that is really not hard to pick up.

  • programming is about logic. causes and effects. about interactions in between created, derived logic sets.

    mathematics is a much more bigger procedural set which bases all its procedures and operations and practices on the framework of logic. its, therefore, a derived set.

    what you need to know good is logic. if you are able to utilize logic good, you will be able to do good programming. being a mathematician would help only because you would sharpen your logic skills while working on mathematical problems. i

  • The problem with the relationship between math and programming is that math is of absolutely no use to a programmer, except when it is. That's a rather obtuse way of saying that all the math in the world won't make you a better programmer if you don't already have the foundations of programming, but if you've already mastered most facets of programming knowing more math will help you. Depending on exactly what you're doing, and with what languages you're doing it, you'll get more or less use out of differen
  • The bulk of what you learn in that class you will end up using in some practical sense, especially algorithms, if you have no prior study of such. Plus, discrete math (to me) was a more enjoyable subject.
  • Discrete if you plan on developing algorithms or data structures

    Vectors etc. if you plan on doing 3D graphics or physical process simulations.

    During my programming career, I have used every math and stats I've ever learned in a course. So like tohers say, take both. By the way, discrete was my worst mark, but also where I learned the most.

  • You should probably take both of these courses: requirements aside, both are important for a truly solid CS education.

    Take Discrete Structures first, especially since it has graph theory rolled into it. This will be more directly applicable to your CS coursework as discrete math and graph theory pop up EVERYWHERE, and when you get out into the real world you'll benefit from a solid understanding of these concepts.
    Math Analysis will be useful too, as will the linear algebra components that seem to be bur
  • Vector and such math is good if you want to go graphics and the like.

    Algorithms and Automata theory is good if you want to go the Database administration route.

    You pays your money and makes your choice.

    As for Mathmaticians making the best programmers - sounds like a mathmatician talking to me. It ain't neccessarily so.

    I chose the automata route myself, and I employed as a DBA for a fortune 10 company. However, with todays DBMSes, you might want to get some statistics under your belt.

  • I've got an O'level grade B in maths (For non Brits, that's what you do when you're 15/16 years old and 2 levels below a degree i.e. worthless) and that's it. I've been programming for 30+ years and I don't think I've needed any maths beyond the basics. Given that most of this has been writing stuff for banks, you'd kind of think maths would be used all the time but nope, just the simple stuff. The only maths orientated programmers I've met were in the market analysis/tracking/predicting area and they used
  • You don't say what you want to do, long term. If you want to do interesting things in programming, then certainly, pile up the math, and don't shy from hard courses - you want to be pushed here.

    Something to keep in mind, however, is that coding isn't all about 'l33t algorithm skills. Rather a lot of it is using other people's APIs, and if you're good, creating the same. This, fundamentally, is a communications problem, not a coding problem. It has been my experience that the best coders are also very solid

  • Pick the Discrete Math course. Really.

    Consider this: first of all. there is plenty of software engineering to be done that doesn't require mathematics at all (web development, administrative systems, etc.). Second, for the jobs that require math from your second category (i.e., calculus and linear algebra), you almost always require the first category as well, lest you want to become one of those scientists who write unmaintainable scientist-code :-) Third, the jobs where that category of math is require

  • by tjwhaynes ( 114792 ) on Wednesday January 06, 2010 @12:20PM (#30670844)

    ... you have will have to break through that wall at some point.

    Maths is not a memory-based subject - you have to build the manipulation skills that Math requires. The only way to acquire that ability is to keep doing the maths problems until they start to click. You need to build a set of tricks to change problems from ones you don't recognize into ones you do. Be prepared to grind it out. Find a set of problems that increase in difficulty and hack at them until they make complete sense. Don't rush and don't attempt to do them all at once.

    You also need to find some Math tasks that are fun or interest you. If you are learning about complex numbers, go look up some fractals and look at the formulas. Picks some starting values and play with the numbers. Get a sense of how the numbers move around and a firm underpinning about what is going on. If you are doing calculus, play with the equations of motion and work out what a canon ball does under constant acceleration. Try modelling a N-body system of planets moving around in 2D on a computer. All the time, you will be building an internal model about the way that all this hangs together.

    Maths can be extremely rewarding once you grok it. But if you don't get past the struggle phase, it will never give you any pleasure and you'll miss out.

    Toby Haynes

  • by Animats ( 122034 ) on Wednesday January 06, 2010 @12:35PM (#30671052) Homepage

    I have a MSCS from Stanford (1985), and the field has changed since then. Back then, it was all about discrite math - number theory, combinatorics, mathematical logic, computability, and proofs. There was no number-crunching at all in the curriculum. Of course, back then, an FPU was an extra-cost option on a PC. I've actually done automated program verification work. [] But outside of IC design (where formal methods are routinely used), there's not much of that going on now. Now, number-crunching has come to the fore.

    In the 1990s, I spent several years on what turned into ragdoll physics for games. That's all about differential equations and number-crunching. I had a hard time switching over. But I finally got used to deterministic number-crunching. I have no mathematical intuition for it, though; I took it up too late in life.

    Now, the leading edge of computer science is probabilistic number-crunching. Take a look at Stanford's CS229 - Machine Learning [] class. That's the technology that's driving AI now, and it's working across a broad range of domains. The logicians are out, and the statisticians are in.

  • by colmore ( 56499 ) on Wednesday January 06, 2010 @12:43PM (#30671168) Journal

    If you're writing GUI programs, implementing business logic, accessing databases, and doing many of the workaday tasks of the grunts of the technology world, you don't need much math. Plenty of people have become very good professional developers with neither a degree in math or computer science.

    However, mathy programming is (to some people) more fun, and if you angle yourself correctly, it's harder and a more rare skill set, so you can get more money. Knowing math is also pretty important if you want to become a professor of computer science, which if you care more about vacation time and benefits than salary, is one of the sweetest gigs going.

    Combinatorics, probability, linear algebra, and graph theory are probably the most applicable to the widest range of problems. I'd put combinatorics at the top of the list, since it's going to be used to figure out the time and space complexity of any complicated data structure or algorithm. If you want to do anything with peer to peer software or networking, then graph theory is more or less essential. Linear algebra is all over any simulation of physics (games, control software for vehicles, pretty much anything with some sort of sensor or motor) as well as finance (there is mad money in financial computing, not as much as two years ago, but still a lot). Probability is good for figuring out things like hash collisions, average performance of algorithms.

    Number theory is used almost exclusively for crytography. Which is an awesome thing to work with. The NSA has a lot of good jobs if you're cool with that morally.

    If it was 30 years ago and more programming jobs required the actual manipulation of 1s and 0s, then boolean algebra and discrete math would be at the top of the list. They still do if you want to work with embedded systems, compilers, or anything under the umbrella of EE/CS.

    Numerical computing (like if you wanted to build MATLAB) uses all sorts of math, and I'm sure there's someone somewhere simulating quantum physics who's up to their neck in Abstract Algebra (which is a fascinating subject if you've got the stomach for some tough proofs)

    There's probably not much undergraduate math that ISN'T useful for writing code in some problem domain or another.

    If you want a good book on the kind of very useful computer math that isn't taught to undergrads nearly enough, check out Hacker's Delight by Henry Warren. It's a beautiful little book that will come in very handy if you ever need to write efficient C or assembly. And if you dig it then dive into the insanity mandala that is Donald Knuth's The Art of Computer Programming.

  • Learn vs Practice (Score:3, Insightful)

    by Shotgun ( 30919 ) on Wednesday January 06, 2010 @02:31PM (#30672806)

    Math isn't just "learned". It is "practiced". Much in the same way that you don't just "learn" to throw a 90mph fastball, you don't just "learn" to do math. Math is a set of techniques, combined with skill that must be developed.

    A large part of math, especially that done in high school and college, is just exercise for the brain. There may be some practical application in the future, but the vast majority of people will never have a need to take a derivative any more than they will have the need to throw a 90mph fastball.

    What they will have a need for, is the mental capacity to think methodically, logically, and mechanically about a problem. I cringed when my son's college writing professor said that "Luckily, journalists don't have a big need for math." That sort of braindead mindset is why we have reporters not bothering to question how federal healthcare will ever save money in the US. Journalist are not trained to wrap their minds around logical concepts like "If A=B, and B=C, then A=C". Those neurons have not been exercised.

    The goal of taking the math class is not necessarily to learn a specific set of mathematical techniques. It is as much about developing the mental capacity as anything else. When you start developing, it will be very difficult to cope if you haven't developed those mental muscles.

  • Two kinds of math (Score:5, Insightful)

    by Alsee ( 515537 ) on Wednesday January 06, 2010 @02:41PM (#30672970) Homepage

    This This is a gross simplification, but there are sort of two kinds of math. There's logic math, and there's numbers math. It sounds like the the two courses roughly divide according to this line. When most people hear math they generally think of numbers math.

    If you are a programmer then you do already love the first kind of math, and it does love you back. It's the second kind of math, the ugly numbers math, that scares you.

    Math is not merely "important in programming", programming literally is a specialized form of math. Most people don't realize programming is math because because people think of "numbers math" when they hear the word math. Everything software is and everything software does is "logic math". The math of manipulating complex information, the math of manipulating complex logic relationships.

    The math of manipulating data.

    'Discreet structures with graph theory' (discrete math; proofs, sets, algorithms and graphs)

    Programming extensively uses sets, discrete math, and graphs to organize data, to understand data, to manipulate data. A program is literally nothing more than one big algorithm built up out of several smaller algorithms. And in a deep sense, programs and proofs are the exact same thing. There is a math proof that every program can be directly translated into a proof, and every proof can be translated into a program. They are fundamentally identical things with identical logic and identical properties. Reading proofs and writing proofs uses the same precise step-wise logical analysis as reading and writing software.

    This course is the math that is the very essence of programming. It's the sort of math and logic that you already you already use every day as a programmer without realizing that it is math - the sort of math you *will* use every day in the future as a programmer. The insights and logic skills in this course will directly advance your every day skills and capabilities as a programmer.

    'Selected math chapters' (math analysis; vectors, euclidean space, differentials)

    There are things that can be useful *in* a program, but they are not really useful *to* programming. For example if you want to handle or simulate physics-systems, falling rotating moving objects, manipulating 3D objects and graphics, then vectors acre extremely important, along with good intuitive spacial skills. The math analysis and differentials are generally even more rare and specialized. Computers are fantastic at handling that sort of stuff, and sometimes you really need an advanced math-programmer to do literal "rocket science" aerodynamics and orbital mechanics, but most programmers will never need to touch the stuff. You don't need scary-math analysis or differential equations to program an operating system or a webserver or any normal business application.

    If you're not doing that sort of sciency-math programming, then you'll never use that stuff. If you're not working on that stuff but you do come across a case where you need to pull in a small piece of that stuff, you can usually just copy-patse in the ugly equation you need even if you don't have any grasp of the math behind it.

    The biggest issue there is if you want to do 3D graphics manipulations. A lot of those math equations can be copy-pasted in semi-blindly, but you will seriously choke on that sort of work unless you are good with vectors and have a good intuitive spacial skills.

    So in short you definitely want to take the 'Discreet structures with graph theory' course. It will make you a better programmer. The other course merely allows you to specialize as a mathy-sciency-programmer. Take both if you're up for it, but that sort of mathematical programming is not everyone's cup of tea. You can get by fine without it.

    one assistant told me that it would be more useful for a programmer compared to the first subject. Then again, he's not a programmer.

    Exactly - he's not a programmer.

    He sees the course expanding your ability to write programs

  • by DrVomact ( 726065 ) on Wednesday January 06, 2010 @07:23PM (#30676608) Journal

    I got a Ph.D. in Philosophy back in '78 (am I going to have to specify that in four digits soon?), and one day when I was moaning around because I couldn't find a job with reasonable pay and even minimal dignity, a friend said to me, "go into computers, Vomact". I said something like, "huh? But I'm terrible at math!". He told me not to worry, "there's no math required, it's all logic". Overall, I've found that to be true. Basically, you need a mental tool-box to solve programming problems, and those problems have been mostly logic problems for me, so my tools worked just fine. I think that maybe studying mathematics gives you similar tools, but I've always suspected there's some kind of mathist prejudice at work in CS departments that require calculus as a prerequisite. I think they just put it on the list to act as a filter to keep people who should get an M.B.A. or something else trivial from wasting their time. But it's a filter I couldn't have passed. Luckily, there were very few formally trained programmers back in the early eighties, and someone like me could talk his way into a software job.

    It's obvious, of course, that if you intend to write programs that actually use mathematics, then you'd better study math—if you're going to be a scientific programmer, for example, just as you'd better understand statistics if you want to write actuarial programs for insurance companies. In fact, depending on what kinds of software you design or write, there are a lot of things you might be called to know...and you can't know the list in advance, when you're still in school. Just be prepared to keep learning when you leave school—in fact, that's when the learning really starts.

    No, I am not saying that studying maths is a bad idea or a waste of time. On more than one occasion, I've gotten essential insights into difficult programming problems that involved mathematical and geometrical understanding from mathematicians, so I'm quite prepared to respect their training. I just don't think it's a prerequisite for the job.

    As others have pointed out, the article summary invites confusion by conflating computer science with programming. I dont' see why you need calculus for either, though.

%DCL-MEM-BAD, bad memory VMS-F-PDGERS, pudding between the ears