Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming Education Math

Math, Programming, and Language Learning 241

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

Math, Programming, and Language Learning

Comments Filter:
  • by machineghost ( 622031 ) on Friday July 18, 2014 @05:42PM (#47486403)

    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.

    • by fredprado ( 2569351 ) on Friday July 18, 2014 @05:50PM (#47486439)
      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.
      • by techno-vampire ( 666512 ) on Friday July 18, 2014 @06:14PM (#47486551) Homepage
        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.
        • Formal logic is a branch of mathematics. It's part of a branch that is called decision and discrete mathematics. Programmers specialise in the application of that branch, just as staticians specialise in statistics and probability.

          • Formal logic is a branch of mathematics.

            Yes, I know, but very few people except mathematicians think of it that way. Most people consider it to be an entirely different study so I phrased it that way to emphasize that much of computer programming has nothing to do with what the average person thinks of as math.
            • by acroyear ( 5882 ) <jws-slashdot@javaclientcookbook.net> on Friday July 18, 2014 @06:56PM (#47486761) Homepage Journal

              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.

              • by Coryoth ( 254751 )

                Calculus is perhaps not the best measure however. Depending on where you go in the programming field calculus is likely less useful than some decent depth of knowledge in graph theory, abstract algebra, category theory, or combinatorics and optimization. I imagine a number of people would chime in with statistics, but to do statistics right you need calculus (which is an example of one of the directions where calculus can be useful for programming).

                Of course the reality is that you don't need any of those s

            • Just because one does not vote it as mathematics didn't mean it's not mathematics. Only education can fix this, and this education is currently sorely lacking.

      • Higher Math is not necessary in all fields of programming but it is certainly very necessary in many.

        ... which means that higher maths is really domain specific, and not necessary for programming. Otherwise I could say the accounting or biochemistry were necessary to learn to program, if that's the field I started out in learning to program

    • by Greyfox ( 87712 )
      I took nothing past Calculus either and up until two or three years ago never even used trigonometry in my professional programming. The last few years I've been writing satellite simulations, which has forced me to knock the rust off some of my old math skills. Most programmers can get away with very little math a lot of the time. A lot of very interesting programming involves a fair bit of math. That programming is generally being done by some guy with a Ph.D. in another field, and he's usually doing it i
      • I took nothing past Calculus either and up until two or three years ago never even used trigonometry in my professional programming. The last few years I've been writing satellite simulations, which has forced me to knock the rust off some of my old math skills. Most programmers can get away with very little math a lot of the time. A lot of very interesting programming involves a fair bit of math. That programming is generally being done by some guy with a Ph.D. in another field, and he's usually doing it in Fortran.

        You're touching on what I consider to be the ultimate fallacy of this question. If someone asks the question "how much math does a programmer need to know?", I'd answer with "a programmer of what?"

        My profession happens to be videogame programming. In my own experience, higher-level calculus is largely unused, but geometry, linear algebra, and matrix math are the bedrock of 2D and 3D simulations. Even then, the level of competence required depends largely on your specialty. A graphics programmer requires

    • Hint : you took calculus. Most people can't even get that far. Congratulations. You can math.
      • Well, but the computer science major at my college required six other math classes (including two calculus classes beyond the first that I completed). For many programmers (obviously not all) that math is a complete waste of time.

      • Actually, that's more of an application of math than math itself. People so often confuse the two! Being able to integrate and being able to postulate very general hypotheses relevant to your problem and to prove them are two entirely different things, however.
    • by GiganticLyingMouth ( 1691940 ) on Friday July 18, 2014 @06:02PM (#47486505)
      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).
      • by Coryoth ( 254751 )

        I think part of the problem is that "programming" is itself so diverse.

        The other part of the problem is that math is so diverse. There's calculus and engineering math with all kinds of techniques for solving this or that PDE; there's set theoretic foundations; there's graph theory and design theory and combinatorics and a slew of other discrete math topics; there's topology and metric spaces and various abstractions for continuity; there's linear algebra and all the finer points of matrices and matrix decompositions and tensors and on into Hilbert spaces and other infinite dim

      • by tomxor ( 2379126 )

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

        I don't entirely disagree... but :P i am a web developer, who also happens to like lots of vector math, writing physics engines and in particular: writing SPH fluid dynamics simulations and other n-body simulations.

        I would agree that some of my understanding of slightly above basic math is not necessary in most of the more common web development work in my job, but i do find it helps me be a better programmer in general... so perhaps the point is that math can make you a better programmer. Id also argue tha

    • I guess it depends, I have used math twice n my professional career - once to use trigonometry to show the distance between 2 points (Pythagoras) and once with a complex equation that was reduced to a simpler one.

      Now, if I was a cryptograpic engineer, I think I might use math more often :)

      But, as I tend to be more of a LoB engineer, math is not something used very often at all. If at all. I refer to the aforementioned pythagorean equation for the distance between 2 points using a triangle.... the business

      • The problem is, you've actually used maths every day in your career, you just haven't realised it. When you are programming, you are by definition doing maths - programming is a branch of discrete applied maths.

        Actually knowing the theory of discrete applied maths obviously makes you better at doing discrete applied maths.

        • that's a poor argument. After all, physics is just applied maths, and chemistry is just applied physics, and biology is just applied chemistry.... and just by sitting here typing I'm using maths!

          Maths as a discrete thing is different to computer science even though they do share the same branch of education.

          That said, nowadays, is cutting and pasting code from Google, and pressing . and letting intellisense tell me what to pick next, really maths. Is it really programming! :-)

    • it's all gonna come down to "the way I did it was better"

      You could very well be a skier...

    • My first idea was to say: "I second that" but then I remembered that I'm not a native english speaker and that I indeed did some math (Trigonometry) heavy programming.

      However: my university focused in the computer science education math in the first two years (University of Karlsruhe, german, now called KIT). Hence the most drop outs happened in that period.

      My school math education was very good, geometry and Trigonometry was never a problem, after all it is simple math defined by Euclid and Thales 3 thous

    • by s.petry ( 762400 )

      The reason math helps a whole lot in programming is that it teaches essential critical thinking skills. Some people are good at critical thinking skills without taking math. The _majority_ ,however, require some type of education to help mold their methods of thinking. Many, even with a whole lot of training do poorly with critical thinking skills.

      Claiming that you have never used math in programming simply demonstrates that you are not programming for scientific purposes (writing a GUI for a CAD program

      • The reason math helps a whole lot in programming is that it teaches essential critical thinking skills. Some people are good at critical thinking skills without taking math.

        So you're saying it's not the math that's essential, but the Critical Thinking is. That's a different thing.

        • So you're saying it's not the math that's essential, but the Critical Thinking is. That's a different thing.

          Some people would argue that knowing the former is pretty much the only way to arrive at being proficient in the latter.

    • by Nethemas the Great ( 909900 ) on Friday July 18, 2014 @07:05PM (#47486791)

      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.

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

        As an important sidenote, I want to underline that literally going to gym is also important to a software developer. :) Your mind will greatly benefit from the energized body.

    • by HiThere ( 15173 )

      My feeling is that anything beyond algebra is unnecessary for programmers (in general) EXCEPT logic. I think every programmer should have two or three semesters, or even years, of logic. Programming languages just don't cover quite the same area, and usually skimp badly on logic. (I will agree, however, that theoretically the logic could be taught within the context of programming, except for a tiny bit that should deal with reasoning in unbounded contexts, i.e., infinitesimals, infinities, omega-complet

    • by xdor ( 1218206 )

      Until you hit something that does require higher math.

      Find the optimal coverage schedule for employees next week given their varied availability

      As simple as this sounds, unless you're willing to wait for the computer to churn thru every possibility: you are going to need some higher math know how to program that answer.

    • The problem with all the articles like this is that they're either written by people who did take math or didn't

      right...and that biases them...same for the coders as you say...

      what no one considers is what the Communications people have to say...

      see...Communications Theory (as taught today...i'd know...used to teach it as adjunct in grad school) starts with Claude Shannon and his SMCR model: http://en.wikipedia.org/wiki/S... [wikipedia.org]

      sure, there is tons of 'soft science' but there is something relevant here: SYMBOLS

      i

      • it starts with symbols...then goes to 'logic'...then math/code/language

        here's one way we can know this is true (besides using the SMCR model)...

        it mirrors human development

        humans use symbols before we know what they mean...before we can use **logic** to manipulate symbols in real time to get what we want (aka talking/writing)

        we first mimic the symbols around us like a parrot...we just repeat what we hear

        then we **associate** symbols with things...

        that association allows for us to use logic...logic tells us

  • While the ideas of mathematics are (usually) precise, the language is fuzzy, informal and requires a lot of context. Everyone who ever has compared a fully formal proof and one done in the typical style mathematicians use can immediately see that. On the programming side, there is no room for fuzzyness. Or rather, whenever it is found, it typically is a bug and often a security vulnerability.

    • Parent and article seem spot on; although, I prefer english and programming to math.

    • This is what Dijkstra has been arguing since the the 1960s or 1970s or so. Of course, given that Dijkstra has been dismissed and shunned by both mathematicians and programmers all the time, both mathematicians and programmers are doomed to perpetually rediscover the same thing and then proclaim it as a major discovery of their own. :D
      • by gweihir ( 88907 )

        We got good exposure to Djikstra at university (CS course). His problem is that he was ahead of his time. His other problems that even CS folks struggle to understand what he said (not because it is to terribly difficult, but because many CS folks are so terribly dumb). The think is that the formation of a new field of academic and engineering study and practice takes a long time. CS is not there yet. May take another half century or longer.

  • Where are these stories coming from ? What's next water is wet ?

    You may have a legitimate debate over which is more precise math or particular programming languages but has anyone ever argued a human language is more specific ? I'd love to see people program without understanding the propositional calculus. No strike that I may have actually seen that and it wasn't pretty. Comedy aside, anyone who has ever tried to write a parser understands just how non concrete natural languages are. Something like 90%

  • Knowing the concepts may have helped for some work I have done, but, I have never used any advanced math for paid programming.

    Five years as a J2EE developer: zero use of any advanced math for work projects.

    Numerical methods (using Fortran) was just in school.
    Calculus, linear algebra, and such: just in school.

    Big-O notation, to pick algorithms and STL objects, sure, but probably doesn't count as 'math' for this article.

    Since only a fraction of Computer Science graduates will work at a science shop (JPL, etc)

    • "Numerical methods (using Fortran) was just in school."

      So you routinely write a = b / c * d instead of a = b * d / c because you're ignoring precision issues do you?

    • I suppose set theory, and propositional calculus/boolean algebra don't count as math either ?

  • As long as we're making gross generalizations...

    A big part of organic chemistry in college is "synthesis" problems where you are presented with a molecule and you're supposed to outline the steps (chemical reactions) required to turn it into a different molecule. I find that this closely mirrors programming where we're manipulating data instead of chemicals. We all have access to the same tools and there's more than one pathway that will work, but we're trying to find the most elegant / efficient solution

  • ... and that's it.

    If you're programming litigation, you'll have to pick up some legal knowledge. If it's banking, then finance. If it's science, you'll have to be exposed.

    But ... you don't have to be an expert at anything but programming. The experts do all that stuff. They can spec, but they can't code.

  • It was all the shortcuts, left out "intuitively obvious" steps, and sloppy use of variable names and symbols that drove me up the wall trying to learn advanced math from (imho crappy) math profs.

    Let me tell you about the lecture with no less than three different Epsilons (a rounded one, a less rounded one, and something in between) used in the exposition of the proofs. That and my slight myopia kind of did me in in that class (or would have if I hadn't cribbed notes from my neighbour.)

    Or, when, as a math pr

  • by ewanm89 ( 1052822 ) on Friday July 18, 2014 @06:34PM (#47486653) Homepage

    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.

    • Math is big. It encompasses everything from continuous (calculus) to discrete (logic). It abstracts even from there into levels only mathematicians would understand.

      People who don't know math think it's just calculus or just algebra or just linear algebra or just abstract algebra or some other high level mathematical discipline. They forget that working with integers is math. Set theory is math. Graph theory is math. Boolean logic is math.

      Math is more than all those things combined. it is, at its core, the

    • Agreed. Any program can be broken down into a sequence of mathematical operations. It's generally not the type of mathematics that would be of any interest to a mathematician, but it still falls within the domain.
  • by thrich81 ( 1357561 ) on Friday July 18, 2014 @06:42PM (#47486697)

    TFA tries to make the case (poorly) that Math involves ambiguities and Programming does not.
    The greatest of all mathematicians, Carl Friedrich Gauss, stated, "I mean the word proof not in the sense of the lawyers, who set two half proofs equal to a whole one, but in the sense of a mathematician, where half proof = 0, and it is demanded for proof that every doubt becomes impossible."
    Not much room for ambiguity in that.

    • TFA tries to make the case (poorly) that Math involves ambiguities and Programming does not.

      I've been trying to think of how this could be, and the only thing I can think of is the syntax of math is less formal than the syntax of programming. In programming, each command is clearly defined, whereas in English there's some ambiguity about the meaning of the word 'is.'

      I don't think this has any real practical effect on math.

      • Any sort of ambiguity means there must be a method of resolving the ambiguity. This is true no matter if you're talking about human language, math, or programming. In language and math, the method of resolving ambiguity is context. That is, the person you're communicating the concepts with presumably knows enough about what you're talking about to be able to resolve the ambiguity.

        Note that both math formulas and programs are pieces of communication, nothing more. Programs are a way of communicating intent t

  • Before you can start formulating them — in any language, even in a spoken one — you need to think through the decision-trees and handling of exceptions and errors.

    A "Hello world" program — in any programming language (except, maybe, the assembly) — is vastly simpler than a list of errands you may get from your spouse on a weekend. Heck, a single errand of shopping may be more complex:

    • Buy two pounds of X, if it is fresh, otherwise buy only 1 pound and another pound of Y.
    • Honey, what
    • Programming has no fuzzy, no irony, no humor. The day it has, we'll have AI, and at the same day
      we'll discard all AI research because it'll lead to .... fuzzy, irony, humor.

      • by mi ( 197448 )

        Programming has no fuzzy, no irony, no humor.

        That is only true, when you are programming (today's) machines

        When you are giving instructions to (programming) a human — or anything/anyone else with intelligence (artificial or otherwise) — humor may become available as a construct both for the instructions of the programmer and messages from programmed.

        My argument was and remains: algorithms are the most important part of programming. Before you need to put in writing (or even verbalize it), you

  • by tommeke100 ( 755660 ) on Friday July 18, 2014 @06:50PM (#47486741)
    No you don't need math to write an iPhone App or an interactive website.
    You do need math to understand why looking up some keys in a HashMap is much faster than iterating over a vector.
    You do need math to understand why some encryption algorithms are better than others
    It just gives you the tools to better comprehend what's going on under the hood, so you have more information to make the right choices in how to implement something.
    • Bur how often do you need to understand those things to implement a typical computer program that helps a user get something done? Oftentimes, you simply need to know one is better than another and get on with it. Of course, you'd need that understanding to, for example, work on the TrueCrypt sourcecode. But generally? I don't think so/

  • I'll start thinking about this in a serious way.

  • While I freely admit that most of my programming has been in other areas. In every project I do it seems the day comes when boss says, what we need here is a visual. Where: when I click on it here..., when I drag it their..., when I spin it... What you have to understand (and many here do) is that you screen/window/view is laid out in a coordinate system. So you cannot escape it! You quickly need: geometry, trigonometry, vectors, and if your doing any 3D calculus.

    Good luck!

  • by EmperorOfCanada ( 1332175 ) on Friday July 18, 2014 @07:33PM (#47486917)
    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.
    • Is this game/simulation programming?
      • Financial. Although another project that I am in charge of is a game which uses much of the math I have recently updated, but nowhere near as much. In that case it is linear algebra and the corresponding matrix related math. Although much of that is taken care of by fairly comprehensive libraries; although it is nice to know what is happening when I have the libraries do their (no doubt optimized) math on things like vectors and whatnot.
  • by Snotnose ( 212196 ) on Friday July 18, 2014 @07:39PM (#47486937)
    some 20 years ago (yikes, did the math and it's closer to 30). I wanted to do signal processing and such, but I realized MIT grad students were doing all the fun stuff. I now write embedded software, and the only time I use math is when I either go off on a tangent, or sine off on an apology for doing so.
  • ...on my Commodore 64, since we didn't have any games when it came out.

    Interestingly enough, I sucked at "school math" and flunked math entirely. Imagine the expression on my math teacher when he saw me coding in assembly at the new computer-park back in the 80s, when he barely could understand basic.

    Since, I've made numerous demos in the DemoScene with Amiga, and later on coding robotics AI with MCUs (as a hobby, nonetheless).

    So no, you can absolutely learn to code quite decent software and hardware without deep math skills, but it helps if you want to do real advanced stuff like coding your own Render-Engine (but then again, how many are they?) My advice - learn whatever you need to achieve what you want.
  • IMO programming is almost nothing like natural language.
  • would be better than math if one is looking for a bridge from language to programming. Absent symbolic logic, math -- especially algebra -- is a good introduction to the concept of computer programming because of its logic component (application of the algebraic hierarchy is a simple logic system.)

    For kids, Lewis Carroll's symbolic logic is both fun and useful.

  • Mathematics, chemistry and physics use formal languages. Terms and consequences are concise but rather difficult to deal with. Informal languages such as we speak daily are sloppy but efficient and rather easy to understand by comparison. It is that slop that makes informal languages so useful. Imagine E= MC squared if you have no clue what E, M or C mean at all. It might take decades to ascertain what the equation means..
  • Programming isn't, strictly speaking, math. Not like calculus or algebra is math. It's something else entirely.

    I have a rather annoying learning disability, and have suffered from it since I was in first grade: I have a great difficulty memorizing things. Now, even with that rather annoying problem, I managed to be near the top of the class in both grade school and high school. What happened is I learned early on how to analyze the patterns behind the subjects I was expected to memorize and when test-time c


    • What happened is I learned early on how to analyze the patterns behind the subjects I was expected to memorize and when test-time came was able to reconstruct most of the required information based on those patterns.

      Sounds from that like you're a natural mathematician.

      The more maths you learn, the more intricate the patterns become and apparently utterly unrelated areas become connected as an entertaining natural consequence of their existence.

      Calculus is (for me) as obtuse and illogical as it gets. "If a w

  • Math is mandatory for engineers. In the early years people getting a degree in any way related to computers, hardware, software, programming, playing games while smoking weeds... were all engineers. Now that there is mass separation in the field the importance of math on any particular field is not as obvious. Us that design network gear and program network interfaces need math. Lots and Lots of it.

  • Well, of course maths, programming, and natural languages are different, but all of them involve a symbolic language that models something and expresses that model. Kun seems to be focusing just on the differing degrees of precision these symbolic languages employ.

    People tend to think of natural language as only a medium of communication, but it is also the way the human mind models whatever it perceives or imagines, and despite the fact we do that mostly instinctively, it is by far the hardest thing about

  • Computer programming can be seen as more rigorous than mathematics because if the written program is not correct, the executable will not run; whereas a mathematical proof may contain elements that are not completely described but part of mathematical lore. However we do not possess a compiler for mathematics. Conversely language may be more abstract than mathematics because language, in addition to mathematics, may express information that is not mathematics, e.g. poetry, imagerie, etc. However mathematica

There are two ways to write error-free programs; only the third one works.

Working...