Slashdot Mirror


Math Skills For Programmers — Necessary Or Not?

An anonymous reader writes "Currently, the nature of most programming work is such that you don't really need math skills to get by or even to do well; after all, linear algebra is no help when building database-driven websites. However, Skorks contends that if you want to do truly interesting work in the software development field, math skills are essential, and furthermore will become increasingly important as we are forced to work with ever larger data sets (making math-intensive algorithm analysis skills a priority)."

33 of 609 comments (clear)

  1. Given two programmers by Anonymous Coward · · Score: 5, Insightful

    The one with more math is the one you want.

    1. Re:Given two programmers by Fluffeh · · Score: 5, Insightful

      I did the highest level of maths in my Australian higher school certificate, but didn't really do much in the way of physics at school or Uni. Even with what I am programming in my spare time (a space based build/conquer/explore type game) I am finding that I have to resort to buying coffee for friends that DID do physics and higher levels of maths at Uni to get some of the formulas I need to work out the things here. Also, I work with numbers ALL day pretty much at work (Senior Performance Analyst for a multinational) - so I ain't exactly derpa derpa derpa when it comes to numbers.

      Can I google and find the formulas? Sure, yeah, but do I have the level of understanding with all of Kelper's Laws and bits to change them to what I want for my game? Nope.

      Anyone who says that maths isn't needed for a programmer is utterly kidding themselves - or working at the low end of the food chain.

      --
      Moved to http://soylentnews.org/. You are invited to join us too!
    2. Re:Given two programmers by Thanshin · · Score: 4, Funny

      do I have the level of understanding with all of Kelper's Laws and bits to change them to what I want for my game? Nope.

      You needed to change that bit for your game?

    3. Re:Given two programmers by ghostdoc · · Score: 5, Insightful

      Actually the one with better people skills is the one you want.

      Maths is great for some coding problems, I'm not saying it isn't, but you rarely bump into a commercial coding problem that requires any degree of serious maths. I've been commercial coding for nearly 20 years, and I've hit a maths problem 3 times (and the last two were solved by a half-day of Googling).

      But you will bump into a people problem in commercial coding. Every. Single. Day. Knowing how to cope with those is massively more important (and Google can't help you with them).

      But the article wasn't really talking about this. The article was talking about becoming a Great Programmer.
      To become a Great Programmer, don't spend your days coding CRUD websites. You're never going to build/discover something amazing while doing commercial coding.

      --
      Business/App ideas are like arseholes: everyone's got one, they're mostly shit, but very rarely they contain a diamond
    4. Re:Given two programmers by lgw · · Score: 4, Funny

      There's more to commercial coding than CRUD work, young Skywalker. This kernel API documentation was your father's, but now I pass it on to you.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    5. Re:Given two programmers by Anonymous Coward · · Score: 4, Funny

      Nooooooo!

    6. Re:Given two programmers by smallfries · · Score: 5, Informative

      I'd go further than that - most chunks of maths are things that are absolutely essential for some area of programming. You may not need to know everything all of the time, but for any particular task you will need to know some of this (non-exhaustive) list :

      Statistics - useful just about everywhere, but in particular if you have to do any kind of data analysis in your work. Knowing particular distributions and how to compute the properties of them is essential.

      Probability - if you use any kind of randomness in your work this is essential and in quite a few places where you don't deliberately use randomness but you are using non-determinism to model lack of knowledge i.e packing and filling of sparse data-structures.

      Algebra - the daddy. Knowing a simple formal language that lets you rearrange expressions is an essential first step towards understanding a programming language. The more you learn the more it will help. If you head down to the Category Theory end of the pool then Monads and Arrows come in useful if you swim away from imperative languages and find something more interesting.

      Logic - the other foundation. Learning to apply logic is relevant in any area of programming as it is an elementary part of programming. A deeper understanding of propositional and predicate logics is essential to do any work in compilers and will aid your understanding of control and data-flow in any language that you work in.

      Linear Algebra - anything that touches the "real world" requires a bit of LA, as the parent mentioned physics, 3D graphics and I would add Vision to that list.

      Set Theory - these are your basic building blocks, use them well. Whether it is building the right data-structure or using a database this is the foundation that you need to understand.

      Graph Theory - some people never need anything more complex than a relational database, but some people only care about the relations. If you want to model any large network (the internet, or social interactions, economics), or perhaps programs within a compiler, or just the relationships between discrete objects then you will either learn some Graph Theory first, or rediscover it yourself the hard way.

      Combinatorics - counting is fun! Counting (and enumerating in the programmer's sense) complex objects is basic problem that crops up in almost every area. For people without some grounding in combinatorics it is the kind of question that will get kicked up to the "office guru".

      Now, if only maths graduates could program their way out of a wet cardboard box, then we could truly start designing giant flame breathing killer robots.

      --
      Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
    7. Re:Given two programmers by MrNaz · · Score: 5, Insightful

      Totally disagree. It has been found that the universe reflects math, and much discovery in the field of physics is driven by a previous understanding of mathematical principles.

      Furthermore, there are extremely numerous cases where math skills come in handy for totally unexpected applications. For example, I learned about statistical concepts (standard deviation, interquartile ranges, median, mode, mean, etc) long before I had any application that actually meant anything in my life. In the 11 years since high school, I've lost count of the number of times that that has been useful. From analyzing web statistics to finding patterns in sales in my shop, I've used these skills to great effect. This is even more the case with trigonometry.

      Math does not have to be limited by immediate application of the principles being taught, and doing so results in an unnecessarily constrained syllabus that denies students skills that they may find useful later in life. Mathematics' usefulness just appears in front of you as you go through life encountering problems, assuming you have the skills.

      --
      I hate printers.
    8. Re:Given two programmers by HungryHobo · · Score: 5, Insightful

      Programming as a skill in itself is totally separate from most of those .

      But to be a good programmer you don't just have to be able to write good code- you have to be able to write good code which does useful things and unless you have a decent understanding of a few of the above you're going to be missing a number of very useful and powerful tools.

    9. Re:Given two programmers by jawtheshark · · Score: 5, Insightful

      But IMO math should be physics driven.

      No, absolutely not... Physics uses Math: Physics without Math is unthinkable. Math without Physics is absolutely possible. There was pretty much maths before physics. The old Greeks were more Mathematicians than Physicists.

      There is little need for calculatign stuff you don't know what it's your calculating.

      I present to you Complex Numbers. For all intents and purposes we don't know what we're calculating *but* they are used in all kinds of engineering to find actual useful results. (Scroll down to the Applications part). Understand that Complex Numbers were first, then came the applications.

      I am by no means a Mathematician and I wasn't a big fan of it in school, but loved physics and excelled in it. In a way, I was like you, but I understand that Maths is used in Physics but not limited to Physics.

      Finally: Obligatory XKCD Link. (Of course, if you feel bitter about this comment, read the mouse-over text)

      --
      Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    10. Re:Given two programmers by Opportunist · · Score: 5, Informative

      I dare to disagree. Programming is basically putting algorithms into a form a computer can understand. Nothing more. And where do these algos come from?

      It baffles me to no end every time I see "programmers" apply who consider math as some sort of secondary skill. It's not. It is the primary skill for a good programmer. I do not need someone who can "translate" my algorithm into code. I need someone who can take my problem and develop an algo for it. Coding it is the most trivial part of the solution.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    11. Re:Given two programmers by outsider007 · · Score: 5, Funny

      My people skills would give your math skills a wedgie.

      --
      If you mod me down the terrorists will have won
    12. Re:Given two programmers by smpoole7 · · Score: 4, Interesting

      I dare to disagree. Programming is basically putting algorithms into a form a computer can understand. Nothing more. And where do these algos come from?

      It baffles me to no end every time I see "programmers" apply who consider math as some sort of secondary skill. It's not. It is the primary skill for a good programmer.

      .

      Absolutely. And an old dog like me can even provide a classic example: older OS's like DOS and CPM had to cram a lot of functionality into a relatively small amount of memory. They also had to perform decently on small, slow (by today's standards) processors. The approach that they used was the vector table.

      Simply put, the functions were numbered in order: get OS version was typically the first (function 0), and successive numbers were for all of the other important functions: open file, write file, get system time, and so on.

      Now: can you imagine how inefficient that would be if the original programmer had used a "switch" statement (or the assembly equivalent, with a bunch of "compare and jumps")? Instead, the function number was left shifted (equivalent to multiplying by a factor of two), then used to find an index in a vector table that contained the addresses of all the functions. Neat, compact and lightning-fast.

      This technique is still used today in small embedded processors that suffer from similar low speed and limited memory problems. I used it myself on a small controller in a contract job back in the 1990's. It allowed me to cram everything (read keyboard, activate relays, check temperatures, and more ... even including a quick and dirty "config" option ... in a PIC micro with 2048 bytes of memory. :)

      I have never met a really good, really world-changing programmer who wasn't also good at math. Not necessarily with high-end math, but just good at the fundamentals of algebra, and with the ability to "think" in numerical calculations and offsets.

      --
      Cogito, igitur comedam pizza.
    13. Re:Given two programmers by SWPadnos · · Score: 4, Funny

      Now that's funny.

      I had a professor who said it like this:

      Math is the only pure science
      Physics is chunky math
      Chemistry is wet physics
      Biology is gooey chemistry

      (or something like that)

      --
      - The Sigless Wonder
  2. Absolutely by deisama · · Score: 5, Insightful

    Math KNOWLEDGE may be debatable, but Math skills are essential.
    If you don't have the ability to break up and solve mathmatical formulas, how do you expect to be able to solve complex programming tasks?

    Plus linear algrebra is awesome. And everytime I do anything even remotely 2d or 3d related, I always wish I had paid more attention in Geometry.

    But more than anything, its good to know that there's an equation for that. Even if you don't remember what it is, or how it works, having the simple knowledge that it exists to look up is more than worth the time of taking the class.

    1. Re:Absolutely by Thanshin · · Score: 4, Insightful

      There can be two types of people. The math nerd (high math skills), and the programming geek. A combination of these would be great, but, who do you think would make it in the LONG RUN?

      The first who marries the CEO's daughter.

    2. Re:Absolutely by Antony-Kyre · · Score: 5, Funny

      That would be the math nerd... the one who knows how to multiply.

  3. Ah there it goes again by TheRagingTowel · · Score: 5, Insightful

    Another person who is ill defining mathematical thinking. I consider mathematical thinking not only Linear Algebra, Infi et al, but everything that requires exact abstract thinking and has the properties of consistency and a formal and defined "language" to represent ideas.

    For that matter, I think that mathematical thinking should be defined more broadly, such as conceiving design ideas and representing them with, say, UML or DFDs as mathematical thinking as well.

    So yes, mathematical approach is a must in programming.

    Just my 0.02c of course.

    --
    4Z5TX
    1. Re:Ah there it goes again by TheVelvetFlamebait · · Score: 4, Funny

      Just my 0.02c of course.

      In a world where people contribute an ostentatious $0.02 to a discussion, you are contributing 0.02c. Your humility amazes me sir!

      That, or you're just incredibly stingy. ;-)

      --
      You know, there is a difference between trolling and pointing out the flaws in your reasoning. Just saying.
  4. Re:Not necessary by Joce640k · · Score: 4, Insightful

    OTOH if you can't understand stuff like big-O notation you'll never be a good programmer.

    --
    No sig today...
  5. Math skills are becoming more important by TheKingAdrock · · Score: 5, Informative

    ...but it's not the kind of math you might be thinking about, like calculus, etc. Rather statistics, discrete math, combinatorics, etc. are becoming essential skills if you want to be better than average.

  6. Re:more than just 2+2 by moteyalpha · · Score: 4, Informative

    Absolutely. I do blender and if I didn't understand vector rotation and normals it would be virtually impossible to any good work. You can get the computer to do the heavy lifting, but you have to know what you are asking for. The advantage that exists now is that if anybody is weak on math skills, MIT and others have plenty of open course ware to cover the bases all the way to multi variable calculus.

  7. Re:Not necessary by AuMatar · · Score: 4, Insightful

    You need to understand it, but how often do you actually analyze non-trivial algorithms (one that require more than counting the number of loops and multiplying by known algorithm times)? In a 10 year career I don't think I've ever done more than that. Not saying more math hurts, and its interesting in and of itself. Unless you're doing 3D graphics (which require trig and linear algebra), you rarely use more than basic algebra and some discrete math concepts. I honestly say I've never used calculus or differential equations professionally.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  8. Yes and no by poor_boi · · Score: 5, Insightful

    Asking if math-skills are necessary for a programmer is kind of like asking if people-skills are necessary in the field of law. Some lawyers find success by performing in the courtroom and for the camera, while others find success in their skills with research, interpretation and analysis.

    "Programming" is a massive category. Some programmers need incredible math skills to do their jobs. Some programmers convert thousands to hundreds with broken substring operations, then keep their jobs, and make good money doing it. So there's a spectrum.

    But if I had to hazard a guess, I'd guess that the majority of programming jobs out there don't require very much mathematical heavy lifting. And often times if you do run into something that could be tricky, it's already been solved by someone else, complete with copy and paste source code.

    Yet many programming jobs do require serious math skills, and probably (hopefully) always will.

    TBH I don't know if some of the best software engineers I've met are any good at math. They're good at interpreting API documentation, good at structuring code to meet the strengths of the language they're using. Good at project planning, time estimation, and risk analysis. Good at understanding how computer and network systems work and -- often more importantly -- how they fail. They understand how users interact with software, and what users expect and want.

    The truth is, software development has become as broad as life & human interest itself, and generalizations about the practice are becoming more and more meaningless.

  9. Maybe it's cart horse... by Joce640k · · Score: 4, Interesting

    Looking at whether math is necessary to be a good programmer could be like putting the cart before the horse. I think it's more likely that good programmers are usually good at math because that's they way their brain works.

    --
    No sig today...
  10. Re:Maybe it's cart horse... by lgw · · Score: 5, Insightful

    Heck, perhaps my favorite college course was the one where we proved the equivalence of various math and programming problems. The more ways you learn to think about problems, the less details like the "language of choice" matters, and the more you can think in terms of "what's the right tool for this job".

    Plus, as Feynman noted, if you merely have a different toolbox than those around you, people wil think you're a genius, as you can often see immediate solutions to problems they've been struggling with for a long time (and the fact that the converse is true only comes up if you let it). Having a large toolbox has worked quite well in my career.

    --
    Socialism: a lie told by totalitarians and believed by fools.
  11. Re:Not necessary by BadAnalogyGuy · · Score: 4, Insightful

    The documentation says what the libraries do.

    I assure you, reading skills are critical to programming. To just about any job, actually.

  12. Re:depends, becoming more important I think by Ihlosi · · Score: 5, Insightful

    This was of course just an example but it's true for a lot of stuff, back then you had to spend a lot more time optimizing your code as well, these days premature optimization is generally considered a bad thing (since in most cases it ends up being a waste of $500 worth of programmer time to squeeze out a performance gain that $50 in hardware would've have gotten you.

    If you're planning to sell a million units containing both hardware and software, then "wasting" $500 of programmer time to save even $0.01 in hardware per unit is a really sweet deal.

  13. math is no help? by l3v1 · · Score: 4, Insightful

    linear algebra is no help when building database driven websites

    Oh for [whatever]'s sake, who on this earth started spreading the "wisdom" that all apps are database-driven web applications that do nothing more than displaying user-input two-line texts with images and videos?

    I could list dozens of algorithms - even from my day-to-day use - that nobody on this earth would be able to correctly and efficiently implement without proper math skills. And even the term math is too broad, natural language-related stuff, image/video/vision content processing stuff, simulation stuff, overall machine learning stuff plus ai-related fields, control systems - and I could just go on forever - don't come without their associated - sometimes fairly deep - math topics.

    The social web will come and go, but apps and algorithms that do something even remotely useful, won't ever be accomplished by math-knowledge-lacking code monkeys.

    --
    I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
  14. Re:yes, you need math by ascari · · Score: 5, Insightful

    Pizza analogy: You can't work in a pizzeria without profound knowledge of chemistry

    Car analogy: Automotive engineers are the best drivers, the rest are tinkerers

    General: Tool makers vs. tool users

    Just because most (all?) programming is based on mathematics it doesn't necessary follow that math is essential or even particularly important to the practice of programing. It could be argued that problem domain knowledge plays a similar role. For example, one could equally plausibly contend that without a profound knowledge of banking you shouldn't write banking software. In my experience hiring managers prefer domain knowledge over generalist skills such as math. Personality is another biggie.

    I suspect that the tone of this thread is reflecting the prevalent commodization of programming. We wish that smarts, maths skills etc. are important factors, so we can feel good about ourselves, feel smart, important whatever. In reality very few of us will ever again have jobs where math skills are truly important. Dumbing down? Maybe. Some might see it as a natural consequence of the fall of the "priesthood" that ruled computing decades ago.

  15. Re:lamport on math and distributed systems by epine · · Score: 4, Insightful

    Leslie Lamport's contributions should be more widely appreciated. He has the knack for reasoning very hard about apparently simple problems that aren't as simple as they first appear. This is a distinct mathematical talent from being able to solve tricky integrals. It's surprisingly hard to reason about computational processes in a completely convincing way. The effort does wonders for the correctness of my embedded code. Note that with the modular behaviour of integers, the normal rules of algebra don't always apply (this shows up most often dealing with pygmy integers).

    Long ago when I was a beginning C programmer I managed to implement a simple binary tree in a wonky way. My comparison operator was deterministic, but didn't form a full order. The tree seemed to work fine. I could add elements and test for membership, it was all golden. Then I tried deleting an element. This worked. But I noticed something funny about the tree afterwards. Since my comparison operator was not a full order, the tree rebalance operation following a deletion could orphan some elements so that they wouldn't be found.

    I showed this to a coworker who told me "What are you worried about? It mostly works doesn't it? Your tree insert and membership test passes doesn't it? We need to move onto another task." But I was stubborn and a voice inside me went "this can't be right". Element inserts and searches in that system were common (like #define in C) but deletions were fairly rare (like #undefine in C). That broken code could have been out in the field causing nightmares for a long time before we tracked the problem down. Half an hour of consternation later, I had figured out how I butchered the order operation in violation of the full order requirement. I had cases where A B && B C && C A. This is not good for a binary tree with deletion. The nasty part is that it limps along further than you expect.

    In that same job I had an improperly initialized pointer that scanned through a memory data structure comparing on a string field on some odd field size such as 23 bytes. (Sue me for my youthful indiscretion if you've ever had to label diskettes by compiler phase). Strangely, the pointer scanned several hundred k of memory not part of the table, then properly aligned with the table it was supposed to find, and returned the correct field. It seemed to work under testing, but I noticed the performance was a bit odd in some cases. This lead me to investigate and I found the unitialized pointer. Once again, if this code had been released, it was a ticking time bomb the first time some random values in low memory simulated a match with the search key.

    I learned a lot in that job about defensive programming. A couple of years later I came across one of Dijkstra's books and the spark jumped from his finger to mine. Bugs have been a rare event in my code ever since. Dijkstra taught me to think properly about all possible orders of statement execution where the program remains correct. The order you first write isn't necessarily the only one that works. The mental discipline is a lot like classifying all the components in your BBQ kit into formal symmetry groups before you begin assembly. It pisses me off immensely when I miss some obscure drill hole and conclude that two panels are entirely identical, only to discover much later they weren't (usually after I've pounded in those flimsy plastic wheels that resemble a hip joint with rickets).

    Try next time *before* assembling the BBQ to formally write down the symmetry group for every little flim flam and see if you can still F up the first assembly. I bet you can't.

    What it comes down to is that math is an attitude as much as a skill. I tell my GF from time to time that math is fundamentally the attitude that 100% of what you don't understand is smaller than a grain of rice. How many programs have I screwed up because of a big mathematical mistake? Can't think of any. Going way back, how many times have I screwed up

  16. What part of Maths ? by Nicolay77 · · Score: 5, Interesting

    Mathematics is a huge field with lots and lots of small ramifications.

    You may want someone who understand statistics for your SEO stuff.

    You may need someone who knows calculus for a physics simulation.

    You need someone who knows a lot of linear algebra if you want to write a search engine.

    You probably need someone who knows about concrete mathematics for almost all the rest.

    For everyone who thinks that they do not use maths when programming: what do you think regular expressions are?

    --
    We are Turing O-Machines. The Oracle is out there.
  17. YOU ARE EXACTLY CORRECT, SIR by maillemaker · · Score: 4, Interesting

    >My personal largest problem, though, has to do with literacy. Though I'm quite skilled with language, excessive comma usage
    >notwithstanding, I find that when trying to read about advanced math or physics principles on Wikipedia for example, I'll see
    >a theorem written using symbols and functions that I know were covered in the math classes I had in high school but I can't
    >look at those same symbols and functions and turn them into words that accurately explain or describe the principle I'm reading.
    >Perhaps I'm alone in that situation, but attempting to read advanced theorems and math does give me insight into what text must
    >look like to illiterate people who still know their ABC's.

    I share your exact sentiment.

    I have been a definite non-traditional student. I started school in 1988 at Georgia Tech, and failed out after 2 years. Some 17 years later, I finished my BS in Computer Science.

    I have taken and retaken math classes many times. When I was at Georgia Tech I got a C in Calc I, and then in Calc II I got W, F, D, F, and finally passed with a B. Then I moved to another state and had to take Calc II yet again. A few years ago I started working on my Mechanical Engineering degree, which requires Calculus III, so I took Calc I and II again to brush up. I got a B in Calc I and a B in Calc II and got a D taking Calc III. I am currently re-taking Calc III.

    My problem is, I believe, that I have strung out my mathematical education over so long a period of time that I am not FLUENT IN THE LANGUAGE OF MATHEMATICS. It is, exactly as you state, a LITERACY PROBLEM. I firmly believe, as you seem to, that MATHEMATICS IS A LANGUAGE. Moreover, I believe, as you seem to also, that people who are fluent in mathematics actually "SEE" mathematical equations.

    For example. I believe many people when they look at x^2 + y^2 = r^2 instantly recognize the equation of a circle. Now I have finally gained that understanding, BY ROTE, of that fact also. But I believe that people who are mathematically literate see more than just the pattern recognition that that equation means circle. I think they see equations and actually see WHAT IS GOING ON. I never do. I have to sit down and plug in values of X and Y and see what comes out. It's very tedious.

    I think your last sentence was exactly dead-on. I liken the problem to handing an encyclopedia to a 5-year-old and asking them to read a passage. They will be focusing so hard on each word that they will not know what they have read at the end of a sentence. That is exactly how I feel trying to do Calculus. I am focusing so hard on the basic mathematics that I find it very difficult to put it all together to see the big picture.

    It is very much a literacy problem, and I find it confounding. The only thing for it, I'm afraid, is to do more and more and more maths until one gains the familiarity one has just as one does with reading. The problem is time. I just don't have the time, with a full-time job and a family, to do it.

    I haven't been able to help but think, over the years of taking higher-level math classes, that there must be a better way to learn this stuff. The science of Calculus is some 400 years old, some parts much older. Yet the way it is taught has not changed hardly at all. Now maybe there is no better way to learn it than doing it over and over until knowledge turns to understanding, but what keeps coming to me is that there must be a better way to VISUALIZE the abstract into something more concrete.

    Example. The other day in Calc III we were talking about minimums and maximums, and how they might occur on the surface or along the surfaces boundary. So I said out loud, "So, the surface can either be a volcano or a potato chip but either way there is a high or low spot somewhere on it." And half the class said aloud, "Aaaaaahhh!" - they got it because they were able to VISUALIZE the abstract concept as something concrete.

    There has got to be a better way to con

    --
    A work that expires before its copyright never enters the public domain and thus enjoys eternal copyright protection.