Programming is very different from and far more useful than what they call "math" in school, but basically any analysis of your program or of possible improvements is going to involve methods and knowledge that people called "mathematicians" and "computer scientists" happen to be very familiar with.
I always say that the best education I got for preparation for programming, was good ol' Algebra 2.
Depending on what type of programming we do, other math disciplines can be extremely useful, but A2 was what taught me how to do things like refactor, use variables, functions, and balance; all skills that have direct analogues in general-purpose programming.
[EDITED TO ADD] Also, stories. Word problems were very important.
The article claims you can figure out the almost correct answer to the Monty Hall problem by running simulations hundreds of times instead of doing the maths (and the same for coin flips).
My problem is that it still relies on some mathematical intuition - that large sample sizes approximate the true distribution. Similarly bad intuition (like the gambler's fallacy) could easily be coded.
I agree that formally calculating the probabilities isn't necessary if you have the right intuition. But I believe getting good intuition is the result of training on problems (and then you can learn how to formalise it - which is the easier part).
Edit: Being good at mental arithmetic isn't necessary for programming, but being good at mental arithmetic isn't necessary for working as a mathematician either.
I don't think that there is any mathematical training needed to gain insight from running repeated simulations.
The only intuition you need is that you can become better at the game by practicing. This is a good (if optimistic) belief to have as a default. Then it's just a matter of playing over and over again and keeping score. It doesn't even have to occur to you that the strategy can be automated, you can play yourself. Just doing this you could build intuition for the best strategy the same way that most people can learn to play poker or dice.
You can say that the brain or learning process or whatever is obeying mathematical laws, or has learned a mathematical fact, but that's not the same thing as doing math or thinking mathematically.
This never made any sense to me. Why are so many programmers math phobic? You'd think an interest in math and an interest in programming would go hand in hand, especially since they aid and abet one another so beautifully. My programming got way better the better at math I got, and vice versa.
i've been ~15 years in the tech industry, working as swe. I recently purchased 15 books on from proofs, calculus, linear algebra, real analysis combinatorics, diff equations to self-study math. Yes, you almost never need to use anything beyond basic math, but there's so many things to learn. And math is fun, I miss my university days.
I think a big part of undergraduate math is theory/abstraction building, which is usually very different than the activity of programming. I've studied quite a bit of math, so I can appreciate both. But I can definitely see why the former drives people away.
The huge problem that I have with this post is that they are trying to use math to disprove math, but badly. Also, they are using a programming language, python or any language for that matter, to prove their point, which is ALSO math. When you program you are working in an axiomatic system to achieve some goal. This goes all the way back to Haskell Curry and Alonzo Church which WAS also math. Working with math is a way of thinking and working on problems, even in probabilistic realms that errant post suggests.
Math in programming is not about math, it's about careful reasoning.
Yeah, sometimes it helps to actually know math, but even when it doesn't there are some concepts that come from math and are super useful, for example: commutativity, associativity and idempotency are really useful for building robust distributed or parallel systems.
Building robust code by construction from properties of earlier code, like a proof is a great skill to have.
Making things that compose well... there are a million examples.
I mean, yeah, you can be a mediocre programmer without math but I wouldn't brag about it.
I think about this very often and was thinking to write an article about this for years, and today too. Good that someone beat me to it, now I don't have to.
I was repeatedly told in school that math is a very important skill to possess as a programmer even though the teachers never wrote a line of code in their lives. This would be one of its main points. Where the hell do people get this idea from?
I worked a bit on formalizing math using assisted theorem provers, and found that good theorems are basically well coded functions. I think both the perspectives complement each other well. The added advantage of knowing math allows one to write provably correct functions, finding their runtimes etc. In this age of LLMs spewing code, this probably is the best trick a programmer can have up their sleeves.
Being a good programmer requires thinking about things that, whether you realize it or not, are math problems. Things like managing complexity, or analyzing a program to understand what it even does. You can get pretty far just with a strong intuition, but stripped of all the syntax and culture around programming, what you're dealing with is, like, graph theory, and combinatorics, and stuff. If you recognize the concepts then you can reason about systems at a higher level and save yourself a lot of trial and error.
Or: You don't necessarily have to take math classes to be a good programmer, but the skills that differentiate a good software engineer from an LLM (previously 'code monkey') happen to correspond to things that mathemeticians would recognize and could give you a word for. This CoRecursive episode comes to mind: https://corecursive.com/050-sam-ritchie-portal-abstractions-...