What do you think are the best branches of mathematics to learn programming fundamentals?

After starting a course on JS , and using this website for a while, I realize that having some more maths under my belt is going to be a great help… I was never good at math in school and would consider myself very bad at it to this day, (maybe for lack of interest and practice, maybe from being slightly numerically dyslexic), but like I said, I also never had any interest in it, today as a 31 year old I see that it is universal and revolves around everything I have been fascinated with my whole life. (computers, programs, games, puzzles) So I recently purchased another course on linear algebra, to work through after I have the fundamentals of Javascript and coding down, so that it may compliment what I one day learn… Are there any other branches of skills or mathematics/problem solving that can greatly improve my ability to one day become a great programmer? It is definitely something I am going to be studying from now on, even the base fundamentals like learning to multiply in my head better, and algebra.

1 Like

I don’t know what level of math you studied in school or how well it stuck with you, so I’m just going to say “basic algebra”. The ability to abstract both values and functions is what a lot of people struggle with when learning both math and computer programming. If that’s way too basic for you and you’re looking for a college level course, then I’d look at the material covered in “Discrete Mathematics” courses. That’s probably the most directly relevant to programming. Linear algebra is good if you’re planning on doing a lot of graphics work (you’ll want a strong calculus foundation for that). If you do have calculus experience, you might want to revisit physics because it also depends on turning models of systems into a relationship of functions.

2 Likes

I’m just like you, I’m not that great with math and on top of that I hate math. Luckily you can be a pretty good programmer without being that good at math, as the most common math you will run into is very specific to CS.

  • Discrete mathematics - more or less math that goes into concepts like graphs, and sets. The concepts in discrete math are basically everywhere when it comes to programming. Even if you never formally learned any of this sorta math, you’d end up learning the concepts from programming.

  • Boolean Algebra - its normal algebra, except you only have 1 s and 0s, basically the sort of stuff you need to know when dealing with conditionals in programming. Again even if you never directly studied or even know about these concepts, you’d learn them through just programming.

  • Algorithms/data-structures - Not sure if you would want to call this math, but it sure as hell feels like it haha. Knowing the difference between bubble sort, and merge map is important but not as important as being able to understand how “fast” a piece of code is. Knowing how a piece of code will scale when inputs get large is more or less the difference between code that does something in a few milliseconds, and hours.

There are plenty of resources out there that go over what a formal Computer Science education gives to you. Its the sort of knowledge that isn’t as flashy, but its the knowledge that underlies most of what the average programmer will need day to day regardless of use-case.

Here’s the one resource I usually give as its pretty extensive and has been around for a while: https://teachyourselfcs.com/

Goodluck!

2 Likes

As a professional computational mathematician (basically a math guy that writes big math codes), I’m going to strongly agree with algebra.

I wouldn’t worry about mental ‘math’ so much. Math is not calculation of numbers. Mathematics is about using a set of symbols and a language to representing reproducible processes for reaching a result from a set of inputs.

That sounds a lot like programming, right? There is a reason why early computer scientists were mathematicians.

Algebra and Linear Algebra are a great place to focus on the process of abstractly reaching a result from a set of symbols (variables) that represent an input state.

3 Likes