r/learnprogramming • • 8h ago

Does Maths matter?

A big issue that I'm starting to see as I'm going through my studies in IT(software engineering) is the painful math module my college has us do.

It is a cause for concern as my math is below par, however I'm deeply in love with programming.

Personally I dont see a need for it, however some people do say its there to assist with the 'problem solving' part of the subject.

5 Upvotes

80 comments sorted by

26

u/Sea_Athlete1378 8h ago

Math is very essential in solving complex problems.

-19

u/Own_Unit_6170 8h ago

Not true. Math is only necessary to solve math problems.

19

u/mugaboo 7h ago

Yeah, it's not used at all in physics, or computer science, everyday software engineering, finance or anything really.

1

u/Sea_Athlete1378 7h ago

I assume you are being sarcastic haha

-2

u/Own_Unit_6170 7h ago

Most software isn't doing physics, CS, or engineering, and most finance applications involve only extremely simple calculations.

4

u/mugaboo 6h ago

"most is not..." vs "math is only necessary..."

4

u/chocolatesuperfood 6h ago

What kind of finance applications do you mean? The models used in finance and market predictions are usually extremely complex mathematical models.

→ More replies (2)

•

u/Sudden-Pineapple-793 41m ago

Because all the math is abstracted away. Not because it’s not there

9

u/Sea_Athlete1378 7h ago

So data structures, architectural decisions in terms of scalability and reliability have nothing to do with equations? Maybe you're not there yet but trust me, you need it when things get complicated

0

u/mxldevs 7h ago

How are you using calculus or linear algebra in your data structures and architecture? Can you provide an example of a recent problem showing how they're used?

4

u/Sea_Athlete1378 5h ago

You will learn along the way buddy :) query's require calculus, limiting requests to your backend. Its endless honestly. I don't say you have to be a mathematical genius, but denying math plays a big role in development is just nonsense and terrible advice.

→ More replies (7)

•

u/StewedAngelSkins 48m ago

For calculus, time and space complexity analysis is the obvious example.

•

u/Sudden-Pineapple-793 40m ago

I mean a 2d array is literally just a matrix, look at at numpy, inverses, SVD, transposition etc

→ More replies (1)

3

u/chocolatesuperfood 7h ago edited 6h ago

I had to take Math courses, mostly focused on discrete Math, and I found them very helpful, especially the parts on logic and set theory.

I also had to take a class that dealt more with calculus and trigonometry, and I found these less helpful for immediate programming tasks, although things showed up when dealing with media and signals (Fourier analysis etc.).

Machine learning and AI programming also requires a great deal of Math, from random forests and simple Bayesian models over clustering algorithms to neural networks and what else.

Mathematical logic shows up as well in GOFAI implemented in, e.g., Prolog. (For the implementations of more modern ML approaches I was taught to use Racket/Lisp/Scheme and, of course, Python.)

Math also helps when calculating and judging the time complexity of the programs you write.

0

u/Own_Unit_6170 7h ago

Have you used a lot of calculus and trig on your e-commerce and airline reservation sites?

2

u/chocolatesuperfood 6h ago

No, but programming is more than web programming. Not saying web programming is not valid (I also learned some Javascript, server-side programming etc.) or worse. But even the data structures and databases used in these kind of websites require some mathematical understanding, as well as the deployment of the websites. For example, I learned and understood round robin scheduling used in load balancers in Mathematical terms. Maybe our disagreement is on the layers of abstraction of Math needed in different kinds of programming scenarios?

→ More replies (2)

1

u/badcodenolatte 4h ago

Computer science is founded on math, literally what are you talking about

•

u/StewedAngelSkins 50m ago

It's an analytical tool you can apply to any problem. Or not, if you prefer grasping in the dark.

15

u/ee_control_z 8h ago edited 3h ago

It depends on the type of project that you're tasked to work on. Some require it more so, others less so. If you're solving problems that require math (arrays, engineering, large pieces of data, etc.), there is no way around it. As a general rule, being proficient in math does help with how you approach problems as it enhances your analytic thinking abilities. It may also provide you with added intuition that enhances your ability to work/solve problems more efficiently.

An analog to an athlete, its like saying I like playing football (or fill in your preferred sport) and yet say, I don't want to do all of the required work of getting in shape to build strength and stamina because I find it boring and "I don't see a need for it". I just want to play football. Kinda sorta'.

You can still play football, but you will not be playing at your optimum. Career wise, it may limit your options on the type of projects that you can work on.

8

u/ChiefBullshitOfficer 8h ago

This athlete analogy is great.

Why does a basketball player, or a swimmer lift weights? They won't be lifting weights during the game or race, but it does improve their overall performance.

