Jump to content

Recommended Posts

Posted

I'm a computer science major and I was wondering how important calculus grades (and GPA in general) are for this major.

At the moment I have an A in my programming and Math courses, but this is mostly due to generous curving on my math professors part and while I'm doing okay in Calc I, I am struggling through it and am worried about future math courses.

Is it worth stressing too much over? Of course I'll try to do the best I can, but is it really just more important that I understand programming and get good grades in those classes?

Or is this a field where you have you show you are good in math and programming? Anyone else a programmer who isn't too great at calculus that could give me some advice? Thanks.

Posted

Math in CS/Programming is just like having the right tools for the job.

 

You can do it both ways, you can fix it with duct tape, or you can use a titanium hinge that will outlast the planet. Both are solutions, except one is better and doesn't require constant maintenance.

 

A good understanding of the math behind a problem will allow you to understand, solve and optimize your solution, and only code in the minimal, slim, elegant solution. Not having a good grasp on Math will keep you from putting down elegant, simple, fast solutions and making the computer do more work, with complex code.

 

This applies to all secondary specializations. Having a good grasp of economics means your accounting software will have a nice, simple interface, all the needed tools and will be slim and fast. Having no idea, you rely on instructions from someone who doesn't know how computers work. Generally, the result will be messy and complex; and complex is buggy. KISS isn't just a band.

 

So, to answer your question, yes, it matters that you can understand and solve the problem BEFORE you write the code. The computer is there to automate the solution, not to find it. You will only be as good as the worst of your grades in a field. You can be 10/10 programmer, but if you only rate as 3/10 in engineering, your engineering software won't ever grade over 3 or 4, even with help. An excellent engineer with mediocre CS skills will write an ugly program everyone will use.

 

So, if you're not good with math, pick something else and go with that. There are plenty issues that need solving, not all require a deep understanding of calculus. You WILL need the basics.

 

Here's a basic example:

 

There are 20 people in the room. They all need to say good bye to each other, and shake hands. How many handshakes?

 

No math:

Readln('how many people?', X);

cnt := 0;

for i := 1 to X do

for j := 1 to X do

if j>i then inc(cnt); // 1 shakes hands with all, then 2 with 3-20, then 3 with 4-20.

Writeln(cnt);

 

Math:

// Combination problem; C=X(X-1)/2

Readln('how many people?', X);

Writeln(X*(X-1)/2);

 

For 20 people, nobody can tell the difference.

 

Now, if there are one million people in the room, you get to do 10^14 loops, I do 1. You need a 64 bit machine, with a 64 bit compiler, for storing the counter, whereas I don't. And finally, the first code does (at minimum) 2 INC and 2 CMP/JZ per cycle, plus the counter, that's 5 cycles, and that's 5*10^14. At 3 GHz, that takes 166 seconds (way more in real life). Mine is instant.

 

Better yet, knowing that 2 consecutive numbers have at least one even number, the result of the multiplication is always integer, even, so a SHR (>>) is in order. If your code is designed to run on an (e.g.) ATMEL, that tidbit is the difference between the small and the large CPU, because division will ramp up your code from 400 bytes to 3.7K. That means forever barred from using the small, efficient CPU that sleeps at a microAmp. Mine will run 2 years from a battery, yours will do 2 weeks. Even on a Core i7, optimized to the teeth, division is ~115 cycles, INT division is 26 cycles, SHR is 1. Point is, it does me no good to know SHR is faster unless I know the math behind that tells me that X*(X-1) is always even.

 

Handling a problem poorly will forever bar you from high end algorithms, like image matching, sound analysis, media, hardware development, any application where every bit counts (like devices/automation) and, not by chance, the best paid positions.

 

Can you be a surgeon without a scalpel? Yes. Will you be doing any brain surgery? Not likely.

 

I've celebrated my 20th year as a programmer, and know many successful people in the IT industry. Of those, only one is a pure, dedicated degree, CS graduate. Everyone else has a different specialization, ranging from accountant, to aeronautical engineer, to power distribution. Most if not all can solve differential equations unaided. Most have a good grasp of physics, electronics, logic. Also as a side note, not all of them had these while in school, so don't sweat it.

 

You wanted advice from a good programmer with mediocre math (hi!). Here it is: get familiar with at least one other industry branch, preferably a lucrative one. It's not all math. You can have a great career with mediocre math. You cannot have one with mediocre everything.

Posted
Or is this a field where you have you show you are good in math and programming?.

 

Calculus and programming are more like complementary skills that go hand in hand so if you are just interested in specialising in one area it may not be a problem. On the other hand if you want to get into design and development or engineering, across a wide range of industries, then you must have a good understanding of things like discrete math as well as calculus. What other maths subjects are you studying atm aimforthehead.

  • 7 months later...
Posted

hi

first sry for my bad english.

I'm a computer science major too, and Im looking for some articles about relation between mathematics and computer sciences,

Im looking for something like linear algebra in computer graphics or surface integrals in robotics,

Iv searched alot but I didnt find what Im looking for ! and I dont khow where to seek, :(

 

I want some articles that really shows how computer graphics is based on linear algebra or other things line that.

I am working with openGl now and I khow something about computer graphics but I want other articles too.

I am interested in everything that shows the relation between mathematics and computer sciences.

thank you

Posted

I worked for 35 years as a programmer without needing calculus, but I'm sure I could have chosen different jobs and used calculus all the time. On the other hand, I believe the problem solving skills I learned in calculus and other math classes helped me do to be a better programmer. I am very happy to have studied math, and occasionally wish I had learned more or not forgotten some I once knew.

  • 2 weeks later...
Posted

Thanks for all of the great posts everyone! This was incredibly helpful.
From the time I made this thread I finished Calc 1 - 3, and got A's in all of them. I feel it made my memorization and problem solving skills better and at the moment I am continuing with Discrete Math.

Posted (edited)

Never forget that calculus was born out of discrete maths.

The man (Newton) who invented calculus invented both and made great use of finite differences.

Obviously many others have made great contributions since then.

 

Oh and congratulations on your results, keep up the good work.

Edited by studiot
Posted

It depends on within which field you plan to develop applications. From my own perspective, in the financial world, I found logic and discrete math to be far more important for me than my calculus lessons. Working where I do, most of the intricate financial calculations are written by specialists who do nothing but that and have a much more in depth knowledge not only of the business, but of the math itself.

 

The logic and discrete math came in much handier for me for algorithm writing to handle processing the calculation results and applying them. Remember, unless you're doing pure math, the calculations are generally not the end result of your program - they're the intermediate step, and following that will be the application of the result in some fashion.

 

That said, you do have to know enough of the math to be able to write adequate test cases for your code. If someone hands me a calculation to implement, I need to know enough of the math behind it to understand what a nonsense result looks like, so I can make sure I test my code to handle those results.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.