I’m working my way to a CS degree and am currently slogging my way through an 8-week Trig course. I barely passed College Algebra and have another Algebra and two Calculus classes ahead of me.

How much of this will I need in a programming job? And, more importantly, if I suck at Math, should I just find another career path?

  • Ben Matthews@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    2 hours ago

    As a kid, I learned to write i = i +1, before school maths taught me it can’t. The point is, computers do iteration well, especially to model dynamics of real non-linear systems, while classical maths is good at finding algebraic solutions to equilibria - typically more theoretical than real. Calculus is great for understanding repeatable dynamics - such as waves in physics, also integrating over some distributions. But even without knowing that well you could still approximate stuff numerically with simple loops, test it, and if an inner-loop turns out to be time-critical or accuracy-critical (most are not), ask a mathematical colleague to rethink it - believe in iteration rather than perfect solutions.

  • entith@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    4 hours ago

    As many have already said, the math needed will depend on what type of work you’re looking to do. Writing business software, for example, rarely requires more than basic arithmetic.

    However, I think that the logical thinking skills that are needed for math are also necessary to be a good software engineer.

  • AwkwardLookMonkeyPuppet@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    4 hours ago

    If you’re doing really complicated stuff then you at least need to understand algebraic logic and concepts. You’ll also need to understand stuff like logarithmic scales for optimization. But it’s entirely possible to go years without using any math, especially as a website developer. I’m about as senior as you can get in the field, and I’ve only had one job for around 4 years where I used advanced mathematics on a regular basis. That’s 4 years out of a 25 year long career.

    That said, a CS degree is going to require all of the math classes as part of the curriculum. My degree program involved fun classes such as finite mathematics, statistics, trig, etc… If you’re doing a program that requires advanced mathematics courses, for goodness sake do them all in a row!

    TLDR: it depends entirely on the job. Jobs that are data intensive, with data manipulation, hardware interfacing, and automation type jobs will require more math than jobs like making cool-ass interactive websites.

    Edit: PS, I suck at math. I’ve always sucked at math. Yet I’m what most people consider an amazing engineer. Weeee!

  • trolololol@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 hours ago

    The most advanced math a typical developer needs is Fibonacci, and if you can’t remember it someone will show you a cheat sheet.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    14
    ·
    6 hours ago

    Totally depends what you end up working on as a programmer. If it’s web apps, you’ll be totally fine. All you need is basic arithmetic. Writing a game engine? You’ll need to know some basic to moderate matrix maths…

    If you’re doing formal verification using unbounded model checking… good fucking luck.

    On average I would say most programming tasks need very little maths. If you can add and multiply you’ll be fine. Definitely sounds like you’ll be ok.

  • CoCo_Goldstein@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    6 hours ago

    As others have said, It depends on what kind of programming you do. Some areas requite a lot. Others not so much. It’s logic, not math, that is needed the most.

    You may want to check if your college has a different kind of programming degree. As I understand things, there are basically two kinds of programming degrees. “Computer Science” has much steeper math requirements and focuses on applications that deal with Science or engineering issues. “MIS (Management Information Systems)” degrees focus on actual programming that businesses need, not programs that are science or engineering focused.

  • realitista@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    7 hours ago

    There’s a lot of programming you can do with zero or very basic math skills. But some stuff can require a lot. But I’m quite sure you could manage a career very nicely without ever touching those areas. People who do that are probably seeking those things out.

  • Drakk0n@programming.dev
    link
    fedilink
    arrow-up
    17
    ·
    10 hours ago

    More than math courses - logic courses in general helped me rethink and structure things in a variety of ways in how to approach problems. If nothing else it improves your “if-then-else”-fu to understand when you are not(not(not something))). My math degree required logic courses though at the same time so it made sense. For higher level math logic plays a heavy role and so leveraging that aspect helps in a lot of ways.

  • jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    9
    ·
    10 hours ago

    I failed calc2 and am gainfully employed as a mid/upper level software engineer.

    One guy at work really saved the day because he’s good at math, and made a very slow process much faster because he knows … uh… vector math? He did magic with numpy

  • suburban_hillbilly@lemmy.ml
    link
    fedilink
    English
    arrow-up
    64
    ·
    15 hours ago

    Anywhere from very important to not important at all, depending on your specific job.

    There is some good news though, you’ve been lied to about sucking at math. Whether by yourself or other people I do not know, but the education research I have seen has been pretty clear that the main difference between people of normal intelligence who are ‘good at math’ and those ‘bad at math’ is how long they’re willing to work on a problem to ensure the correct answer before moving on.

    I know ‘try harder’ sucks as an answer but it’s the best one I know of and at least in this case will actually make a difference.

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      arrow-up
      15
      ·
      14 hours ago

      Agreed. Math, for the most part, is very rule oriented and problems only have one answer and often one strategy to get to the answer. If you work on many different problems (in the same subject) you should start to get used to the rules.

      Overall I would say a strong math foundation is important to CS but CS isn’t just about coding. You can absolutely get a coding job without strong math skills or even without a degree, it’s just a bit harder to get started. If the discipline still exists you might consider a Business Information Systems degree (we used to call it CS lite). Depending on the position a company might equally consider BIS and CS majors.

      • Kache@lemm.ee
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        26 minutes ago

        problems only have one answer and often one strategy to get to the answer

        Totally disagree

        You’re thinking of equations, which only have one answer. There are often many possible ways to solve and tackle problems.

        If you’ll permit an analogy, even though there’s “only one way” to use a hammer and nail, the overall problem of joining wood can be solved in a variety of ways.

      • affiliate@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        13 hours ago

        i would disagree that math problems only have one strategy for getting to the answer. there are many things, particularly in more abstract math, which can be understood in multiple different ways. the first example that comes to mind is the fundamental theorem of algebra. you can prove it using complex analysis, algebraic topology, or abstract algebra. all the proofs are quite different and rely on deep results from different fields of math.

        i think the same thing holds in the less abstract areas of math, it’s just that people are often only taught one strategy for solving a problem and so they believe that’s all there is.

    • xigoi@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      13 hours ago

      Do you have a link to the research? I’m a math educator and I’d like some good materials for encouraging my students.

  • GissaMittJobb@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    8 hours ago

    I don’t think you necessarily need to have studied a lot of math to be successful in programming, but you will need it if you want to get a CS degree, which in turn can be a good lever to a fruitful programming career.

    My advice when it comes to math - math skills build upon the concepts you’re expected to have learned before, meaning that if you didn’t fully get everything in the past, then your foundation is not in great shape and you will struggle at higher levels. Going back and repeating the fundamentals just so that you fully understand everything is very helpful in my experience.

    I also think that understanding math is rewarding in itself, for what it’s worth!

  • MercuryGenisus@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    12 hours ago

    90% of programming I have seen after a decade plus of doing it full time is minor changes being made to code that was already made by someone. Likely not documented. Likely already changed in a dozen little ways. Math isn’t the problem. Understanding what the guy who wrote it is often the problem.

    Oh and you can’t ask them because they likely don’t work here anymore.

    Being a programmer is more like being a detective than anything else unless you work for a small company.

  • UnfortunateShort@lemmy.world
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    edit-2
    3 hours ago

    As others have mentioned, how much and what kind of math you need depends heavily on what you do. And while I wholeheartedly encourage you to do what you enjoy, be it with or without maths, I would like to offer another perspective: A loveletter to maths.

    Math in general gets a lot easier and more fun the longer you do it and the more interest you can build. Often the people that teach math are extremely good at it, and maybe because of that they suck at explaining it. There is a lot to doing it right.

    First of all, I think you need to build excitement. Math strives to describe the world! Math is the foundation of science, math is history, and many of the concepts and techniques arose out of necessity… Or sometimes spite! There are many funny stories or interesting people behind the formulars and concepts you encounter. Learning why the hell some math was even invented and how the guy or gal got the idea is 1000x more interesting than just getting an example for the application of it. It helps you remember stuff.

    Then there are a dozen ways to explain every single concept and then some. You will find some much more intuitive than others and the sum of them will sharpen your understanding of them. Looking for different explanations for the same thing can be a great help. Did you know many things in maths where discovered multiple times? That happens a lot, because even brilliant mathematicians don’t properly understand each other, or even themselves.

    Another thing you should do is to always develop your vocabulary for every domain/concept you encounter. People will throw around made-up words and symbols like no tomorrow. Often, there are simple concepts behind them, hence they are casually abstracted away. You need to understand the concept and then translate it into your own words and then draw a connection back to the made up stuff. Maths is a lot like programming. 1 + 1 is just a function, returning a result. So are integrals, formulas in vector algebra, and every single damn other thing in maths. Just follow the chain!

    And finally, there are also some amazing insights hidden in maths. Gödel’s incompleteness theorems might send a chill down your spine once you grasp their implications. Computability and information theory will shape your view on the world and yourself.

    I went from getting Ds to Bs to advanced theoretical CS courses and you can do it too. You don’t have to, but you can.

    • kartoffelsaft@programming.dev
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      11 hours ago

      While I do agree that math gets much easier with interest, and that it gets more interesting the further you get into it, and that math is inherently beautiful, etc. I feel this argument has to fall flat to people who don’t already agree. It’s the education equivalent of when someone says they couldn’t get into an anime and then the fans tell them ‘oh it gets really good around season 9’. You could be completely correct, as you are here, but it’s utterly unconvincing if you don’t already “know.”

      To be fair, I think this is mostly a problem with math curricula. Math classes up through high school and early college seem to focus on well trodden solutions to boring problems, and at some (far too late) point it flips around to being creative solutions to interesting problems. I think this could be fixed eventually, but such is the system we have now.

      • UnfortunateShort@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 hours ago

        I totally agree. I think maths should start with games in elementary and cover history and applications as soon as you enter middle school. (Keeping games of course, how is there no redstone in the maths curriculum?!)

        And I know that my rambling won’t convince people to immediately shake off the system induced maths fatigue, but I’ll never stop encouraging people to give it a second chance :)

    • Captain_CapsLock@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      10 hours ago

      As someone who studied math in college, but can hardly string a line of code together without making 4 trips to stack exchange or some documentation, this was a very good explanation of why math is actually really exciting.

  • tiddy@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    9 hours ago

    Depends on the industry and depth you want to go to, gamedev for example you can do without any, but all lower level custom graphics and physics are pretty calculus heavy.

    Website dev can be entirely independent of math

    • Valmond@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      8 hours ago

      Ya, in gamedev you just need triginometry, lerp, quaternions, matrix multiplications and basic 3D math and maybe some more.

    • refalo@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      9 hours ago

      Depends entirely on your definition of “gamedev”, IMO. If you’re trying to write a platformer in basic C with no external libraries, you will absolutely need to use algebra/geometry/etc. and maybe even some more advanced things like physics/calculus depending on what features/effects you want to put in your game.

      • tiddy@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        2
        ·
        9 hours ago

        I would uh consider that pretty in deep gamedev, even lower than some shader code lmao - so yes you would need to know some math.

        Cracking open Godot and using a bunch of premade assets hardly even requires programming, much less mathematical knowledge

        • refalo@programming.dev
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          7 hours ago

          Be that as it may, I personally wouldn’t consider someone to be a very knowledgeable (on how games actually work) game developer if they didn’t at least know how to use things like linear algebra to make a character run and jump naturally and such, even if they’re not coding like that day to day and just using a higher level framework.

          You don’t have to agree with me, and I still respect your opinion either way.

          • groucho@lemmy.sdf.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 hours ago

            I agree with you. Even if you never touch it, it’s nice to know what the libraries you’re calling are doing under the hood.

  • wewbull@feddit.uk
    link
    fedilink
    English
    arrow-up
    19
    ·
    14 hours ago

    Don’t need a degree, but computer programming is fundamentally logic and algorithms. You need to have internalise reasoning logically. In some ways critical thinking is closer to programming than trig is.