Ask HN: Is learning math useful to be a good computer scientist?
A few days ago, I read that math is not that much important of you want to be a computer scientist.
I read this sentence as a provocation and caught me so much that I'm still thinking about it.
I studied math and computer science and I strongly believe that having a math background helps you a lot to reason about a problem and formalize the solution. I do believe math can help you to implement some clean code, e.g., that solves a problem without a bunch of if else statements (or to identify state machines where they are not so easily spotted).
In my experience, math helped me a lot, even though so far I never implemented compilers, interpreters or defined new languages (tasks where most of scientists agree that having a math background helps).
What do you think: is learning math useful to be a good computer scientist?
67 comments
[ 3.9 ms ] story [ 149 ms ] threadEven if you don't apply math knowledge directly in your profession — this is one of the best way known to humanity of teaching your brain abstract thinking, logic and reasoning.
And CS is the field where those 3 things are the core of profession.
But learning math (any math) is crucial.
It doesn't mean everyone need math logic to succeed in life, but hi quality logic is critical for CS professions.
that's not math
The "logic" that most people use for reasoning comes from philosophy, not formal logic.
Luckily we're very well paid bricklayers...
Yes, of course! Is it the best way to spend your time having the goal in mind? Maybe not.
The issue with "learning math" is that there is more math being created than you are able to learn.
"a good computer scientist" is very broad.
Does it mean "a good 3D engines programmer" - then probably you want to know linear algebra, things like quaternions etc.
Does it mean "a good browser front end developer" - then probably you want to invest your time somewhere else, maybe web design, learning how to sketch.
In the academic sense of the word, and in "low level" software development fields like game engines, databases, systems, embedded, etc knowing math is invaluable.
In "high level" software development like web frontends, apps, scripting and automation math is not essential. Knowing math helps but it's not a requirement.
Something has always irked me about the broad use of terms like Computer Scientist or Software Engineer. For example, I have a bachelor degree in "Applied Information Technology" with a focus on software development. Math was never a priority in my education. From age 16 until I graduated at 22 I never had more than 2 hours of math classes in any given week.
I am not an "engineer" in any way and I don't call myself that. But when I describe what I do (mostly backend, api, cloud architecture and systems programming) I somehow always get lumped in the "software engineer" category.
The same way as data scientist position has mostly nothing to do with publishing in peer reviewed venues with high impact factor.
Also people in this thread seem to think a "computer science" undergrad degree is somehow related to computer scientist the working title. My understanding is that you start the pathway to a science career with a grad degree, like you start an engineering career with a job. Before the job or the grad degree you're no engineer/scientist
However, it's also important to note that the overwhelming majority of developers are not computer scientists. You don't need particularly good math skills to write software. Most developers aren't doing things like implementing compilers, interpreters or defining new languages. If your job is essentially taking input events, figuring out what they mean, putting the result in a database, and then pulling the data out and displaying it in a specific format on request, then you can get away with very little math at all.
But computer science isn't (just) programming. Many areas of discrete mathematics are highly applicable to the field of CS. Particularly number theory, graph theory, probability, combinatorics, logic, and set theory. And those are just the discrete math topics I've used in my own career (which isn't that long, approaching 15 professional years).
Algebra, calculus, linear algebra, and trigonometry have also been part of my work, though that's been more as a programmer than as a computer scientist (translating mathematical formulas and such into code).
I would argue that there are large tracts of computer science that are indistinguishable from mathematics and so learning math is critical.
I would argue in the affirmative for learning math for computer programming even though I agree that the utility is debatable. Software architecture is more akin to engineering or even construction...math might underpin those areas and may even be needed but often many people in those fields get by without deep math knowledge.
Increasingly it's becoming more of a good idea to have some math knowledge with GPUs, neural networks, machine learning, etc. but as with many deeper mathematical concepts, they'll no doubt get "black boxed" into something more digestible for people who don't want or need a deeper understanding of the inner workings.
My favourite example of this is graph theory, which you can find deep applications of just about anywhere in programming.
That's already happened. My wife teaches data science, including machine learning, and it's always surprising to me the extent to which modern industrial practice is about picking the right pre-coded tools from toolkits and combining them. Even though such would be up her alley (she has a PhD in astrophysics), in seven years of working in industry before teaching, she never had to translate from math to code (which I did a lot of earlier in my career).
As being merely a programmer myself I would say both are important. The first as a fundamental thinking tool and the second depending on a project.
But that’s only one part. In some of Alan Kay’s recent talks he emphasized the importance of combining math, science, engineering, art and something he calles tinkering. I think craftsmanship ought to be in there too, or maybe that is between tinkering, engineering and art?
In any case I’m not sure, whether he addresses mere programmers with these. But thinking about the possible application of these concepts to any given project or creative activity really helps.
So yes, I think mathematics is important, but it’s also just beautiful and fun. There are also many ways to learn it, from historical to visual and practical.
A lot of "skills" talk seems to be oriented towards justifying hiring underskilled people in IT, that's probably where this also is coming from, more HR babble than anything else.
Some of the smartest computer scientists I know are just horrendous engineers (what's worse a lot of them lack awareness and have big egos and insecurities to boot). They seem to see code as a means to an end, and they only know how to think in terms of some primitives, and lack the ability to think in bigger pictures.
On the other hand one of the best engineers was one who didn't study math or computer science in his career. He designs elegant/simple systems that have maintainability and DX baked into them.
Of course this isn't a rule, just anegdota.
If you enjoy solving puzzles, might that indicate you'll enjoy programming?
Want to do incident response to figure out which 15 factors came together in perfect harmony to take down the site for 6 hours? That's a lot like puzzle solving imo.
Want to do security "research" (aka find vulns), i think that is a lot like puzzle solving.
Normal programming? Not so much. Maybe if you are debugging a complicated bug.
But math can open up lots of new domains for programming, and extend your abilities.
I'd argue you're pretty limited to boring software without it.
Ironically, most scientific computing pays less than b2b or b2c. I think finance is where money is(sic).
At the very least, knowing maths gives you a new perspective in tackling the problems you face even on boring CRUD apps.
Having said that, I personally waved goodbye to academic computer science after I finished my degree. I work as a software engineer and I find software engineering to be very different discipline to computer science. While mathematics has proven useful to me on occasion, I'm of the opinion that I'd be able to do much of what I do day to day without much in the way of advanced mathematics. Much, but not all. When one encounters certain types of problems, for example problems around performance, I find it helpful to be at least _acquainted_ with mathematical tools that can help, even if my mathematical chops are not as strong as they used to be.
Wanna make some react app look pretty? Not so much.
At least four things come to mind:
(1) Basic ability with arithmetic and algebra (simplifying equations etc.),
(2) Gifted with numbers; ability to do calculations quickly in the head, strong intuition etc.,
(3) Fluency in the language of mathematics; ability to communicate with other mathematicians and evaluate literature for new results,
(4) Creative ability required to produce proofs of new results.
A mathematician is primarily concerned with (4). This almost certainly requires good grasp of (1) and (3) as well and possibly (2) as well.
A computer scientist in the academic sense is actually a mathematician, so it's the same.
A programmer is where it becomes more fuzzy. I can say with certainty that (4) is not necessary, but I think (1) is necessary. I mean, I don't think anyone seriously believes a programmer doesn't have a basic "high school" ability with numbers do they? As for (2) and (3), no I think it's clearly not necessary, but it's definitely useful, and in some ways inevitable, depending on which area you go into.
There is also some extension of (1) that is particularly useful for programmers. Obvious examples are Boolean algebra, discrete maths (like modular arithmetic) and base systems (binary numbers). It's all useful. Not necessarily every day, but it's inevitable that they will become useful eventually (or you will have to learn them).
Sure there is some, but it is all easily learned on a case by case basis without a heavy math background.