Hacker News new | ask | show | jobs
by tzs 5046 days ago
What math do you think one needs to learn to be a programmer?

To be a good programmer, you need to think in a somewhat mathematical way at times, but you almost never actually need to know math beyond the elementary school or early high school level.

There's was an interesting essay in the Notices of the AMS a couple years ago called "What is Mathematics For?" that explored the widespread belief that high school math is an important job skill. The conclusion was that it isn't for most people. However, learning high school math teaches reasoning, and that IS an important skill--so even though most people won't have any use for the math, math classes are important. Here's the essay: http://www.ams.org/notices/201005/rtx100500608p.pdf

I think the same applies for programming. You need to be able to reason, and learning some math is probably the best way to pick up those reasoning skills.

5 comments

That really depends on what type of programming you're doing and the platform you're developing on top of. If you're doing a crud app in rails, I'd agree with you math itself is pretty much useless after knowing the core operations (add, subtract, etc...). But the moment you're dealing with lower lever programing, creating or implementing algorithms, managing memory, etc... understanding more advanced mathematical concepts starts to shine as a necessity more than an option plus. Actually, if you're developing a rails application for the financial or analytics sector you're most definitely benefit from knowing advanced math and having done a course or two on statistics.

Let's be honest, if you're creating an application to improve or help accounting of a business, you need to know accounting. If you're creating an application for banking and finances companies, you need to know financial math. If you want to make an app that converts a business' Excel data into complex charts you need to at least understand statistics and more complex math than the 15 year old learns in school. Don't even get me started on a program that draws graphics programmatically and the need for some trigonometry in there.

Lastly, though I do a lot of backend and sys admin stuff because of the nature of my speciality at work, I spend half my time doing frontend programming and css (thank god for sass), and if I didn't have knowledge of algebra and trig I would take at least half as much time to do what I do. I know (and work with) a bunch of great programmers, but I'm still the guy people go to at work for mathematical advise when al algorithm is not behaving as it should and it mathematically complex.

I'm not trying to argue with your point though, most of the time you don't need those advanced mathematical concepts, and the important part of learning math is the reasoning aspect. i completely agree with that. Nevertheless I've found that advanced concepts can speed development and in some cases having that knowledge can make or break a project.

I majored in math as a undergrad. One thing that got hammered into me by the professors whenever the career choice subject came up was that math is not a vocational training bur rather it's a training of high level abstract thinking and reasoning which can open up a number of career choices. It's a training of ability rather than knowledge. You might forget how a theorem proof work or even what that theorem is but you will remember the problem solving process.

As a proof they showed us the list of math graduates who became lawyers, economists, statisticians, teachers, writers, business admin, and of course computer scientists.

The subject of math reminds me of a recent encounter with a client. We had a business requirement meeting. It's not software development related, not even technically related. It's purely for me to understand their business, processes, and business rules.

One of the important business rules came up in discussion and they were arguing among themselves what's right or just trying to convince each other what the complicate rule really is. I was like, it's just a simple set of formulas if the problem was decomposed into smaller steps. After I told them about it, they were like, oh yeah, it's that simple.

The resulting math were very simple but the process to derive those was greatly benefited from higher level math training.

I had a teacher in college that was discussing the math requirement for the programming classes he taught. I was at this point past the classes being discussed. His reasoning for wanting, I think Algebra 1, for Intro to Programming (C++ at the time), was not because the actual math was used in the class. He wanted, as you said, to ensure the students were capable of mathematical reasoning.
I think it would be interesting to see the same concept applied in the reverse; i.e. have a programming requirement for math classes.

At my university, there's always an embarrassing number of Algebra 1 sections under the math dept every semester (I'd even say that just the Algebra 1 & 2 offerings make up about 30-40% of their total sessions some semesters). And if I hadn't seen some of my friends tutoring student's in those classes, I wouldn't have really believed there was a necessity for so many sections, but now I do.

People just seem to have a really hard time extracting the concept of 'thinking mathematically', from the act of doing math itself, and I'd say it's because it is so abstract; once you go past basic money/counting scenarios, the real life analogs start to break down for most people, and all they see is numbers, symbols, and mysterious rules.

Programming on the other hand, while still pretty tough to grasp if you're new to that way of thinking, seems like it might be a gentler intro to me. Not only does it tend to have a culture of more intuitive naming schemes than math, and have a faster feedback mechanism (i.e. a REPL/compiler checks your code as opposed to a math teacher), it also makes modeling more real world systems really easy early on (so people won't feel bounded to just money or whatever as their anchor back to reality), especially if the course goes into OOP at all before it's over.

> you need to think in a somewhat mathematical way at times

This is the essence of mathematics; all else is commentary (er, details).

That may be, but it is not the essence of mathematics classes, in which a good deal of rote memorization and continuous practice of specific systems is required to pass.