Live data from Hacker News

Ask HN: Math for Programmers?

news.ycombinator.com

1–10 of 46 posts

Ask HN: Math for Programmers?

#1
What do you think it's essential math a programmer should know?

I've learned higher algebra, calculus, some geometry which was eased by the already known algebra, number theory, probabilities, combinatorics, graph theory, statistics, formal language and automata theory, and that's mostly it. Most of my CS courses in university required some kind of math which we previously did.

I can't say I remember all I've learned but I can recall things if needed.

It was a thing that programming languages were explained in terms of formal language theory, plus some algebraic constructs. Now a days whenever I read about a programing language, I read about mostly category theory or functional theory and it mostly doesn't make sense.

So how hard or how many math domains should one learn to be able to understand all major CS theory?

Re: Ask HN: Math for Programmers?

#2
Depends on what you mean by major CS theory? I have sadly learnt that Software even at a high level at a big company mostly doesn't need any math skills beyond max high school math.

Off course there are exceptions. But mostly there is not much essential math a programmer should know.

Re: Ask HN: Math for Programmers?

#3
If all you are doing is programming of the everyday industry sort, none. You can have a fruitful interesting career from frontend to back without thinking about formal math at all.

If you want to start specializing in graphics or designing languages or algo, then, yeah, you'll need math, but at that point, you'll know what math. No need to learn it beforehand.

Re: Ask HN: Math for Programmers?

#7
Ok, given your university background in CS, it sounds like you have a good base of understanding. I think there are many narrow verticals, but I think you're through the base of understanding. I think people can answer specific questions, but not more general ones.

Traditionally, try response would be: have you taken databases, compilers, operating systems, or more extensive computational complexity theory. Honestly, the complexity theory enables napkin math for quick mental, or mid-discussion, feasibility arguments.

I would recommend AI and ML familiarity, including transformers, which I view at first glance as an interesting amalgamation of applied statistics and computational complexity. Numerical stability was (and is) a hard problem about practices needed to get consistent and useful results from numerical algorithms.

I think your bases are covered. It sounds like you know what you don't know. I might recommend collecting interesting problems, and learning how knowledge from each of those fields contributes to solving a class of problems, quickly, easily, simply, or efficiently.

What do you hope to do, to direct your mental energies toward?

Re: Ask HN: Math for Programmers?

#8
Depends on the domain you’re going to work in. Nobody understands all major CS domains in depth - you typically specialize and dive deep in the relevant area. It’s like any other field: no physicist knows all major areas of physics, no mathematician knows all major areas of math. Perhaps 50 years ago when the field was really new it was possible to understand all of CS, but it’s a big field now that covers a really diverse set of topics that each are relatively deep.

Even then, you often don’t need to dive deep into the math unless you’re a working researcher for the most part. I work in languages research, and to be honest, for most of the work you don’t need to dive deep into type theory or category theory (regardless of what some internet people would lead you to believe). You generally only need to dig deep into those if you find yourself working in foundations topics where they play a strong role.

Re: Ask HN: Math for Programmers?

#9
Category theory has very hard definitions and not many theorems. Would not recommend. It has Grand Unified Theory vibes so pseudo intellectuals have a hard on for it.

Don't waste your time trying to understand people who write to make themselves sound smart. You aren't missing out on anything.

Here is a recent article from TOPLAS, imo a top programming language journal. No category theory here...

https://dl.acm.org/doi/10.1145/3564619

Re: Ask HN: Math for Programmers?

#10
The average programmer could probably get by with high school maths and just enough college-level statistics to know the difference between mean, median, percentile, and standard deviation.
Post reply on HN