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?

  • entith@lemmy.world
    link
    fedilink
    arrow-up
    21
    ·
    edit-2
    13 days 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.

  • wewbull@feddit.uk
    link
    fedilink
    English
    arrow-up
    19
    ·
    13 days 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.

  • UnfortunateShort@lemmy.world
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    edit-2
    13 days 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
      ·
      13 days 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
        2
        ·
        13 days 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
      3
      ·
      13 days 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.

  • Drakk0n@programming.dev
    link
    fedilink
    arrow-up
    16
    ·
    13 days 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.

  • MercuryGenisus@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    13 days 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.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    16
    ·
    13 days 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.

  • jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    13
    ·
    13 days 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

  • WhatAmLemmy@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    13 days ago

    Math, despite being a great skill to have, is not mandatory for a large volume of programming roles. It may hurt you in some interviews but interviews are a fucking crap shoot / shit metric either way. Computers do most of the math, so you don’t have to!

    Source: I’m dyslexic, suffered from dyscalculia and migraines until I was allowed to use a calculator, and barely passed high school math. No degree. No bootcamp. 8 years as a dev.

    I’ve also excelled in multiple roles where colleagues were math or CS PHD’s, and become the senior or go-to on more projects than not. The key part is to know your strengths. I’m never gonna accept a role developing accounting software, or anything that would require me to code complex math on a regular basis. You’d be surprised how far you can get with Google.

  • Honytawk@lemmy.zip
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    12 days ago

    Depends on the programming job.

    In my amateur experience, the most difficult math I had to do was use the Pythagorean theorem to calculate a point that was spinning around an other point.

    But I can see needing to be able to use matrices in some instances.

    Being good at math allows programmers to code more efficient systems. Instead of doing multiple complicated lines, it could all be incorporated into a single efficient equation.

    Most of programming is just logic based. Although math is also logic based. So take from it what you will.

  • nik9000@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    12 days ago

    I think folks saying you don’t need math are right. But if you are having trouble with college algebra you might have trouble with CS. Or the teacher is bad.

    Math really builds on itself at the stage where you are. Without good algebra calculus isn’t going to work well.

    I’d try a different teacher. Online courses or repeating the course with another professor or something.

  • Ben Matthews@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    13 days 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.

  • AwkwardLookMonkeyPuppet@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    13 days 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!

  • Kache@lemm.ee
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    13 days ago

    IMO mathematical/logical/abstract thinking is critical for programming well, but IMO that’s different from “math degree” math.

    Software as a means to an end can be used in almost every domain, so proficiency within that applicable domain is often either useful or necessary. That is to say, “math degree” math is likely needed for 3d rendering (certain games), scientific computation (incl machine learning), etc, but maybe not, otherwise. It depends on what software you’re trying to build.

    To be more specific, general programming is definitely and specifically different from trig and calc. However, because math is also broad, “mathy” concepts like type theory, relational algebra, set theory are considered important for programming, even if only informally or indirectly so.

  • masinko@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    12 days ago

    Depends on what kind of programmer.

    If you’re doing data engineering/science (more of an adjacent field), you need to know linear and probability pretty well to build models, or have data harvested in ways that can be put into vectors.

    If you’re doing relational DB stuff (like SQL) set theory helps a lot.

    Basic boolean operations in general is also good to know. You don’t need to go too deep in the weeds of boolean math unless you’re also doing a lot of hardware-level stuff.

    Any field you go into (not just programming), I would say just basic math for regular financial competency is good to know. Also to analyze your budgeting, your costs, time spent, effort needed, etc.

    • oldfart@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      12 days ago

      If you’re a frontend programmer, you only need to understand rectangle width and height lol

  • Jayjader@jlai.lu
    link
    fedilink
    arrow-up
    7
    ·
    12 days ago

    Math underlies programming in a similar fashion to how physics underlies automobile driving. You don’t ever need to know about newton’s laws of motion to pass your driver’s license and never get a ticket until you die. At the same time, I will readily claim that any driver that doesn’t improve after learning about newton’s laws of motion had already internalized those laws through experience.

    Math will help your intuition with how to tackle problems in programming. From finding a solution to anticipating how different constraints (notably time and memory) will affect which solutions are available to you, experience working on math problems - especially across different domains in math - will grease the wheels of your programmer mind.

    Math on its own will probably not be enough (many great mathematicians are quite unskilled at programming). Just as driving a car is about much more than just the physics involved, there is a lot more to programming than just the math.