There is a problem with the current mentality that everything you learn in college should be a directly applicable skill to a work place. That attitude suffers from aiming for a constantly moving target. It's better to be an overall performer, than a specialist in a particular technology that may be out of date by the time you graduate. But if that's want you want to do, going to a 2 year technical college makes more sense.

7

u/mxldevs 8h ago

You don't need to be able to solve triple integrals or dot products in order to write software.

It doesn't matter nearly as much as people will try to make it seem. There are a wide variety of fields, and some certainly go deep in math but you don't have to do those if you're not interested.

6

u/allunia333 8h ago

Yea math will be needed in programming.

4

u/horangiwhakkatchi 8h ago edited 6h ago

Yes it's important. I come from a non-math background and I'm not good at it so I struggle. You don't use math directly often on the job unless you're like a game dev or working on rockets or something but it informs everything we do. If you understand math, the other stuff becomes easier. Also now the high paying jobs are building AI and that requires math.

3

u/HellVollhart 8h ago

Maths matters EVERYWHERE!

4

u/tcpukl 8h ago

It's very very important.

Which part don't you see relevant to programming? We could explain why it is. It might help your motivation in learning it.

-8

u/Own_Unit_6170 8h ago

It is completely unimportant. The idea that you need math for programming is among the most persistent and incorrect myths in the field.

4

u/InternetSandman 7h ago

My second co-op was working in computational geometry, and towards the end, I had to read multiple papers and textbooks to correctly implement the feature I was working on. If I didn't already have decent mathematical maturity, it would have been way harder

You're spreading misinformation that "math is unimportant" without providing evidence.

-1

u/Own_Unit_6170 6h ago

If you are writing software to do geometry, you need to know geometry. If you're writing software to handle payroll, you need to know payroll. You do not need to know anything that the software is not doing. That is fact, not misinformation. And most software is not math software.

The myth of math being needed for programming has likely discouraged people who dislike math from starting a potentially fruitful career in software development.

There was a time when it was claimed that you needed to know accounting in order to be a programmer, too. The assumption at the time was that all software was accounting software. Obviously that proved to not be the case. Same for math.

There is also a strong tendency for mathématiciens to assume that programming is somehow just a subset of their grand and glorious world of math, and that, too, is completely false.

1

u/tcpukl 4h ago edited 4h ago

When did you need accounting? Not since the 80s when I learnt programming for sure.

2

u/PoMoAnachro 8h ago

A lot of the things you learn in university level math classes you won't end up using in a lot of programming (it does depend what subfield you're specifically in).

But on the flip side - the people who really struggle with math usually also struggle with programming. There's a lot of overlap between the types of brains which are good at both.

So usually if someone is struggling with math that's a warning sign for me for two reasons: 1) It might mean they just don't have the type of brain that's good at abstract reasoning and problem solving, or 2) They do have the type of brain that's good at that, but they don't have the personal discipline to make themselves apply effort to problems they don't find interesting.

Either of those can easily prevent you from being a good programmer. Fortunately, both can be improved to a degree. You can get your brain better at abstract reasoning through practice. And you can absolutely learn self-discipline and how to apply yourself to things you don't find personally interesting.

2

u/Sherlock-Holmie 7h ago

Solving hard maths teaches some skills that are hard to replicate by practicing in other ways.

A lot of CS degrees are relatively easy and people go into the real world where the hardest thing they ever do is like calc 2 or discrete 2, and those are the main weed out classes in college.

I have a degree in physics, and I repeatedly find myself having a much easier time working on complex systems that require keeping track of components than my peers. I don’t think I’m particularly smarter than them, but the hard math and physics work I did before industry just wired my brain to be more comfortable with those problems.

I don’t think it has to be math training your brain to work like that. If you work on sufficiently complex personal projects that teach you the same skills, it should work. Everyone needs to spend their time bashing their head against a problem for multiple hours a handful of times.

1

u/exploradorobservador 8h ago

Why do you find it painful? The amount of effort it requires just to get by?

1

u/hangulll 7h ago

It usually starts with bad teachers and your parents screaming at you because you can’t understand. Human psychology is interesting

1

u/exploradorobservador 6h ago

Oh I understand, I developed a strange fear of performance in exams, a really bad one. I had to take time off from college to understand and do therapy. I did linear algebra, multivariable calculus, and discrete math through distance learning to try and get over the fear, but it never quite went away.

1

u/hangulll 5h ago

We don't know the OP, but people have different experiences and humans are very complex imo. I needed psychiatric help (ashamed to tell you that, but true) to start understanding maths. Before I got extreme anxiety when someone mentioned math and math scared me. I assume it's because of my childhood and getting yelled at and spanked with belt if I didn't understand something. I was even scared to learn maths. I still am scared. We don't know OP's story. There are many reasons why people might be bad at maths. In social classes I was taught that some people are raised like: "Oh, your grandmother and mom were bad at maths, so you are too" and therefore you give up in your mind before starting.

