is maths any use in learning to program?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
yarraman
Posts: 36
Joined: Mon 28 Sep 2009, 10:14
Location: Melbourne, Australia

is maths any use in learning to program?

#1 Post 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.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »

Discrete maths is surely relevant...otherwise both computing & maths need logical thinking.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post 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 :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

yarraman
Posts: 36
Joined: Mon 28 Sep 2009, 10:14
Location: Melbourne, Australia

ok

#4 Post by yarraman »

Ok. I'm interested. I did discrete maths!

Matrices?
Linear algebra?
Vectors?
Sets?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#5 Post 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.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#6 Post 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.

aarf

#7 Post 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.

Bruce B

#8 Post 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.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#9 Post 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)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

aarf

#10 Post 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.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#11 Post by rarsa »

Re: aarf

Troll alert. Let's hope no-one bites. (no-one has up to now)
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#12 Post by Flash »

Rarsa, which one's the troll? :lol:

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#13 Post 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.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#14 Post 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.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#15 Post 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)
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#16 Post 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.

dogle
Posts: 409
Joined: Thu 11 Oct 2007, 12:41

#17 Post 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

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#18 Post 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.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#19 Post 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

Bruce B

#20 Post 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.

Post Reply