Page 1 of 2

is maths any use in learning to program?

Posted: Thu 01 Oct 2009, 08:48
by yarraman
I have a degree in maths. I have done calculus. I have done optimisation, Flux, Curl, Fourier series and so much matrix algebra that my eyes might be square arrays.

I still have all my maths textbooks. It's been years since I did it but I could probably rehash it.

Is mathematical knowledge ANY use in learning either [1] how to program and/or [2] understanding how computers work under the hood?

If I had to describe my current career path it is a computational graphic designer :) The only times when I am reminded of maths is when I read something about computers that uses a term like "bounded" and my third year uni course on number theory comes back to me.

Posted: Thu 01 Oct 2009, 11:03
by muggins
Discrete maths is surely relevant...otherwise both computing & maths need logical thinking.

Posted: Thu 01 Oct 2009, 11:07
by disciple
Of course it is of use... but obviously if you wanted to learn to program you would study it, not go back and revise your maths :)

ok

Posted: Thu 01 Oct 2009, 11:08
by yarraman
Ok. I'm interested. I did discrete maths!

Matrices?
Linear algebra?
Vectors?
Sets?

Posted: Thu 01 Oct 2009, 18:32
by rarsa
Here is my take.

You need good math to do some kinds of programming but it is not necessary at all for some other kinds.

e.g.
A business application requires just the most basic math skils
Creating a game rendering engine, requires advanced math
Creating the front end for a simulation requires moderate knowledge
Creating the back end may require substantial knowledge.

What's more, the math may be done by some people and the programming by a different set of people.

Having said that. Doing math wires your brain in a certain way that helps you understand abstract concepts. The same as doing music helps you understand math, even though they are not the same.

As a general observation: In my own experience math and physics grads are usually very good programmers.

If you know math you may have an easier time learning to program.

Posted: Thu 01 Oct 2009, 20:01
by amigo
Generally, good programming is more about logical processes -like the ability to tranlsate a problem posed as prose into an equation which provides the answer. Unless the program is really about doing math, the conversion of the logic is more important than the actual equation.

Posted: Fri 02 Oct 2009, 06:50
by aarf
in which prehistoric era did you get this degree? 1500? 1200? 300BC yes that was it.
didnt know they had cornflakes packets back then.

Posted: Fri 02 Oct 2009, 07:08
by Bruce B
Dad is a computer scientist. He graduated with a masters degree in math. In those days universities didn't have computer classes.

Recruits were from math departments.

In the early days of programming we didn't always even have languages. Moreover, the price of a single kilobyte of memory may be so cost prohibitive, no way the person writing the code could get the company to provide a desperately needed kilobyte.

The programmer had to write efficient and tight code.

On many projects, dad's skill in math was really necessary.

I wanted to be a programmer, but my lack of confidence in math was the major reason I didn't pursue it.

Right or wrong, in my mind having a high level of math training or at least excellent understanding is important to being a highly competent programmer.

Posted: Fri 02 Oct 2009, 08:52
by Lobster
Right or wrong, in my mind having a high level of math training or at least excellent understanding is important to being a highly competent programmer.
I think you are right
and I think it is wrong.

What about us incompetents? :oops:
We need ASQ (not yet available in this dimension)
http://peace.wikia.com/wiki/ASQ

People who think abstractly are usually good at maths
and programming. 8)

Posted: Fri 02 Oct 2009, 08:56
by aarf
Bruce B wrote:Dad is a computer scientist. He graduated with a masters degree in math. In those days universities didn't have computer classes.
my apologies i had forgotten that there were still dinosaurs roaming the earth or that the ones that do don't need to breathe for the past 30 years.
how does one do advanced maths without using even at minimum a programmable calculator? ok they still had slide-rules ( a form of calculator) around in some numbers even just 35 years ago.

Posted: Fri 02 Oct 2009, 13:37
by rarsa
Re: aarf

Troll alert. Let's hope no-one bites. (no-one has up to now)

Posted: Fri 02 Oct 2009, 14:32
by Flash
Rarsa, which one's the troll? :lol:

Posted: Fri 02 Oct 2009, 14:42
by rarsa
Flash wrote:Rarsa, which one's the troll? :lol:
Hi Flash,

aarf certainly sounds like a troll looking for an of-topic argument. Calling names and making ridiculous statements. This is an interesting thread and I wouldn't like to get off topic following that bait.