I had a classmate that was good at maths (really was), but failed the exams every time due to anxiety.

If you really need math daily and it disturbs your life, you might have anxiety and may be psychiatrist can help you as well.

I wish you all the best.

1

u/pancakeQueue 8h ago

I wouldn’t say I use math a lot for my job, even before Claude as libraries did all the heavy stuff. However knowing math means when solving problems you can usually find an optimal or less complex solution faster. As an example one of the advent of code problems (I don’t remember which) is trivial if you know taxi cab geometry, otherwise you may spend hours longer more convoluted solution.

1

u/oldsecondhand 8h ago

For your average line of business software highschool math is enough*. If you want to work in cryptography, computer graphics, robotics or machine learning, you need a lot of math.

*unless you need scaling, then you'll need some discrete math and algorithm theory

1

u/quickiler 8h ago

It depends. If you do stuffs like data science, game dev, ml, etc then very important. If you do devop, sysadmin, low level, etc then probably less.

1

u/vz0 8h ago

Yes. Math for CS is important! To understand what's going on.

1

u/AdDiligent1688 8h ago

I don’t think it matters much for programming depending on your focus area. If it’s more in the data science / ml / graphics realm though, then yeah probably unfortunately. Maybe not so much doing it manually but understanding mostly, knowing when to use what and why like other specializations.

1

u/W31337 7h ago

Maths teaches you abstract thinking which is essential skill for programming.

Thinking before doing is the most effective trait for programming.

I had to do logic with things like P, NP mappings, natural logical deduction and countable infinite sets etc which took me 5 times to pass because it's fucking horrible. But afterwards I realized it is the most beneficial course I've ever had. Knowing that a problem can't be optimized before building it will make you approach a problem in a whole different way.

So programming at high level is more than just by pumping out lines of code that "just work".

Stick with maths, even Einstein hated maths but built general relativity using it. He had to force himself to learn maths to put out his paper.

The things you hate are the things that will make the biggest impact in your life

1

u/Cold_Mango_9564 7h ago

yes math definitely helps but you don't need to be a math genius to become a great software engineer

1

u/Wingedchestnut 7h ago

You need it for your degree.

1

u/znjohnson 7h ago

It’s very dependent on what programming you’re doing. There is some where knowing the math well enough to tell a computer what to do is important.

There are some things where you might not need it at all.

In my opinion the important part of it is learning problem solving skills and concepts. It helps with logic and reasoning. Your skills may not be the best but you don’t necessarily need an A in every class. You can get C’s generally in classes for a bachelors and move on.

1

u/betarage 7h ago

It depends on what you are trying to do but you can just use a calculator and it's usually not the most advanced maths.

1

u/AlexMTBDude 7h ago

Coding and math are just two different types of problem solving. that require analytical intelligence. If you're good at one then you're good at the other.

1

u/boomkablamo 7h ago

In some domains yea but most don't require anything beyond algebra.

1

u/Super_Letterhead381 7h ago

Logic is generally important in programming. Maths can be important, depending on the field. 

1

u/palmerden5 7h ago

i do small scripts for report automation at work and it's mostly percentages, averages, date differences and checking that two totals match. nothing past school level. what the math module gives you more is the habit of splitting a problem into small steps and checking each one, and i use that daily. so if it's painful right now, i'd treat it as practice for that, not as something you need to be great at

1

u/TeaBurntMyTongue 6h ago edited 6h ago

Will you need to know what a smooth manifold is for software engineering? Pretty unlikely.

But if you can do that level of abstract math, you'll be able to think differently in other aspects. The reason math is hard is that for nearly everyone, eventually you hit a sort of abstraction wall. For some it's grade 10, for others it's second year, etc, but everyone hits it, and it's not the same as say studying for a bio exam. I can read and understand the +1 bio concept instantly. I just have to remember a lot of things.

In math, maybe the next thing just makes NO FUCKING SENSE at all to you. No matter how many angles you attack it from. You don't need to memorize very much at all in math because once you get it, repeating it is simple.

But I make the claim that pushing through that wall will make you better at every other problem solving task.

When I ask my friends working at top level companies what they studied, it's pretty common that they minored in math or physics. They're thinking about things differently.

FWIW, the math classes are way harder than the cs classes generally. Cs has heavier workload, but it's pretty easy stuff incrementally at least.

1

u/YellowBeaverFever 6h ago

