1. 8
  1.  

  2. 9

    Should programming be a prerequisite for math?

    1. 2

      I’m a senior in a CS degree with math minor. I’ve been explicitly told in some of my math classes to use things like numpy.

      I’ve never needed anything more than basic arithmetic in a single CS course.

      1. 4

        Clearly you have never taken a 3D graphics programming class. They use linear algebra heavily in those.

        1. 2

          I’ve never needed anything more than basic arithmetic in a single CS course.

          How is that possible? Do they not teach Big O notation? They don’t ask you to prove anything about trees or data structures?!?

          1. 2

            Since you mentioned specific topics, I started looking back through the courses I’ve taken and it turns out that I was remembering incorrectly. I took an Intro to Discrete Structures class two years ago that was all math proofs, recursion and the intersection of math and computers with a little bit of pseudocode thrown in. That was when I covered Big O notation. I had forgotten that that was technically a computer science class and not a math class.

            In the class where we covered trees and data structures, we learned about them but didn’t have to prove anything about them. We just took it for granted that the professor (and text) were correct.

            I suppose what I was thinking when I made my original comment was that generally when given a programming task both in my degree classes and outside of them, I have never been asked to sit down and think about the math to go along with implementing a particular algorithm or course of action. That’s not to say that I couldn’t, just that it’s never come up.

      2. 8

        Should math be a prerequisite for programming? No, really.

        Should math be a prerequisite for, say, a computer science degree? Yes, absolutely.

        There is, as others have pointed out, plenty of programming that does not involve much in the way of math at all. Sure, you might want to have some core notions of what a number is, so you can either reduce or remedy your off-by-one errors, but that’s about as far as it goes. I’m talking about things like: yet another tool to convert yet another custom format provided by your client into standard csv files to load into your database, or wiring a simple-but-custom GUI around a backend layer. No math skills required.

        “Of course there’s math, you’re just not thinking about math right!” seems to be the common counter. I see that as meaning one of two things:

        1. To do it right, you should think more analytically. Maybe. But you don’t need to do it right to get it done, and that’s true across many fields, not just ours. Sometimes O(n^2) is fine.
        2. You’re secretly using mathy thinking even if you don’t realize it. Also maybe. But not realizing it is kind of the point – if you don’t need coursework to do it, and you don’t think of it as math, well, then, as far as you’re concerned, it isn’t math. So there you go.

        Now, don’t get me wrong. I got a CS degree, and slept through the math reqs for it. It wasn’t until later in my career that I started regretting that missed math, and thinking about even further math. But it really wasn’t until later in my career. I worked professionally for years without coming to that conclusion. Which means that the little bit of “math” in my Algorithms & Data Structures was plenty to get me through to writing complex report systems. Had I been less ambitious, I would have been fine even without that. I certainly never in that time had to multiply a matrix.

        All that said, there’s a stigma around math that I’d love to fix. Enforcing it as prereqs isn’t the way to do that.

        1. 6

          I had the good fortune to go to a school that didn’t enforce prereqs. You could sign up for any course at any time. I ended up skipping a number of classes, then going back and taking them later.

          Algebra 1 is a lot of rise over run and FOIL type stuff right? To pick one programming example, I wrote a DNS proxy without leveraging either of those two topics. I also wrote some image rescaling code, so it goes both ways.

          1. 9

            People can learn to program without math courses - and programming is a good introduction to mathematics. The pre-reqs to intro courses are exclusionary for no good reason.

            1. 9

              It’s baffling to me that this is even a question.

              The original uses for computers were computing firing tables for artillery (trig, physics, a few other things) and cryptography work.

              Mathematics is the entire reason we have computers!

              I’m increasingly concerned by the number of developers that I’ve met who treat basic math–even things as simple as the basic algebra you’d run into doing UI positioning or pointer arithmetic–as some kind of black art. It’s not. If an inert little piece of silicon and static electricity can do it, so can you.

              The problem with this is that it gives an unwarranted respect to people that can do the math (and I say this as somebody who dabbles in graphics and other things requiring basic linear algebra) and encourages the use of ever-deeper piles of abstractions to get around what is often a pretty simple set of equations (say, for rendering charts or what have you).

              Like, I get that a lot of people want to open opportunity for people because they see the economic apocalypse a lot of folks will be facing in the next decade or two–but that can’t be done by dumbing down and making artificially simple the problem domain.

              1. 5

                [Edit: needlessly confrontational] Computers are used for lots of far less mathy things now.

                Over the last ~decade of professional programming, I’ve encountered 4-5 problems that math simplified. Sure, it helped there - but it’s far from a prerequisite.

                Perhaps part of the issue is that ‘programming’ refers to an ever-widening range of activities as higher and higher level tools become available.

                1. 2

                  You have a profound misunderstanding of mathematics if that’s the case.

                  1. 1

                    I don’t think that would be a helpful thing to say even if it were true (which it could be, but I maintain my doubts).

                    There are plenty of problems which have too many layers of imcompletely-understood abstraction to be mathematically tractable - not because we lack the mathematical ability but because we lack the modelling ability.

                    What branch of mathematics will help me find a simple approach to converting static mockups at a single scale to a responsive webpage design? I’m aware of research projects in AI to find good solutions to these but they don’t appear to work well yet.

                    Undergraduate-level math is used to improve the SNR on my monitoring tools - but someone has already done that work and I can leverage their implementation without having to understand how the math works.

                1. 3

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

                  Is this trolling or genuinely clueless? Properly designing a database schema, that is, guaranteeing the absence of update anomalies, requires hard mathematics.

                  1. 11

                    I don’t know. I’ve never broken out the hard math stick when designing a database schema, and update anomalies have never been an issue.

                    1. 5

                      There are two ways to avoid putting a database in a state that violates business rules:

                      (0) By carefully writing application code.

                      (1) By defining your database schema in such a way that the DBMS will automatically enforce business rules.

                      I was talking about the latter.

                      1. 1

                        And in many cases, the latter could be achieved by just thinking about the data and what constraints makes sense, rather than trying to prove things through induction or whatever hard mathematics you were talking about.

                      2. 3

                        I learned basic SQL in order to use a database for practical work, and only later did I learn that relational databases were originally modeled as a sort of abstract algebra; I still wouldn’t say that I really understand relational calculus, but I’ve dabbled in the abstract theory a little bit. In general, I’ve found programming to be prior to mathematics more than the other way around. Lots of programming techniques turn out to have some kind of mathematical formalization, and knowing how to program helps you understand that formalization, but the programming is what I learned first, without realizing that I was in some sense doing mathematics.

                    2. 2

                      Definitely this should be the other way around if anything. I didn’t start getting interested in higher mathematics UNTIL I had gotten into programming. Programming really creates a lot of scenarios where the math is useful, and most people don’t care about something until it’s useful. Another way of framing this is, if lots of people fail math classes, and less people fail programming classes, why would we prevent people from learning programming just because they aren’t good at traditional mathematics.

                      1. 2

                        No.

                        “programming” is a diverse discipline, a large chunk of which doesn’t require any explicit math beyond basic arithmetic.

                        I’m looking at doing a master’s degree in type theory and programming language design, I’m learning the math I need as I go along.

                        I don’t see how hard prerequisites help - especially since a decent chunk of your class (I would say a majority based on my undergrad experience) will never need more than basic arithmetic.

                        1. 1

                          I think this is basically a question of trade school vs. university. If what you want is job training then absolutely go to a trade school (= coding bootcamp?) and learn exactly what you need to do your job effectively. A four-year degree goes beyond that though: it’s purpose is to give you both a deeper understanding of the field’s foundations and a wide breadth of knowledge in its applications. The foundation of a computer is mathematics, so anyone claiming a Computer Science or Software Engineering degree should absolutely be decently comfortable in mathematics.

                          As for whether all that theory stuff actually helped, I can give my take: I got an internship my third year of school where ended up (surprise!) writing Verilog. I didn’t have any hardware experience prior to this, but because I’d taken assembly and math courses I was able to figure it out enough to be useful. If all I had was training from a bootcamp I’d have missed out on maybe the most interesting work I’ve so far done.

                          Also for what it’s worth, I wouldn’t want to live in a house whose architect dismissed “all that theory stuff” :)

                          1. 1

                            To get a degree in software, you should learn some math. To take an introductory programming course do you need math prerequisites? No. Two different questions.

                          2. 1

                            My personal opinion is that proficiency in performing simple algebraic manipulations demonstrates some minimal level of the sort of abstract thinking ability necessary to build complex software. I don’t know if there is any data backing this idea up, though, or how we might go about testing it.

                            1. 1

                              I mainly see math coming in on developing quality tooling or formal verification. The average programmer probably won’t benefit from math but might from related field of logic. Just enough to do Design-by-Contract or specs of key functions. Optionally something like TLA+ if they’re into protocol or distributed system design. Knowing the logic better lets you capture or prove better properties. Even the tiniest amounts, though, can help a lot in DbyC where the average pre or post condition isn’t going to take a mathematician to formulate. Plus, the common and hard ones can still be done by math pro’s with others just using them based on English recommendations. “If it involves time and ordering, here’s some notation to cut and paste for common stuff you might run into.”

                              And so on.