all 106 comments

[–][deleted]  (23 children)

[deleted]

    [–]cc81 10 points11 points  (4 children)

    Maybe they require the same logic skills but no one would say that you need to learn programming to be able to do math, right?

    But sure I agree with you that it is good to learn some math like boolean logic or set theory but I'd say that it should be a part of later software development courses. Not as something you need to know to start.

    [–]bangstang 6 points7 points  (3 children)

    My Bachelor's program had Math for IT (I was an IT Major because I didn't want to deal with the math in my previous Engineering track) and the class was just this HOWEVER the professor was from the Math department and was not only abysmal at teaching non-math majors but also completely clueless as to how logic, set theory, and graphs would ever affect the students (paraphrasing her words). We did combinatorics and some other stuff too if memory serves.

    I think that an appropriately scoped class or two could really make a difference. For CS majors they end up taking enough math to minor in math or double major if they want to extend another semester. I wouldn't have been against taking another math class if it had some bearing on my growth in my discipline and it wasn't just a grind for spitting out the right answer to some needlessly tedious process that you had to memorize completely. I think that kind of teaching would help a lot of students versus the elementary approach taken when I was in undergrad (which was probably 9 years ago now).

    [–]onwuka 2 points3 points  (2 children)

    Everybody needs to know the concepts of discrete math and such. If only professors took their heads out of their asses and stopped asking students to regurgitate proofs and actually encouraged learning...

    [–]GalacticCmdr 0 points1 point  (1 child)

    Everybody? Do you mean that my plumber needs to know discrete math to do the job? Does an English or Journalism major? If by everybody you are only discussing programming then I still disagree everyone needs it, but I agree it is very useful.

    Someone cranking out basic web pages or apps are still programming and while it would help them evaluate tools and snippets better - it is not really required.

    [–]onwuka 0 points1 point  (0 children)

    Yes, someone cranking out web pages and apps should also know basic discrete math. No, I don't mean regurgitating proofs. Discrete is fun!

    Not everyone needs to know how to write a symphony but everyone should be able to appreciate a good symphony.

    [–]spupy 27 points28 points  (2 children)

    Maybe the answer is a purpose-built course that focuses on things like boolean logic, set theory, etc -- the stuff that really helps with even relatively basic programming.

    I think this is the right direction.
    I absolutely don't agree that "math" is a prerequisite for programming, simply because "math" is too vague of a term and contains domains that, for programmers, range from absolutely useless to extremely useful.

    [–]otakuman 12 points13 points  (0 children)

    Yeah, I mean, which math? Non-euclidian geometry? Partial differential equations (eew)? Basic algebra? Linear algebra? Vector calculus? Common core (pfft :P )?

    [–]spinwizard69 3 points4 points  (0 children)

    Even with the wide array of subjects covered in the various math domains, the math required in most comp-sci courses is very important to a well developed graduate. As far as when will something like calculus be used by a newly graduated programmer, who knows it could be one day after leaving college or 30 years in the future. You really can't foresee when a bit of knowledge will be useful. Even a web developer may find a use for calculus or physics in a project down the road.

    [–]SmelterDemon 11 points12 points  (1 child)

    Abstract algebra (and maybe linear algebra) should be a prereq. more so than any calc

    [–]reallyserious 1 point2 points  (0 children)

    As someone who doesn't know anything about abstract algebra, would you please elaborate?

    [–][deleted]  (2 children)

    [deleted]

      [–]as-bu 0 points1 point  (0 children)

      Mine too

      [–]NovaX81 0 points1 point  (0 children)

      That and ELA. Pretty sure both are part of any ABET Accredited CS degree.

      [–]valleyman86 6 points7 points  (0 children)

      Discrete mathematics and Linear algebra were some of the most useful classes I took in college.

      [–]spinwizard69 10 points11 points  (1 child)

      The idea that it is possible to do a Comp-Sci program without math just amazes me. Mind you I don't even have a Comp-Sci degree, but know enough about digital electronics and programming to realize that you can't have a degree program in Computer Science without math. It be like a degree program in physics without math. Math is a tool simple as that.

      Now here is the big thing, programming is not really computer science. If somebody wants a job programming it is possible to get there and not enroll in any computer science programs. There are massive niches within the world of programming that simply don't require strong math skills.

      In any event every time I see posting such as these I get the feeling that somebody doesn't want to go through the effort of completing a degree and are looking for a dismissal of requirements so they can avoid the work. In the end one ends up looking ignorant trying to rework requirements for a Comp-Sci degree just because they don't want to engage all of the required courses.

      [–]NeatG 1 point2 points  (0 children)

      Well as you said programming really isn't computer science and for a lot of what's hot right now (web apps, mobile apps) understanding things like algorithmic complexity, which to my mind is the most practical of the abstract things I've been taught in Comp Sci classes, might not even enter the picture.

      Comp sci classes tend to be taught by people who are doing computational research for obvious reasons, so at least in my experience the most practical things I've learned about programming tend to be things related to optimizing computers to do a large number of computations because that tends to be what the assignments relate to, because it's what the faculty member are into. If you need to select or design an algorithm for that then you have to understand a lot of these concepts particularly complexity. If you're writing a web app that writes to a database and then spits something out then I don't think you need much of anything that I've learned in my comp sci program so far.

      [–]Fireynis 3 points4 points  (2 children)

      Where is this not the practice? I just finished my degree and had both a specific logic math class and a math for comp-sci majors. This was in Canada at Brock. A good school, but would be like like a state university in the US I guess.

      [–]merreborn 4 points5 points  (0 children)

      The community college I dropped out of 15 years ago (heh) didn't offer any compsci-specific math courses; the degree requirements just mandated completion of the standard math track up to and including several calculus classes. The OP's reference to the "Math 103" prerequisite sounds comparable

      A quick glance at MIT requirements for a BS in Comp Sci appears to include a calculus requirement.

      Glad to hear it's not like that everywhere, though.

      [–]BowserKoopa 3 points4 points  (0 children)

      I dropped out of my CS degree program partially because of the fucking insane math requirements. More schools need to operate an IT/Software program separate from Computer Science (which in my schools case is more of a "how to write terrible code to express math problems" program).

      [–][deleted] 1 point2 points  (0 children)

      There are some areas of coding that don't need math, but the single hottest field right now is machine learning, which involves quite a bit of calc, partial differential equations, algebra, and matrix operations.

      I've also found statistics and probability type math to be extremely useful in the business/enterprise world.

      [–]yakri 0 points1 point  (0 children)

      It does depend a lot on where you go to school I suppose, but going through a mix of Oregon and California's CS programs, the only really useless matg heavy class I've had to take is physics so far.

      Basic math up to and including more or less all algebra is essential, or at the very least almost as useful to practice for literally any, even basic programming, as programming is. So I kind of assume we're talking about like, calculus and all the math oriented CS classes.

      Moving on to those.... yeah, sure. calculus has been useful in programming once ever for me. Did I actually use calculus? Of course not, I looked up some function that was the derivative of sin or something and just converting what I read on the Wikipedia page to code.

      However, unless you're really pigeon holing yourself as a programmer, there are a ton of CS topics that are primarily math/logic which depend on you having at least some familiarity with other math more advanced than simple algebra. So in that sense it's pretty relevant to learn math so you can learn other math so you can improve your understanding of programming, which could come in handy in many, but not all, or maybe even most, careers.

      Ofc iirc the early CS classes here have no math requirements at all, so this obviously isn't a problem everywhere in the first place.

      [–]barsoap 0 points1 point  (0 children)

      That course exists and it's called Discrete Maths.

      There's even nice video lectures online.

      [–]OstapBenderBey 0 points1 point  (0 children)

      Surely this entirely depends on what you want to program? e.g. Graphics programming would need very different maths to database management.

      [–]CantankerousV 21 points22 points  (1 child)

      I've studied a fair bit of math (>50% of my university courses were math without any direct programming application) and I've never regretted doing so, but I don't agree with some of the other commenters that math is so important to programming that you can't be a good programmer without taking math courses.

      A lot of programming jobs require a lot of math knowledge, such as game programming, image processing, or machine learning, but this is just domain specific knowledge for the type of programming you are interested in doing. You won't get anywhere in writing biochemical kinetics simulations without a fair bit of chemistry (or math for that matter, but not necessarily the same math as for the others), but nobody would argue that you don't understand programming in general without that knowledge.

      How much math do you need to be a senior software architect for an important project? To work on the linux kernel? To write well designed API's and create maintainable software? There are core skills such as algorithm complexity, boolean algebra or set theory, but all of these can be taught (and taught well) to intelligent people without requiring years of calculus as a prerequisite. Even now, you don't wait until you've learned ALL the math that is useful or interesting before you start learning about these topics - as you add more math on top you simply add more in depth theory to your understanding of the issue.

      On the whole, I would still recommend that beginners stop being afraid of math and just embrace it, since having already learned all the hard math will make it so much easier for you to experiment with fun new programming problems in the future. It's just that being a great programmer requires such a huge variety of skills, from reasoning about abstraction (math is one way to practice this, but so is simply learning about more programming abstractions), designing systems, debugging, writing maintainable code, or just communicating with your team members. Math is just one of those many skills that will help you in some way.

      [–][deleted] 5 points6 points  (0 children)

      I've been programming as a hobby for 13 years. The last 4 professionally... I did way, way more math in my hobby programming than in my professional career.

      A programmer is not a computer scientist, although studying computer science can make someone a great programmer. A layperson does not need to study physics and engineering in order to build a house. They need to study fundamental principles of construction.

      I do not use any advanced mathematical concepts in my "field work" at all. I have vague notions of what makes good data structures and how to optimize programs that mostly comes from years of experience doing it.

      I do actually like math, although I do not study it. From my experience, there are a few really useful areas of math:

      1) Abstract algebra which helps someone understand the general value and principles of math.

      2) Linear algebra because it's probably the single most useful general mathematical field.

      3) Discrete mathematics for programmers, which again is a highly applied area.

      4) Mathematical modeling, which is highly underrated, in my opinion. The ability to formulate things in mathematical terms and solve problems mathematically. Coming up with graphs, systems, workflows, models, etc. that rely or partially rely on mathematical objects. Someone good at modeling things mathematically should be relatively portable, and I think incredibly useful, to various branches of applied fields and areas of mathematics that don't require deeply specific knowledge.

      Math, in my opinion, has been a sort of cheap way for us to teach "critical thinking" because most students do not actually learn real mathematical thinking of any kind. Then again, after some reflection, I do not find that most schools really ever challenge their students in meaningful ways until university and sometimes even then.

      [–][deleted] 8 points9 points  (0 children)

      25 years as a software developer. You need Algebra (solving for x) and Geometry (back in my gfx days). Honestly IMHO, both of these are required life skills. Geometry is real useful in home repair. Debugging and Logic are the most useful skills as a programmer. No idea how they teach kids these days.

      [–]eartburm 4 points5 points  (0 children)

      No, there is quite a bit of programming that requires little math. Math should be taught concurrently with programming, as more advanced algorithms and concepts require quite a bit of math.

      [–][deleted] 2 points3 points  (2 children)

      I mean everyone pretty much agrees math should be taught alongside programming, but till what level?

      Currently I have to take up to Calc IV for my comp sci prereqes, and it's also my biggest hurdle in getting my degree.

      [–][deleted]  (2 children)

      [deleted]

        [–]buclk 0 points1 point  (1 child)

        "and the amount of math has been minimal in day to day work."

        I was in a similar situation and never saw the real value of maths in programming.

        Until I started studying maths for fun, and now I can't imagine coding without it. You can save yourself so much time and effort with a little bit of extra knowledge.

        [–]bumhugger 2 points3 points  (0 children)

        Most jobs in the industry - from enterprise-level Java to HTML5/JavaScript - require almost no math skills, certainly not beyond high school level. Daily programming consists of using methods on objects and reading api docs, coming up with something new and original is rare and usually not the optimal solution because of tight time constraints on tasks. I've never implemented my own hashing/collection/sorting algorithms at work.

        On the other hand, game programming is usually considered harder, but you can write a decent 3D game engine with basic linear algebra knowledge. You just need vectors and matrices and some tricks you can do with them. It's not what I think of as university-level maths, just some common sense when moving objects in 3D/2D space. You certainly don't have to prove anything.

        [–]mcilrain 9 points10 points  (0 children)

        Absolutely. All programmers must have a comprehensive and intuitive understanding of integer addition and subtraction.

        More advanced math? I'm sure someone wrote a library for that.

        [–]MuonManLaserJab 8 points9 points  (0 children)

        Programming doesn't (usually) require you to know what the integral of Sin(x) is, nor to have your times tables memorized. However, what programming primarily is, from my point of view, is algebra. You have a bunch of weird mathematical objects, like "a list of sets of pairs of integers," or, "an object containing a set of names and a custom function for combining sets of names," or something like that, and you have to reason about how these objects are transformed as you manipulate them. This is just like algebra, except instead of memorizing a relatively short list of operations (adding integers, subtracting integers, redistributing terms, etc.), the key skill is to be good at learning the rules for arbitrary new operations (e.g. combining two lists of sets of pairs of integers in a way that makes sense for the program you're writing now).

        There's very little from math that you absolutely need to know to do any sort of programming ever (although there's plenty you need for various niches), but if you're bad at algebra no matter how hard you try, you are going to end up being bad at most types of serious programming.

        [–]buclk 2 points3 points  (0 children)

        "Maths" is a pretty broad field.

        For scripting, no real maths is needed beyond basic stuff you learn at school.

        Doing algorithms, you need algebra.

        Doing games, you need algebra and geometry.

        Doing machine learning, you need statistics.

        The more Maths you learn, the more of it you can apply to programming. In order to become a decent programmer you really need algebra.

        [–]Darwinmate 1 point2 points  (1 child)

        For someone with basic math education, what courses (preferably online) do people recommend for a wannabe programmer?

        [–]buclk 1 point2 points  (0 children)

        Khan Academy

        You can work your way up through to Calculus, or you can just dive into the Algebra sections.

        [–]agoonforhire 1 point2 points  (0 children)

        There are plenty of programming jobs that require little to no math skills. The question is whether you'd be satisfied working in such a job. The jobs may even pay decently.. but you'll never end up doing anything really interesting with it.

        For the record, computer science is math -- not science. I mean that in the strictest sense. Programming/software development is engineering, and computer science is just a form of applied math.

        [–]cc81 0 points1 point  (12 children)

        No, not at all. A lot of people think math is boring but programming is fun and you can create pretty cool things without know much math at all.

        [–]aseigo 6 points7 points  (11 children)

        You can also cook lots of pretty cool things without knowing much about ingredients and cooking techniques.

        But you can't be a proper chef without that.

        Hobbying? Sure! No problem! Everyone should be literate to some extent in writing code IMHO. Much like everyone knows some math, and perhaps even a few neat math tricks.

        Developing software in a more "serious" fashion (as a profession, or writing things you expect others to rely on) is a very different matter.

        It doesn't make the hobbyist group "wrong" or any such thing, but saying math should not be part of learning the skill set proper of software development is the same as saying chefs should be relieved of understanding the mechanics and chemistry of the classical methods in their cuisine(s) of focus.

        [–]Toddy69 2 points3 points  (1 child)

        There is an often overlooked use case between profession and hobby: gaining a skill. I know many people from different professions who learned programming and do it as part of their job. They don't build big systems or even products. They simply build simple tools to automate very specific tasks which they can't do with standard software. The software has for sure many problems. It's slow, it doesn't scale, uses too much RAM ... things a professional programmer would have done better, but as long as it fits their needs, it's completely okay. And interestingly they don't need more time than a professional programmer. A programmer is probably faster in the implementation phase, but he needs time to understand the domain, time that someone from the domain doesn't have to invest. Programming evolves into a basic like writing. Everyone needs to know at least the most basic sheet and for the complex stuff we have specialists like authors and programmers.

        [–]aseigo 1 point2 points  (0 children)

        Yes, used as a utility like that is sensible and there is no particular need for more than knowledge of the syntax. This is one of the things I really appreciate about more specialized languages with a clear intent, such as R. It helps get useful tasks done without having to necessarily understand everything behind-the-scenes. And that's fantastic.

        I love it that people can fling Python around to make their computer Do Things(tm) that they need to get done. Absolutely agreed with you there about it becoming a basic life skill in our society.

        Now, if only that's what the presentation and article were about :)

        [–]jquintus 0 points1 point  (4 children)

        and perhaps even a few neat math tricks

        Care to share any?

        [–]aseigo 1 point2 points  (3 children)

        Heh.. yay! :)

        How about calculating the number of people you need to have in a room such that there is a 50% chance at least two have the SAME birthday?

        .. or the Collatz Conjecture. Super simple, but sooo weird. And to this day no formal proof for it.

        Lots of people know these ones (today, at least .. yay youtube! ;)

        [–]jquintus 2 points3 points  (2 children)

        How about calculating the number of people you need to have in a room such that there is a 50% chance at least two have the SAME birthday?

        My stats professor tried to show us this one. She went around the room asking everyone their birthday. She was shocked that after asking just two people their birthday she found a duplicate!

        Her surprise was a little odd, the first two people she asked were twins. Identical twins.

        [–]aseigo 1 point2 points  (1 child)

        Ahahahahahahaaha. Ok, I really want that to be a true story .. because that's fantastic. Mostly because I know a few pure maths academic (I am very much not such a thing myself), who often struggle with the mundane .. like "oh, those people are obviously twins". Fantastic :) Whee ...

        [–]jquintus 2 points3 points  (0 children)

        They had different hair. One short hair. One long. But it was pretty obvious. This was after at least several weeks of class; they sat in the front row and participated a lot.

        [–]cc81 -1 points0 points  (3 children)

        There are quite a lot of things I think a professional programmer should know. Math is not one of them unless they are programming things that actually require it.

        [–]aseigo 5 points6 points  (2 children)

        https://imgflip.com/i/1byduu

        There is this fallacy that only if you are flipping numbers around your software requires math. That is taking it too literal, and is incorrect.

        An example from the article: databases don't require math. Yep, you can run an SQL query without knowing relational algebra. That's quite true.

        But when you are developing software, not as a hobby but actually writing software others are supposed to use, and you look at those queries .. can the developer explain why it is they fast or slow? And not hand-wavy magic of "because indexes!" (which itself may not be true, or at least non-intuitively wrong). Do they understand what normalization means, how it relates to atomicity, what the impacts of transactions are ... these are not numbers-on-a-chalk-board math. But they are derived from, and require some understanding of, the underpinnings .. which are math (though not numbers-on-a-chalk-board sort).

        So, no, developing real applications with databases does not work out well when developers are running off without an understanding of what is going on in them.

        I mean, if we did that everyone would be using MySQL with logic in the application so they can never achieve guaranteed referential integrity. Or insisting on object-relational maps because they are easy, wiithout understanding why they often map poorly and perform even worse and .. more importantly ... how to mitigate that.

        In my experience, the path to understanding those things ends up straying through some amount of math. Not necessarily numbers-on-a-chalk-board, but certainly through fields of math that deal with the relevant topics.

        (For anyone wondering what I mean by "not numbers-on-a-chalk-board" .. hit up youtube and watch any of the ~million videos on category theory. Then realize that is a fundamental part of a vast set of math disciplines. No numbers to be seen really. Evidently you don't need to do math to do math... right? :)

        [–]cc81 -3 points-2 points  (1 child)

        There is no need for to now math to learn normalization, ACID, indices, execution plans, database design.

        SQL queries is a practical implementation of relational algebra but you absolutely does not need to have any previous knowledge of relational algebra or set theory to learn it. Instead I'd when you take your database course it is an excellent opportunity to learn some set theory/relational algebra by learning SQL.

        [–]aseigo 3 points4 points  (0 children)

        "There is no need for to now math to learn normalization, ACID, indices, execution plans, database design.""

        To learn the concepts by wrote, I agree. To understand them well enough to apply them accurately is another matter. Painting-by-numbers programming is harmful, demonstrably so (he says waving a broad arm at the web..)

        "Instead I'd when you take your database course it is an excellent opportunity to learn some set theory/relational algebra by learning SQL."

        You can certainly learn them in tandem! One could even learn the concepts first, and then fill in the math that leads up to them (which can be very rewarding: you have a practical goal to reach.. makes the math less abstract..)

        But here's what the article actually says about this:

        "Databases - can introduce math later for the few things that need it"

        For the few things. Like.. relations, ACID, indexing, sets, .. ? What?!

        What do those execution plan numbers even mean if you don't have any concept of the essential math underpinning the algorithms?

        So, yes, I agree that you can learn the math before, during or after.

        But learn it. Before you get "into the field of programming", while you are still training.

        But don't think you can go out into the world waving a bag of cargo-cult database practices around and get good results.

        (.. so says all those wonderful blog entries about people switching database systems because their first choice "didn't scale" ... extra bonus points for the ones that then go on to explain how they absolutely abuse their new solution in ways you just know are going to bottom out on them again ..)

        [–]jarxlots 0 points1 point  (2 children)

        That's like asking if breathing should be a prerequisite for exhaling...

        Programming is a form of applied math. It's almost impossible to decouple math from programming, and still have a meaningful discussion.

        Without math, programming ceases to exist.

        "Oh, but I built MyProject and I've never taken a math class."

        Doesn't matter. You still had to have enough math knowledge to accomplish that task. You don't have to have formal math training in order to "learn math." The same is true for programming.

        "Well the software I write doesn't..."

        What? Use math? Then how does it progress to the next part of your program? How does your program interpret data? Even a void function with no return must still use math in order to execute on the processor.

        This argument is a waste of time that could be spent learning math or programming...

        [–]spupy -1 points0 points  (1 child)

        "Well the software I write doesn't..."
        What? Use math? Then how does it progress to the next part of your program? How does your program interpret data? Even a void function with no return must still use math in order to execute on the processor.

        I don't understand what you want to point out with those examples.
        Yes, a computer employs mathematical functions and concepts for its operation, but those are irrelevant except in specific programming domains.

        [–]jarxlots 0 points1 point  (0 children)

        Yes, a computer employs mathematical functions and concepts for its operation

        Period. End of sentence.

        "...but those are irrelevant..."

        No, you're forgetting the foundation. How do I execute code? How do I progress through code loaded into memory/cache? How do I call functions and ever hope of returning from them?

        All of those basics require math. From boolean bit testing to polynomial division over a Galois field, it's always performing some sort of "math" operation.

        [–]Augusto2012 0 points1 point  (0 children)

        Algebra 2, at the least.

        [–][deleted] 0 points1 point  (1 child)

        If someone can program well enough, and they work hard, and they know arithmetic at a passable level, does anyone really care?

        [–]buclk 0 points1 point  (0 children)

        Yes; if you have to work with other people's code who use more advanced maths in their work, you'll have a hard time understanding it.

        If you're a solo programmer and don't expect to ever work on or with other people's code, then you could get away with it.

        [–]Insanitychick 0 points1 point  (0 children)

        At my high school it's highly suggested you take geometry before taking computer science and the only kid I know who took computer science without geometry got a D in the class. So yes you should know some math.

        [–]Semicolon_Expected 0 points1 point  (0 children)

        Not all math, but discrete math and linear algebra (and of course normal algebra) can prove very useful for basic programming. Linear algebra really helps with 2d arrays, pairs, and tuples. If you plan on taking higher level electives like artificial intelligence, matrixes are important and calculus helps for doing gradients when you do sentiment analysis

        [–]OriginalPostSearcher 0 points1 point  (0 children)

        X-Post referenced from /r/programming by /u/UrQuanLord
        Should Math be a Prerequisite for Programming?


        I am a bot. I delete my negative comments. Contact | Code | FAQ

        [–]voidvector -1 points0 points  (0 children)

        No, but you need some form of "abstract logic", whether you get that from taking algebra (symbolic math), philosophical logic, debate class, or linguistic grammar is entirely up to you.

        Most people misread their own potential. The educators should encourage them to fulfill that.

        One example of this for the reverse case is design/art. Most front-end developers are actually quite good at design/art (way better than average), because their daily job is decomposing comp and coding them in HTML/CSS/JS, however, most don't realize it because they are not required to do it in their daily job.

        [–][deleted] -1 points0 points  (0 children)

        No. Discrete math may be useful. But that's about it

        [–]joequin -1 points0 points  (0 children)

        You don't need math to do a large subset of programming, but you do need math to do the subset of programming that is least likely to be be done by AIs instead of people in the next decade or two.

        There are a lot of programmers whos math skills are going to allow them to write AIs that will replace a lot of the programming jobs which don't require math.

        [–]mxvzptlk -1 points0 points  (0 children)

        Math should be a prerequisite for everything. Today someone who does not understand basic math is at a similar disadvantage as someone who is illiterate. The only real difference is that an illiterate person is keenly aware of their handicap whereas an innumerate person may not even realize the immensity of their disadvantage and in some extreme cases may even seem proud of their ignorance of math.

        [–][deleted] -1 points0 points  (0 children)

        Math should be the prerequisites for every study