How do you rate the importance of mathematics in your programming skill

RTFVerterra's picture

He has: 109 posts

Joined: Dec 2008

Hello everybody, I am teaching mathematics to freshmen computer students. They do not appreciate how the math will develop their ability in programming. I want to convince that they need to do math in order to do programming more effective. Unfortunately, I have no data of how mathematics play in the mind of a programmer.

I created some programs and do heavy math on it as my programs are basically about math, but I am not a programmer, I am a math professor.

In a scale of 1 - 10 (1 = low & 10 = high), how do you rate the importance of mathematics in programming?

Please answer only if you do programming, your honest answer will affect a handful of future computer professionals. Thanks.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

There are many ways in which mathematics influences my programming:

Formal specification
Before discovering a solution -- or, in order to properly understand an existing one -- I need a sense of the scope and nature of the problem. To do this rigorously, I can approach the programming problem similarly to how I would a mathematical one. That is, specifying input parameters, protocols, types, flow, states, processes and outputs. (It also goes some way towards verification for correctness.)

Discrete structures
Every program I write involves concrete application of abstract discrete structure in mathematics -- from ordered sequences to matrices to trees/graphs to state machines and automata. Sometimes I need to know the profile of underlying structures provided by systems I'm using, and at other times I need to compose or create them myself.

Numerical analysis
An important practical concern is the representation of continuous real numbers by binary digital computers. It can be a complicated field in itself, but still has ramifications for the everyday programmer, with issues like floating-point precision and accuracy, rounding error, etc.

Symbolic analysis and meta programming
Programming often involves symbolic analysis analogous to mathematics. Besides direct counterparts like symbolic integration etc., in programming we typically deal with arbitrary symbols and expressions. Tokenizing, parsing, compiling, interpreting, rewriting and transforming symbolic input is close to algebraic mathematics. Formal languages and abstract computing machines are among fundamental theory in computer science, as well as matters of practical engineering concern.

Functional programming
One style of expressing program code (which I'm partial to) relies on immutable data structures, deep call chains, first-class/higher-order functions, function composition, and referential transparency. These are properties in common with mathematical convention. Being comfortable with that way of thinking is an advantage.

Algorithms
Similarly, an understanding of algorithms from a theoretical perspective (along with discrete structures) is essential. Knowing the order and limits of an algorithm's resource usage can help make crucial decisions about tradeoffs early in the development process. Having a sense of the shapes of growth curves -- if not the calculus behind them -- is related (e.g. it's easy to underestimate exponential growth).

Pre-calc mathematics
Arithmetic is obviously useful in so many cases. Understanding number radix and number lines is necessary for understanding bounding, overflow and conversion error. Geometry and trigonometry help with graphical applications -- from basic user interfaces to 3D games and digital cartography. Set theory is connected with everything from bitwise operations to cryptographic hashing to relational databases.

Statistics and modelling
Being able to manage large amounts of realistic data is an asset. Whether you want to aggregate logs to identify trends, or ensure your randomized algorithm is secure, or evaluate a given test for your data, some statistical confidence is necessary.

Domain knowledge
Software is often specific to a particular domain which may require, at a minimum, comprehending their branch of applied mathematics. e.g. business maths for commerce software, statistical techniques for social and medical software, calculus for science/engineering software, and so on.

Mathematical philosophy
Practicing and engaging with mathematics will, over time, help you develop taste -- for a kind of elegance of expression and beauty of structure, which overlaps a great deal with programming. In more specific terms, it involves things like limiting scope, constructing and composing abstractions, building meaningful relations, testing truth, reducing terms and simplifying assumptions.

The basic point is that thinking logically, analytically and yet creatively the way a mathematician does is very much applicable to programming. I'm nothing like an expert in either mathematics or computing, but in my experience as a student and practitioner, it has been highly beneficial to my activities in both areas to recognize and cultivate their intellectual connections.

So I rate the importance at 10/10. Smiling

They have: 1 posts

Joined: Jan 2011

this is a very knowledgful article

davecoventry's picture

He has: 112 posts

Joined: Jun 2009

I would say that it really does depend on the application of your program and the tools you are using to achieve your aims.

It goes without saying that if you were using Machine Code or Assembler then mathematics would be extremely useful.

And if you were employing complex algorithms to control graphics and/or 3D, obviously you would need a sound mathematical grounding, too.

However highlevel languages like HTML and CSS require very little in the way of complex maths and tools like dreamweaver and the like further remove that requirement.

A lot of people consider themselves programmers without really knowing much about what goes on 'under the hood', and these people are not really going to want or need much knowledge of the underlying maths.

teammatt3's picture

He has: 2,100 posts

Joined: Sep 2003

I would say that it really does depend on the application of your program

That's how I feel.

Here are some thoughts from programmers about math, that you may find interesting.

I have been writing code for a few years now, and don't use any of my geometry, trig, or calculus. I use basic algebra, plus a little discrete math.

For what I do, I'd say 3/10. But it really depends on your domain. I write CRUD applications. Nothing fancy.

BUT the university has a responsibility to prepare students for a variety of different fields in computer science, and some of the fields do require a thorough understanding of math. Have you used a ti-89, Maple or Mathematica? Those programmers sure know math!

They have: 83 posts

Joined: Nov 2007

In program studies also fisrt starting with math matical application.. like counting, mod,big, comparison etc... Also in system level ptrogamming full of mathmatical calculation.. So its very important and math playing very good role

They have: 83 posts

Joined: Apr 2009

Mathematics always plays a huge role in almost all major applications and different field of work. When it come to programming, its very very essential. first and foremost requirement for programming studies is mathematics and you cant ignore it at all.

