[tutor] Do I need to have a strong math skills [What's the hypotenuse? / Mathworld]

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Sun Nov 3 19:58:01 2002


On Sun, 3 Nov 2002, Sean 'Shaleh' Perry wrote:

> On Sunday 03 November 2002 10:08, Dan Dud wrote:
> > Hello everyone,
> >
> > Hope everyone weekend is going great. I working through the "how to
> > think like a computer scientist" I'm stuck on the part which you have
> > to define a hypotenuse triangle.

Hi Dan, nice to hear from you again!


Any answer to any particular question must exist somewhere on the
Internet.

Here are two links that are relevant to your question:

    http://mathworld.wolfram.com/Hypotenuse.html
    http://mathworld.wolfram.com/RightTriangle.html
    http://mathworld.wolfram.com/PythagoreanTheorem.html

So a "hypotenuse" of a triangle is just math lingo for the "longest leg"
of a particular kind of triangle --- a right-angled triangle.

There's a standard formula called the "Pythagorean theorem" that tells us
what the length of that longest leg is.  As long as we have the lengths of
the two shorter legs, we're all good if we trust this Pythagorean theorem.

If you read up the material on the second link, you should have enough
information to write that hypotenuse program.  The third link goes into an
in-depth analysis of the Pythagorean theorem if you really want to know
why in the world it works.  MathWorld is awesome.  *grin*



> > I don't have a lot of math skills. Do I have to have a lot of math
> > skills to be good at programming???

What's more important than memory is self-awareness: to know what we
really don't know, and to push to remedy that!  I've found that good
research skills (and Google) go a long way into faking good memory.
*cough*

I think the problem that you're running into is just a matter of knowledge
and memory, not skill.  Exercise your skills, and I think you'll do just
fine.



> > I've decided to skip that part and move on. I hope everyone weekend is
> > going great and I'll talk to you all soon...

I do think math can be helpful.  The kind of things we programmers do
(writing functions and generalizing things, organizing statements) is
almost, line by line, identical with the idea of a "math proof" of
mathematicians.

In fact, I've heard it said that computer programming can actually be
harder than mathematics: In math, we can fool ourselves and others into
thinking that our mathematical reasoning is correct.  But computers are a
bit harsher about the reality of the situation.  *grin*

So don't despair if some math terms are unfamiliar: it's stuff you can
pick up.


Anyway, I hope this helps!