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?

  • Honytawk@lemmy.zip
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    6 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.

  • kamstrup@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    6 days ago

    Being comfortable with basic back-of-the-envelope math can be a huge benefit. (Full disclosure: i am a math major who is now a programmer)

    Over my career I have several examples of projects that have saved weeks worth of dev time because someone could predict the result with some basic calculations. I also have several examples where I have shown people some basic math showing that their idea is never gonna work, they don’t listen and do it anyway, and I see them 1 month later and the project failed in the way i predicted.

    A popular (and wise) saying is that “Weeks of work can save you hours of meetings”. I think the same is true for basic math. “Weeks of coding can save you minutes of calculation”.

    You can definitely be a successful programmer career without great math skills. Math is a tool that can help you be more effective.

    • icermiga@lemmy.today
      link
      fedilink
      English
      arrow-up
      4
      ·
      6 days ago

      Can you share the full story of the projects that you could predict could fail using maths?

  • nik9000@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    6 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.

  • Phoenixz@lemmy.ca
    link
    fedilink
    arrow-up
    3
    ·
    5 days ago

    Depend on what programming you do. Graphics will be math out of the wazoo, whereas generic web or desktop app programming has very little math involved

  • masinko@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    6 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
      ·
      6 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
    ·
    7 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.

  • DjMeas@lemm.ee
    link
    fedilink
    arrow-up
    5
    ·
    6 days ago

    I’ve been a full stack dev for about 11 years. I do some basic algebra but that’s about it.

  • vrighter@discuss.tchncs.de
    link
    fedilink
    arrow-up
    7
    ·
    7 days ago

    unless programming something math intensive like 3d graphics, then basic arithmetic and just a general intuition of numbers is more than enough.

  • Jimmyeatsausage@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    6 days ago

    I was doing full stack dev for 20 years until very recently. Never needed anything beyond basic algebra EXCEPT for while I was getting my CS degree…had 2 classes, i think, where we were doing matrix math/Fourier transforms, but iirc they were electives…one was writing a very basic 3d graphics driver and the other was working with very simple computer vision…things like recognizing handwritten letters.

  • shastaxc@lemm.ee
    link
    fedilink
    arrow-up
    2
    ·
    6 days ago

    Programming and math are both heavily rule-based and logic-based, which is why people say if you’re good at math you may be good at programming.

  • inline_caching@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 days ago

    I agree with the other answers that it depends on the type of programming you end up doing…the nature of the program being developed, but having a background in discrete math is great to have just in case.

    From my experience, there can be unexpected problems where you will advantage from having grasp at discrete math. I worked on a project for a telecom company where they wanted a simulation to predict the impact on network coverage if a specific cell tower (BTS) was uninstalled. I ended up relying heavily on the cross-product formula and some ray-casting algorithms to model how coverage would shift in the area.

  • LovableSidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    7 days ago

    If you really mean mathematics as in algebra and trigonometry, not much really. But arithmetic is a handy skill. A programmer should be able to at least add and subtract - especially doing UI stuff, which involves dealing with dimensions and positioning of elements on a page. You should be comfortable with numbers and not need a calculator to add up the widths of a few display columns, for example.

  • BluesF@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    Very much depends what kind of programming you’re doing. Graphics uses shittons of maths. Data analysis/data science is maths/stats heavy. Other types less so!

  • Eiri@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    6 days ago

    I’m a front-end developer. I sometimes need to solve algebra problems. I’m pretty bad at it because I , but my knowledge that a problem is solvable by math comes in handy maybe once or twice a month. It’s just that on the few occasions that there’s algebra that I can’t figure out how to solve (maybe once a year), I may ask for help from a colleague.

    Examples of cases where math comes in handy:

    • Pythagoras when I need to figure out the x/y components of a diagonal distance
    • Width/height calculations from a variety of parameters

    In summary, as long as you know what math is capable of, you probably won’t have major issues. There will pretty much always be someone around to help with the math part if necessary.

    As for calculus… I forgot all about the one calculus class I’ve taken and I’ve never suffered for it.

  • Simulation6@sopuli.xyz
    link
    fedilink
    arrow-up
    2
    ·
    7 days ago

    Many things that are solved by brute force could be greatly improved in a mathematical way. I have worked with a mathematician on one application to get past a speed bottle-neck, but that was a rare case.