Recommended Math knowledge for programming

I wasn't sure if this is a math or programming question so I suppose I flipped a coin.

I'm just learning programming thanks to my IT Support degree and was just wondering what the minimum recommended level I should try and get my math up to would be.

I know the Math class in .NET gets rid of a desperate need to be Math proficient but I'm sure it would help. So far I have a secondary school level math education (up to 16 years of age) but that was 16 years ago.

Thanks.


Solution 1:

In his famous essay How to Become a Hacker, Eric Raymond says that you need basically zero mathematical training. Now this essay is talking about hacking as in writing open-source system-level software; for example if you wanted to write a disk backup utility or a network monitoring program.

The range of software can vary from fairly straightforward (web page scripting) to very complex (airline reservation systems), with a rich spectrum in between. For most of it, you don't need any math training at all. However a few points:

  • I can think of no instance in which having some mathematical training hurts you. Math teaches us how to think carefully and critically, which is a central skill for good scientists, including computer programmers. We still require calculus, linear algebra, and discrete math classes for a B.S. in Computer Science for a reason.
  • There are programming careers where math knowledge is essential. These include most HPC jobs, optimization, physical simulation, cryptography, finance, weather forecasting, traffic routing, etc
  • If you want a job at a top-level place (eg, Google) you will be expected to know something about math. Or rather about complexity, data structures, and algorithms which really are math. For example, if you don't realize that your algorithm running in $T(n)=2T(n/2) + O(n)$ is considerably faster than another running in $O(n^2)$, then you will probably be shown the door.

Even working as a database developer years ago, I found my math training useful (I had to implement arbitrary-precision arithmetic in software for the DECIMAL datatype that is part of standard SQL... doing division correctly and efficiently is non-obvious).

Finally, a lifelong passion for math has helped me engage better with like-minded programmers. I don't find as much affinity with coders whose preoccupation is minutiae about syntax or language fads. The beautiful part of programming, at its core, is really just mathematics.

Solution 2:

If you are entering a field such as finance, game development or other heavily quantitative area then the more math you know - especially applied maths such as statistics, probability, computational geometry, etc - the better. Basic knowledge of set theory will also help if you plan to do database application development. On the other hand, if you intend to develop typical business applications then you will find very little direct application of mathematics beyond simple arithmetic. You will find though that serious mathematical training will significantly enhance your thought processes and analytical capabilities. Compared to mathematics, general programming is truly childs-play. I have developed professional business applications for over fifteen years and I can count the number of times I have directly applied mathematics on one hand; but, I use the basic skills I developed while earning my undergraduate degree in math every day. So, bottom line, if you want to be a programmer, you can't go wrong learning math - any kind of math.