Slashdot Mirror


Math, Programming, and Language Learning

An anonymous reader writes: There's often debate amongst modern programmers about how much math a professional developer should know, and to what extent programming is math. Learning to program is often viewed as being on a spectrum between learning math and learning spoken/written languages. But in a new article, Jeremy Kun argues that the spectrum should be formulated another way: Human language -> Mathematics -> Programming. "Having studied all three subjects, I'd argue that mathematics falls between language and programming on the hierarchy of rigor. ... [T]he hierarchy of abstraction is the exact reverse, with programming being the most concrete and language being the most abstract. Perhaps this is why people consider mathematics a bridge between human language and programming. Because it allows you to express more formal ideas in a more concrete language, without making you worry about such specific hardware details like whether your integers are capped at 32 bits or 64. Indeed, if you think that the core of programming is expressing abstract ideas in a concrete language, then this makes a lot of sense. This is precisely why learning mathematics is 'better' at helping you learn the kind of abstract thinking you want for programming than language. Because mathematics is closer to programming on the hierarchy. It helps even more that mathematics and programming readily share topics."

14 of 241 comments (clear)

  1. Your Results Will Vary by machineghost · · Score: 4, Insightful

    The problem with all the articles like this is that they're either written by people who did take math or didn't, and in either case both believe their side is right. The article is clearly written by someone who took a lot of math so, surprise, he thinks math is good for programmers. But I took nothing past Calculus (and have never professionally used even Trigonometry), and I'm a successful programmer, so I think math is unecessary.

    Until someone actually does a study on this, it's all gonna come down to "the way I did it was better" ... and that's just noise.

    1. Re:Your Results Will Vary by fredprado · · Score: 5, Interesting

      It highly depends on what you do. If you work mostly with the common database applications, basic math is enough for you and it is unlikely that you will ever need anything above Calculus or even Calculus.

      On the other hand, if you work with RF you will most likely need a lot of math. If you work with high level optimization algorithms you will need Abstract Algebra. If you work with Geolocation you will need a fair amount of high level Geometry, specially Non Euclidean ones.

      So in the end the answer is: Higher Math is not necessary in all fields of programming but it is certainly very necessary in many.

    2. Re:Your Results Will Vary by GiganticLyingMouth · · Score: 3, Informative

      I think part of the problem is that "programming" is itself so diverse. If you were to be a graphics programmer, you would certainly need your linear algebra, geometry, etc. If you worked with scientific computing, you'd need even more math (e.g. differential equations, statistics, etc). If you worked as a DSP programmer, you'd need to know calculus (and then some). In contrast, web development doesn't really require any of these. However, they all involve "programming", and the people writing the software can all be called "programmers", even if one's writing a website (no math) and another is doing a fluid dynamics simulation (lots of math).

    3. Re:Your Results Will Vary by techno-vampire · · Score: 3, Interesting

      Studying computer science requires a fair amount of math to understand why some algorithms are more efficient than others rather than just accepting that they are. And, it can be a great help in working out the storage and IO requirements of a program. How much math you need to be a working programmer depends, as you point out, on what branch of programming you specialize in. Personally, I've always considered programming to be more a branch of logic than one of math.

      --
      Good, inexpensive web hosting
    4. Re: Your Results Will Vary by acroyear · · Score: 5, Interesting

      In the end, I've always concluded the same, every year this topic comes up (it is just about annual here). I don't want you to know calculus because you'll actually use calculus on the job (though I have an O(N) vs O(log(N)) question on my interviews that you'd better be able to answer).

      I want you to know/pass calculus because by the time you've worked that hard at that level of proofs, you've mastered *variable control*. In each level of math, you don't get out of the class having mastered it. You get out of the class having mastered the year that came before it. When you can pass calculus, you have *mastered* functions and analytic geometry (I hire for UI work). Passing those two the year before showed you mastered variable manipulation and proofs in Algebra 2 before it.

      So no, you don't *need* calculus on the job, but you need everything below it, and the best proof that you've *mastered* them (not just taken them, but mastered them) is that you've passed a calculus class.

      --
      "But remember, most lynch mobs aren't this nice." (H.Simpson)
      -- Joe
    5. Re:Your Results Will Vary by Nethemas+the+Great · · Score: 3, Insightful

      I find that most people trying to argue against math generally are doing so by asserting that if a certain math is not put to practice in the software that a person is developing that that math is unnecessary. It also seems to be commonly asserted that persons with a strong mathematical background are just being pretentious.

      I believe that the anti-math crowd is missing the point. For a software developer it isn't the skill of solving calculus problems, but the skills required to solve calculus problems. What I mean by this is that in order to work to a solution for a given mathematical problem you are exercising many other skills. Skills such as logic, abstraction, visualization, etc. are very much employed in software development. You go to the gym not because you have aspirations of mastering a bench press, but because you aspire for a stronger, healthier body. Mathematics are an example of exercise equipment for a software developer.

      --
      Two of my imaginary friends reproduced once ... with negative results.
  2. first up let's get one thing straight. by ewanm89 · · Score: 3, Insightful

    Programming is mathematics, it is the application of decision and discrete mathematics. Not all mathematics is infinitesimal calculus (there are different kinds of calculus), algebra or geometry.

  3. Re:I disagree by jbolden · · Score: 4, Interesting

    As a guy with two masters in math who knows 15 languages... I also disagree. There are some languages that are mathematical (like Haskell) but most programming has more in common with cooking (sequencing the application of resources) than math.

  4. Re:I disagree by Nethemas+the+Great · · Score: 4, Insightful

    Proficiency in mathematics for the most part has little to do with being able to learn a programming language. This much I agree with. However, proficiency in mathematics does provide a strong indicator as to what you will be capable of doing with those languages. You may not be performing Calculus or manipulating matrices in the software that you write but the skills that provide an aptitude for performing such math are very much relatable to software development. Such skills include, abstraction, visualization, and logic to name a few.

    --
    Two of my imaginary friends reproduced once ... with negative results.
  5. The more math the better by EmperorOfCanada · · Score: 3, Interesting

    I went for years keeping my math and my programming separate. Often programming involves little more math than x++. But then I really buckled down and learned a pile of math which I now pile into my programming. Interestingly enough when I try to show my algorithms to other programmers they say, "I forgot all that math 1 day after exams." But these algorithms often are cutting thousands of lines of code away and result in answers that are instant instead of a more iterative approach that could take minutes or much longer.

    The math that I am referring to is all pretty basic year 1 or 2 stuff. Basic Discrete, basic calculus, etc.

  6. depends. VBA is very different from systems arch by raymorris · · Score: 5, Interesting

    A "programmer" can be someone who spends two days putting together a complex Excel macro (poorly), or someone who designs an information systems architecture for a significant enterprise. These are VERY different activities.

    On top of that, I'll say that approximately 85% of people doing programming aren't really competent. Compare how often software crashes vs how often cars fail in such a way that they crash themselves. So you have to specify, are you talking about MOST programming, or competent programming? Most programming isn't done competently.

    Well-designed and larger software projects require a thorough understanding of a large set of rules, both knowing what the rules are, and understanding WHY the rules are as they are, and when to apply which rules in order to move forward. In that sense, it's very much like math. Also like math, one wrong decision can lead you down a path of futility, from whence reversing course is time-consuming.

  7. Re:I disagree by Coryoth · · Score: 3, Insightful

    Math IS sequencing. So is using recipes. That is how math works.

    Math is a language. Just because you can frame things in that language doesn't mean that that language is necessary. Recipes are often in English. English is sequencing (words are a serial stream after all). That doesn't mean English is necessary for programming (there seem to many competent non-english speaking programmers as far as I can tell).

    Disclaimer: I am a professional research mathematician; I do understand math just fine.

  8. Re:Some loser needs to learn the pecking order by Jeeeb · · Score: 3, Insightful

    In the real world the picking order is more like:

    1. Rich parents / Male who is excellent at a popular sport
    2. Prestigious law degree
    3. Prestigious MBA
    4. Good salesman and good at golf
    5. Economics/Law majors/MBAs who got into strategic/management connsulting
    6. (The rest)

  9. Re:depends. VBA is very different from systems arc by TapeCutter · · Score: 3, Interesting

    TFA is really about the human mind. We understand patterns as different forms of language, music is the most basic and universal, it lights up all areas of the brain, then you have spoken language built on top of musical patterns, then along comes symbolism in the form of writing and icons, math is our most recent and most precise form of natural language.

    The take home message is, expose your kids to maths without boring them to death.

    --
    And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.