I know he's a regular and maybe I'm not privy of an inside joke, but the comments sounded trollish to me. (Specially after repeating them in two consecutive posts.

Posted: Fri 02 Oct 2009, 21:05
by Pizzasgood
Mathematical algorithms are often used as examples when learning to program. For example, factorials are often used when explaining recursive functions.

There are a lot of similarities between math and programming. In both you deal with a lot of abstraction.

I generally think about math in terms of programming. For one amazing moment back in highschool, I was even able to see the English language in terms of programming and the thing actually made sense. It was just another programming language. But, I prefer C and thus have forgotten most of the arcane English junk they forced into my head.

Programming is really a method of thinking more than anything else. To write a program: think like a computer and then solve the problem the program should solve, and you have just written your program. Programs are just algorithms.

Posted: Fri 02 Oct 2009, 21:29
by rarsa
Pizzasgood wrote:To write a program: think like a computer and then solve the problem the program should solve.
We have different approaches. I actually do the opposite.

I think of the computer as if it was a "task force".

When I'm programming I think in terms of who should do what/who should know what

Of course I've had an OO mind since the early 90's but I think that even before when using structured development.

That helped me increase cohesion and reduce coupling while keeping a level of abstraction that other people could relate to.

Computers think "linearly" so from my perspective thinking like a computer leads to spaghetti code.

So I would think in terms of little green people running around doing stuff:

"Hey window, you should display this data"
and then thinking : should the window ask for the data (delegation) or should the data be provided to the window (Parameters) or should the windows contain the data (properties)

Posted: Fri 02 Oct 2009, 21:39
by sunburnt
Simple math is often used, complex math is used when the app`s. of that type (CAD, Statistics, etc.).
The concepts of programming are deceptively simple, only 2 basic methods for nearly all languages.
Branching and looping, and that`s it! The syntax of the particular language determines how easy it is to use.
Most languages are designed to do a certain job, and do it well, but are not so good at other things.
Some languages are very powerful compared to more common ones, sometimes making it hard to use.

Posted: Fri 02 Oct 2009, 22:24
by dogle
yarraman, cheer up, I share your pain (in real life, I've scarcely ever touched upon the maths over which I shed so many buckets of blood toil tears and sweat).

By coincidence yesterday afternoon I was standing before Kelvin's Harmonic Analyser, yep, the real thing, a bit baffled.

I didn't know of his work on computing.

Afterwards, I searched, as one does.

Search ' harmonic kelvin analyser'.
Awesome.
Fascinating.

O how I wish I could remember enough maths to understand that great mathematician's thought processes in 'programming' in ... 1886

Posted: Fri 02 Oct 2009, 23:16
by Pizzasgood
Good point. And an important one. A good programmer needs to be able to think in several ways. Human thinking for the organization, and computer thinking to do the grunt-work (individual methods). You also need to be able to think like the client to make the interface intuitive.

Posted: Sat 03 Oct 2009, 16:19
by mikeb
Hmm programming language
I definately find the learning curve very similar to learning a foreign language with the other similarity that it gets easier with each new language.

As for maths.....an electronics analogy...
Higher maths is only used in such areas as component design......for most areas the ability to use a pocket calculator is enough.


just my 2.342837323 e-45 cents worth

mike

Posted: Sat 03 Oct 2009, 20:45
by Bruce B
aarf wrote:
Bruce B wrote:Dad is a computer scientist. He graduated with a masters degree in math. In those days universities didn't have computer classes.
my apologies i had forgotten that there were still dinosaurs roaming the earth or that the ones that do don't need to breathe for the past 30 years.
how does one do advanced maths without using even at minimum a programmable calculator? ok they still had slide-rules ( a form of calculator) around in some numbers even just 35 years ago.
Aarf,

As I understand it, in the 1950s, the government, (military) were the people with the money and interest to develop computers.

With not even programming languages, they didn't recruit programmers, as there was no such thing.

The recruits were people who graduated with high marks in areas of math and other sciences.

The title dad got was 'computer scientist' and the title stayed even as computers evolved.

Over the years, he learned many languages. The last being C and he stayed there. His prestige, ability, reputation, contacts and all helped him to keep employment, even when programmers were looking for work.

============

I'd tease him like this: What's the difference between a computer scientist and a computer programmer?

Answer: About 50 dollars an hour

============

It's good to have a dad, especially when he is a good dad.

Of course he's older than I, but the truth is he's also a lot richer, more organized and productive than myself.

I love the man. I told him I expect to take care of him when he gets old.

He said the doesn't expect to get old.