Live data from Hacker News

How much math you need for programming (2014)

lispmachine.wordpress.com

21–30 of 187 posts

Re: How much math you need for programming (2014)

#21
It depends on the scale and latency requirements: for a startup creativity and pace of execution/person is the most important (just like Facebook in the early times).

But when you're working on a huge project with many people and many users, lots of data (while slowing down the number of new features), math gets very important for modelling the behaviour of that huge system and getting every extra $$$ out of the network effect.

I myself love math, and a very bad fit for small companies, while people who just like to get dirty in throwing together features thrive there.

As an example Facebook was dropping messages for a long time, and when Google started Google+, Facebook got serious in fixing bugs with consistency of its features, and started to focus on latency (using Google hires of course).

Re: How much math you need for programming (2014)

#23
There are two different problems actually : what you write, and the quantitative aspects of your code.

What you write may or may not have a strong maths component ( game engine vs crud app say, or PDE solver vs typical 'plumbing' app).

However, the moment you start having performance issues (and this is everywhere), maths comes in very handy : big o, back of the envelope calculations, orders of magnitude, etc. You may call it engineering (and to a large extent it is), but I tend to lump quantitative reasoning on the math side and not on the compsci/engineering side. It's not necessarily extremely sophisticated, but having a 'quantitative view' of your code can help a lot.

I remember many many years ago developing a sudden interest in algorithmic complexity (and what quadratic meant..) after having used a bubble sort to sort polygons in my 3d engine. Needless to say, log became a fairly interesting function after reading a bit more on sorting!

Re: How much math you need for programming (2014)

#24
You need all the math for the domain. If you are in engineering, games, DSP, ML, then that can be a lot. At the same time some developers can go a whole career without ever (knowingly) using a floating point number. They work with web sites/services/databases/apis etc.

But developers should at least know basic calculus, logic, and what what you need to grok basic algorithms and data structures. That part of math isn’t even meaningfully separated from “programming”. It’s one and the same. Programming is math. Math isn’t just a useful skill that some times pops up as useful. Without math, programming is merely typing.

How much English do I need for writing?

Re: How much math you need for programming (2014)

#27
The question seems a bit backwards to me (who come to programming from maths). I am more familiar with the opposite question "how much, if any, programming do you need for math?" Every year I meet lots of math students who love math but hate the very idea of programming, as if it was a dirty and unnoble thing to do. I have to convince them that sometimes it may be useful for them. The best course of action is to start by offering the game: "you don't need any programming for math, except in very particular cases". This gives them a clear starting point where they feel safe. Then we work from there, showing them inductive experiments that would be impossible without computing. For example, it is well known that Gauss would check, by hand computation, many theorems about prime numbers before attempting to prove them. This entailed many days of tedious hand computation that he was very proficient at. Today, most of these experiments can be programmed in a handful lines of code and the computer verifies them in a second. Then some students are eager to actually see these lines of code, but more importantly, to see their result.

Re: How much math you need for programming (2014)

#28
> Now what does does a mathematician do? He tries to understand nature and uses mathematics as a language to do that.

I would argue that this is wrong. That's what physicists do, not mathematicians. Mathematics is about abstract ideas, which can live regardless of nature or application. Physics instead is about understanding nature. Most physicists use mathematics to do that, but that's just for practical reasons. They don't always take it for granted, there's a very famous article by Eugene Wigner on this: “The Unreasonable Effectiveness of Mathematics in the Natural Sciences”.

I think it's important to understand this. Sure, computer programming is not math. Physics is not math either. Mathematics is kind of a way of thinking, and mathematical language turns out to be very useful in describing and understanding nature and many other things. Computer programming theory stems out of mathematics, but I agree that everyday programming practice does not strictly require an in-depth math knowledge.

But it depends. One day you wake up and you want to solve a problem: sometimes you need programming, sometimes you need math, sometimes both, or maybe you need some business experience, psychology, whatever. We need different perspectives, I don't think we can compartmentalize these things any more.

Re: How much math you need for programming (2014)

#30

Programming is not math. Computer science however is based on boolean and predicate logic and borrows requires mathematical thinking and methods as well. That being said I don't find the basic algorithmic analysis stuff very math heavy unless we go into induction and analysing recursive functions. That being said some domains equipment require a fair bit of maths. Currently working on a game engine and trigonometry a…

Hm. To me programming is a subset of mathematics. You are right it is not math, but its origins are definitely mathematical. There was Alan Turing who built the first computer to decifer nazi communications. But the axis too used "programming", by calculating optimization algorithms to determine rocket trajectories... Of course there is more too it, but an understanding of mathematics is good for any programmer.

Yes I agree with you but I like to make the distinction between computer science and "programming". I.e the study of computer programs and algorithms is absolutely based on math but most of every day programming isn't really focused on that. As in when you write your business logic or UI code or whatever there's not that much math per se related to the software itself more just the domain math if any.
Post reply on HN