Algebra, yes. If you get into designing AI or into data science, statistics is needed. Advanced AI work goes into vectors and a bunch of other math i never took. Video game engines require a ton of math.

1

u/Downtown_Savings_730 6h ago

The actual math doesn't matter the problem solving skills that stem from learning how to solve math problems do. It also depends on what you want to do, algorithmic programmers/finance space will need math in terms of probability, logical analysis and few other concepts. For SWE aside from the problem solving aspect you dont need to know advanced math but you do need to know how to tackle a problem. If you can train your problem solving skills you should be fine.

1

u/StewedAngelSkins 5h ago

It matters in the sense that if you're good at it you will find a lot of programming tasks easier, because it gives you more tools to conceptualize and reason about logical structures. Just to pick a random example: math will give you the concept of "idempotency", meaning an operation which maps to a given output, then continues to map to that same value as you feed the output back in to the input. It's a useful property for things like database transactions. You can muddle your way to the same conclusion without math, but having a broad range of such concepts to draw from when thinking about code (and describing it to others) tends to make your thinking more efficient and structured.

There are also some domains which are pretty difficult to get into without math. I'm thinking stuff like 3d graphics or simulation or compilers or AI.

1

u/Tianshui 5h ago

If you're aiming for frontend, then not really.

1

u/YetMoreSpaceDust 4h ago

I'm going to go against the grain and say that, in actual practice, you won't really use much math, even if you're doing something math-heavy like machine learning. Or, at least, you won't use math in the way you use it in school where you have to work out symbolic notation on pencil and paper to produce a result.

But it doesn't matter if it matters or not because it matters for the degree, and you're going to have to get good at it to finish school. The good news is, it's just a matter of practice - lots and lots of practice. The stuff that actually does matter like debugging and troubleshooting are much harder to practice than math: math has been taught for millennia, so they're really good at distilling it down to bite-size chunks you can easily digest as long as you put some effort into it.

1

u/new_start01 4h ago

I'd say converting between binary and decimal is important, and maybe a bit of hexadecimal if you can. Understanding algorithms fundamentally is also helpful. I recall getting more in depth with machine language and assembly language in my CS undergrad but so far it's been been more logic-oriented in networking at least, which I do now -- outside of subnetting of course (and I haven't gotten into the automation part of my program yet so this may change). I think it really depends what you're programming -- not really a way to escape numbers in general of course but can say there are fields that use programming that do not depend on the whole framework of your code relying on your personal integral calculation or something.

1

u/Affectionate_Pizza60 2h ago

If you are doing ML, then math is important.

Otherwise, "Discrete Math" is all you really need and its main use is understanding some background info needed to understand other topics in cs. Otherwise, being aware of some formulas or results can be useful but not something you are likely to use much in real work.

1

u/shifty808 1h ago

Is this a troll?!?!

0

u/Annual_Berry8043 7h ago

It doesn’t not matter, but it’s not an end all be all. It will help you out a lot, so it’s better to know some.

-5

u/Own_Unit_6170 8h ago

Math is completely unnecessary for programming. The belief that you need to know math to be a programmer is a delusion promoted by academic institutions in ivory towers.

The only time you need any math in programming is when you are writing a program to do math. But 99.99% of all software is not math software. It is perfectly possible to write software containing tens of thousands of lines of code without ever once using anything beyond basic arithmetic.

So, don't worry. You don't need any math to learn programming.

And, just incidentally, learning math does not help with problem-solving ability. Problem-solving ability is a talent, not an acquired skill. In addition, solving abstract mathematical problems is very different from solving the practical problems that arise in programming.

2

u/badcodenolatte 6h ago

I disagree with a lot of this but especially with the idea that problem solving is an innate immutable talent, that’s nonsense

0

u/Own_Unit_6170 5h ago

Programming is like composing music: anyone can learn to do it, but only people with a talent for it are good at it.

1

u/badcodenolatte 5h ago

Talent is a head start but not the whole battle. Hard work is what gets you over the finish line.

•

u/StewedAngelSkins 52m ago

This is circular reasoning. Musical talent is only observable as "being good at composing music", so you're essentially saying that only people who are good at composing music are good at composing music.

2

u/chocolatesuperfood 6h ago

I do believe that problem solving is something you can train (but of course you do not need Mathematical language to describe the problems you use to train, but can). Of course, some people have more talent for it, some have less, leading to different learning curves.

A quick search on (scholarly) articles on teaching problem solving skills seems to back up my intuition: https://pubs.sciepub.com/ajap/4/1/1/index.html

0

u/Own_Unit_6170 5h ago

You can teach such "skills" by rote memorization. That's why AI systems work. But outcomes still depend mostly on talent. AI doesn't have talent, so it uses brute force.