Jump to content

Do you need to be good at math to be a good programmer?

- - - - -

  • Please log in to reply
8 replies to this topic

#1
Visionist

Visionist

    Newbie

  • Members
  • Pip
  • 2 posts
I'm currently 15(though, almost 16) and I've been wondering about this before I really try to get into programming. Do you need to be good at math to be a good programmer? I've never really had any troubles with math in school, I do pretty well with it actually, but I have never been one that could do very complicated equations in my head. I do a lot better with writing them down. What are your opinions on math and programming? Can you be a good programmer if you are just average with math?

#2
debtboy

debtboy

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 916 posts
I'm sure you can... (I am a Sys Admin now, but used to be a ".net" programmer)...
honestly, I've never needed more than Algebra in my applications.
In my experience, corporations need database information in many different formats.

IMHO...
If you can embed SQL in a web based language..., you are 1/2 way there ;)

#3
Milyardo

Milyardo

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
Before I answer your question, I'll first operationally define my interpretations of few assumptions in your post. First, by "good programmer", I will assume you mean a programmer is considered to be above normal in regards to competency by his peers, as opposed to one who is functionally successful at completing required his assignments. Second, I'll assume "good at math" to mean to have a solid understanding of mathematics as required by most undergraduate level computer science courses.

I would argue, that in order to be considered excellent in the computer science, a solid understanding of mathematics is required. Without a solid understanding of required math, you'd have difficulty implementing any of the following in a efficient manner:
  • Any network routing or packet queuing - Number Theory, Recursive Theory
  • Interprocess communication or synchronization - Finite State Machines, finite automata
  • Implement searching and indexing of a large structure - Discrete Structures, Set Notation
  • Number Sequencing or generation - Discrete Structures, Set Notation
  • Cryptography - Number Theory, Recursive Theory, Discrete Structures, Set Notation, Multivariate Calculus
  • Graphics - Discrete Structures
  • Synthesized or Analog Sound - Trigonometric functions, Discrete Structures, Multivariate Calculus
  • Lossless or lossy data compression - Discrete Structures, Number Theory
  • Device driver development - Finite State Machines, Finite Automata, Physics(the application of the required maths, ie Multivariate Calculus)


#4
Revolt

Revolt

    Programmer

  • Members
  • PipPipPip
  • 99 posts
In my opinion, the greatest asset to a programmer is their knowledge of Logic. A program is nothing more than a logical sequence of commands that build up to creating the result you expect. If you are able to fully grasp the relationships between components and the general flow of the program you'll become quite a competent programmer.

However, and as Milyardo said, once you deviate from the general programming exercises and/or simple programs, you will come upon theory that, by its nature, can be better understood and implemented by knowing a specific branch of Mathematics. This is particularly evident in graphics programming (such as for computer games) where it really helps to have your algebra and matrix operations up to date.

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
From what I've seen, there are a lot of people out there that create perfectly good programs with only algebra and a little calculus for their background. Creating a GUI interface in Delphi or Visual Studio is fairly easy, and basic arithmetic and string processing is similarly easy.

On the other hand, businesses frequently need statistical analysis performed on their data, either in an effort to predict trends or to better understand what's happening. A solid understanding of set theory can make it much easier to work with advanced SQL statements and database design. An awareness of abstract algebra can help with designing classes for numeric representations of data.

So, in short, you can be a good programmer with limited math skills, but the more math you have, the more options you have while programming.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#6
fayyazlodhi

fayyazlodhi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 403 posts
Also there are areas in programming where you are heavily dependent upon math.

For instance, on topcoder algorithmic competitions as well as at ACM ICPC back in the times when i was a student, i remember several occasions when i was left scratching my hair thinking about a problem even if it can be solved. And then latter i came to know that there is a formula in a branch of mathematics whose name i had never heard of applies to that. It is not always the case, but your programming specially if it involves advanced algorithms, data structures etc. is heavily impacted.

When i moved into industry mainly proprietary embedded networking protocols, two domains really pushed me towards improving my math

1. Cryptography and encryption decryption is a lot harder if you struggle with basic maths.
2. Performance tuning of an application which handles traffic in the order of tens of gigs per second with millions of subscribers. There you have to use every principle of maths, hardware benefits to squeeze out required numbers from the system.

I am sure there are a lot of other areas as mentioned earlier by other people too. It is just a question of what sort of industry you work in. Once you get beyond basic desktop / web application development, Math is sure to come across sooner or latter.
Today is the first day of the rest of my life

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Adding to what fayyazlodhi said, and to give more frame of reference to my comments, I've got a master's in math. I used that as the basis for teaching myself programming, rather than the other way around. I've been given several projects for the simple reason that I was the only person on my team who understood the math. I've seen programming libraries that were specifically created to provide statistical routines that most programmers don't know how to implement themselves.

One other area where math becomes important is in algorithmic complexity analysis. Math is used to analyze how much memory will be used under various circumstances, how long it will take to process various types of data, etc, etc, etc. If you've ever used an application that felt "slow", and a different one that felt "responsive", you'll know what I'm talking about. Quantifying where the slowdowns are requires math.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
Visionist

Visionist

    Newbie

  • Members
  • Pip
  • 2 posts
So basically, as long as I have a good understanding with math(as in, I don't struggle with it, am perfectly o.k with doing math) then I should do fine with programming?

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Yes, but the more math you know, the more options you will have :)
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users