Jump to content


Photo

Math for programming


  • Please log in to reply
4 replies to this topic

#1 shiner

shiner

    Member

  • Members
  • PipPipPip
  • 469 posts

Posted 04 June 2008 - 04:32 PM

In order to be a top notch programmer/software engineer obviously some math knowledge is needed (linear algebra, boolean algebra, etc). But how much time should be spent on math in general? For example is Calculus III and Statistics important enough or is time better spent in other areas? How about differential equations or combinatorics? I'm just asking because it's impossible to be an expert on everything, and in my opinion you really have to focus on what helps you most as opposed to deviating in many areas.

#2 Sip

Sip

    Buffet Connoisseur

  • Members
  • PipPipPipPipPip
  • 8,366 posts
  • Gender:Male
  • Location:Online

Posted 04 June 2008 - 07:27 PM

Combinatorics is a MUST. You have to be very good at counting smile.gif Combinations and permutations show up in all sorts of ways in many many algorithms.

Statistics is good to know. More importantly, have a firm grasp on basic probability. Again, this is something that will come up in various shapes and forms when you start programming.

The overal main branch of mathematics that is most useful to almost anything computer related is "discrete math". Solid knowledge of discrete math will make things very easy. So if you have a choice between taking advanced (e.g. multivariate calculus) or differential equations vs some discrete math class, definitely go for the discrete math.

Boolean algebra of course ... linear algebra perhaps (will depend on if you work on something that uses it).

With linear algebra, matrices, calculus, differential equations, complex analysis etc etc ... it's always good to know the basics but not being expert in those areas will not necessarily hurt you in terms of programming. You can always go and study the details of a certain math technique if you need to implement it but that knowledge will not make you as good a programmer as the other topics (such as understanding permutations, combinations, counting, and logic).

#3 Sip

Sip

    Buffet Connoisseur

  • Members
  • PipPipPipPipPip
  • 8,366 posts
  • Gender:Male
  • Location:Online

Posted 04 June 2008 - 07:31 PM

As far as "how much time", I think one class on discrete math and one class on statistics is good enough. Basic calculus goes without saying as I think that should be required for everyone. What you really need to focus on are algorithms and data structures.

There are then some specialized computer theory courses that will go a long way to make you an all around much better programmer (aka "automata theory") and having knowledge in compilers and anything hardware cannot hurt.

Actually, believe it or not, I think hardware knowledge is more important to make a good programmer than very abstract theoretical knowledge! I see "computer scientists" all the time that really have NO clue how real hardware works. And in the end, any software you write is NOT going to live in some abstract space .. it's going to RUN on REAL hardware hopefully smile.gif

#4 Sip

Sip

    Buffet Connoisseur

  • Members
  • PipPipPipPipPip
  • 8,366 posts
  • Gender:Male
  • Location:Online

Posted 04 June 2008 - 07:40 PM

Oh one more thing .. there is also an area which I consider to be CRUCIAL for a good programmer ... and that is "numerical methods". There is regular math where everything has infinite precision. But then there is real-life computer math where verything has very fixed or finite precision. The way you do math (or compute anything) on a computer is VERY different than you do math on paper.

For example, think of how you would normally evaluate a polynomial:

F(x) = an * xn + an-1 * xn-1 + an-2 * xn-2 + ... + a1 * x + a0

I think you'll be shocked to know that the way you would normally evaluate that polynomial (given the coefficient a's, and a value for variable x), is one of the worst ways you could possibly do it on a computer. biggrin.gif

#5 shiner

shiner

    Member

  • Members
  • PipPipPip
  • 469 posts

Posted 04 June 2008 - 11:16 PM

Thanks Sip! Good points!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users