RTFVerterra's picture

He has: 109 posts

Joined: Dec 2008

Per my monitoring to my students, those who perform well in my class (mathematics) perform well in their programming class but most of them was not able to top in the programming class.

Here are some data I gathered:

  • The no. 1 in programming is 5th in my math class.
  • 7 out of 10 who top in programming are I thought don't have a brain. They perform very poorly in my mathematics class.
  • Among the top 10 in math only 2 made it to be among the top 10 in programming.
  • An average student in my math class, is top 4 in programming.

The data was based on the performance of the students on the first quarter of the semester. Its too early to make some conclusions.

davecoventry's picture

He has: 112 posts

Joined: Jun 2009

RTFVerterra wrote:

The data was based on the performance of the students on the first quarter of the semester. Its too early to make some conclusions.

Very interesting.

However you should probably avoid making any direct correlation as I presume this is among a very small sample?

I would say anecdotally, and from my own experience, that having a logical and methodical approach to problem solving would be of benefit to both disciplines and while proficiency in the one may not necessarily mean proficiency in the other, I would expect anyone having an aptitude for either must have an aptitude for the other.

RTFVerterra's picture

He has: 109 posts

Joined: Dec 2008

I fully agree with you, these observations are only made by me and confined only to my students. The research department of our university however was inspired of what I did that they submitted a resolution to scientifically implement this research in a larger scale. The result of the "would be" research would determine the level of mathematical competency of students to be accepted in computer science major.

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

RTFVerterra wrote:
...The research department...submitted a resolution to scientifically implement this research in a larger scale. The result of the "would be" research would determine the level of mathematical competency of students to be accepted in computer science major.

I would also suggest testing for a correlation with grammar proficiency (knowledge of diagramming, transformational grammar, syntax, etc.).

Insofar as your original question, I would rate math a 5-7. Logic, by itself, rates a 10.

Where the world once stood
the blades of grass cut me still

iPhone Fan's picture

They have: 8 posts

Joined: Jul 2009

I'm not great in mathematics. But I have some basic knowledge. 5 monthes ago I was to write program based on Newton method and secant method. Looking throug wikipedia and some math forums I thought I would never sort it out myself. But finally it appeared that it's not impossible. If you want to do it you'll have done it. Even without deap math knowledge. Moreover I can say I have better designer skills. They are useful in programming.

They have: 3 posts

Joined: Jul 2009

Basically C and C++ languages best mathematical skill in programing language.

They have: 17 posts

Joined: Aug 2009

I won't go for any long details here but being into programming, specially machine level, maths is the 'most' important field as compared to any of the sciences. Programming is all about random data and abstract algorithms and who else except maths can make it possible.

davecoventry's picture

He has: 112 posts

Joined: Jun 2009

Well, yes.

As I indicated in an earlier post, if you are programming at machine level, then there is no way you can do that without some degree of mathematical proficiency.

However higher level languages no longer really have that requirement.

Particularly if you are just stringing a few lines of HTML together to make a website, and even more so if you are using Dreamweaver. Smiling

They have: 38 posts

Joined: Jun 2008

In regards to your research and through my experience as a student and programmer I would say it all depends on enthusiasm. I hated math and did for many years until I found programming, I was very enthusiastic about programming but not at all about math, therefore in math class I was bottom of the class. In programming I taught myself what I needed to know to excel myself in that class.

Therefore its not that I couldn't do math, I just didn't have any enthusiasm, or see any benefit in doing so. Maybe this is the same for your students?

Now I enjoy programming and see the benefit in math, and after re-taking some qualifications I can now say my math is "OK" and continues to improve thanks to programming.

Hope this helps somewhat.

S33ker.

davecoventry's picture

He has: 112 posts

Joined: Jun 2009

S33ker wrote:
In regards to your research and through my experience as a student and programmer I would say it all depends on enthusiasm. I hated math and did for many years until I found programming, I was very enthusiastic about programming but not at all about math, therefore in math class I was bottom of the class. In programming I taught myself what I needed to know to excel myself in that class.

Therefore its not that I couldn't do math, I just didn't have any enthusiasm, or see any benefit in doing so. Maybe this is the same for your students?

Now I enjoy programming and see the benefit in math, and after re-taking some qualifications I can now say my math is "OK" and continues to improve thanks to programming.

Hope this helps somewhat.

S33ker.


I think this is key.

I know I had a real problem with Matrices when I studied Maths in the early seventies because I failed to see how they might be used. Those were the days when computers were the preserve only of large companies.

It was only once I had started programming graphics, that I realised how they are used. Up until then I could not see the point of them and I suppose I was unable to maintain my concentration when in class.

The programming I did at University was in FORTRAN and there was no graphics involved, and it was only in the late eighties that machines with a graphical capability became commonplace, so by the time I realised the significance of Matrices it was too late Sad

I always regarded myself as 'good at maths' and at high school I was always first in any tests, but I would probably be regarded as a lousy programmer, probably because I am very disorganised.

They have: 10 posts

Joined: Aug 2009

I would rate it as 9 out of 10. Mathematics is very necessary and I think in order to be a programmer one must have sound knowledge of mathematics.

They have: 25 posts

Joined: Sep 2009

1+1=5 ?

They have: 17 posts

Joined: Mar 2010

Mathematics is the mother of all sciences. If a person is good in mathematics, he will surely be good in programming logic and algorithm design.

Mathematics is not limited to 1+1 =2, rather it contained some complex formulas which are used in sophisticated software development.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.