Live data from Hacker News

Why math is painful to read

matusiak.eu

21–30 of 106 posts

Re: Why math is painful to read

#21
post #16

It seems to me like the author approaches math looking for a concise & elegant programming language, but instead just finds...math. The notion of scope as an integral part of mathematics is a particularly interesting suggestion. Mathematics is the study of abstract, quantitative truths (and falsehoods), and these truths, being universal, have universal scope (although you can constrain some truths as special cases of…

Completely agree with you, but from your experience, how many fewer do both very well? I have always been interested in both and I can't imagine having one tool without the other, as they both enhance the way that I think about things. Programming makes the concepts of variables and sigma notation even easier to understand, while math makes it far easier to solve problems. Do people actually get by in programming without math?

Re: Why math is painful to read

#22
post #20
post #7

Earlier quoted context omitted.

> Mathematical notation is to Python what English would be to Assembly Language Which is often the problem, it looks specific, but it really isn't; it's full of implicit assumptions about what the reader should know. It's not executable, because it's a language designed for being written by hand rather than executed by a computer. However, the teaching of math would greatly benefit from an explicit executable form th…

> However, the teaching of math would greatly benefit from an explicit executable form that makes no assumptions I'm skeptical of this logic. I think nobody would be able to learn mathematics if they had to keep it all in their head at once. "Unobfuscated" maths, i.e. maths that has every single logical deduction written out from first principles so that you can (to use your words) "execute it", would be impossible t…

> I'm skeptical of this logic. I think nobody would be able to learn mathematics if they had to keep it all in their head at once.

That's what functions are for.

> Instead we learn some, we internalise it, and then we can appreciate the new notation

Those new notations are functions, simplified abstractions of more complex processes that allow us to think in larger concepts and not sweat the details.

> Mathematics is beautiful. If anything, it's programming languages that have the catching up to do.

Perhaps, perhaps not.

Re: Why math is painful to read

#23
Frankly, there are 2 kinds of programmers.

People who do this:

     val result = directProduct(cyclicGroupOfDegree3, finiteAbelianGroupOfDegree7)
and the second kind, people like me, who do this:

     // Compute the direct product of 2 cyclic groups
     val z = dP( cg1, cg2 )
You can easily guess that the 2nd kind are math majors. If my math professor started writing everything out in plain English like the first example, he'd never be able to cover a theorem per class. He'd still be writing the first lemma and the hour would be up.

So he resorts to 1-character symbols, precise notations, and terse comments. The idea is - if the reader doesn't grok direct products or cyclic groups, he's fucked anyways, so why bother ? And if he does grok them, why impose cognitive overload by spelling it all out in great detail, just use 1-character symbols and move on.

Now both these styles are in direct conflict with each other, and in the Fortran/C/C++ community during the 80s-90s ( when every respectable programmer had a copy of Numerical Recipes on their desk ), you would emulate the 2nd kind.

In the 2000s & later, people got rid of their Numerical Recipes & exchanged them for "14 days to EJB" and "Learn Python in 21 days" and "Master Ruby in 7 days" and the like...the community started becoming a lot less math-y and a lot more verbose, and style 1 is back in vogue. Nowadays I get pulled up constantly in code review for using single character names....but I think this too will pass :)

Re: Why math is painful to read

#24
I agree. I always felt that if math theorems were presented in a programming language, they would be way more understandable (especially if the good practices are respected: meaningful variable names, etc).

Mathematicians love to talk about rigor, but when it comes down to write their ideas, they often have little enough of it.

Re: Why math is painful to read

#25
post #7
post #6

I could not disagree more with that post. Mathematical notation is to Python what English would be to Assembly Language: it is a high-level notation, designed see the forest rather than getting lost in the trees. Take Maxwell's equations for example. After learning vector calculus and becoming familiar with its notation, you notice how much meaning you can extract at a quick glance from the four Maxwell's equations e…

> Mathematical notation is to Python what English would be to Assembly Language Which is often the problem, it looks specific, but it really isn't; it's full of implicit assumptions about what the reader should know. It's not executable, because it's a language designed for being written by hand rather than executed by a computer. However, the teaching of math would greatly benefit from an explicit executable form th…

Programming languages aren't explicit executable forms, they are abstractions. Unless you are working with machine code or assembly, you're getting the abstract ideas which get expanded by the compiler. What it sounds like you're advocating is to write out 3+3+3+3+3 instead of 3*5 (the latter is assuming).

Re: Why math is painful to read

#26
The main reason it's hard to read math papers is because they contain complex, difficult ideas. Even professional mathematicians take a long time to read papers, and they usually won't be able to understand papers outside of their own specific field of math. I agree with the author that math papers could borrow some ideas from programming - explicitly defining all variables/functions, scoping, etc - but acquainting yourself with the conventions of the field alleviate most of those problems.

Re: Why math is painful to read

#27
post #9

Earlier quoted context omitted.

You think that people learning math will find it less confusing if they have no context (which, in mathematics, is largely equivalent to "assumptions") for what they are learning and have to build their mathematical knowledge from first principles? Or am I misunderstanding your post?

I don't think anything, I was recalling what I heard Sussman say at a conference, which he makes clear in http://en.wikipedia.org/wiki/SICM . Though I saw him a good 8 years after the book, so I'm sure he'd grown some new opinions. He is of the opinion that if you can't write the algorithm, you don't understand it; forcing students to write the algorithm aids in teaching them a real understanding. He spent quite a bi…

He is of the opinion that if you can't write the algorithm, you don't understand it; forcing students to write the algorithm aids in teaching them a real understanding.

Absolutely.

I had memorized the notation for derivatives. Until I was able to realize how the notation tied to finite numerical approximations, I never really understood it.

If you don't know what I'm talking about, the right way to approximate (d^2/dx^2)(f(x)) is to write an operator d defined as d(f)(x) = f(x + dx) - f(x). And now your numerical approximation for the second derivative is (d(d(f))/(dx * dx))(x).

Now replace your d operator with the much better d(f)(x) = f(x + dx/2) - f(x - dx/2), and see how good your numerical approximations become!

The notation actually means something. When we switched from infinitesmals to limits, we lost sight of that. When you try to write the algorithm, you're going to be reminded of its meaning, fast.

Re: Why math is painful to read

#28
post #25
post #7

Earlier quoted context omitted.

> Mathematical notation is to Python what English would be to Assembly Language Which is often the problem, it looks specific, but it really isn't; it's full of implicit assumptions about what the reader should know. It's not executable, because it's a language designed for being written by hand rather than executed by a computer. However, the teaching of math would greatly benefit from an explicit executable form th…

Programming languages aren't explicit executable forms, they are abstractions. Unless you are working with machine code or assembly, you're getting the abstract ideas which get expanded by the compiler. What it sounds like you're advocating is to write out 3+3+3+3+3 instead of 3*5 (the latter is assuming).

They're executable abstractions, thus they are explicit. And no, that's not what I'm advocating at all. There is no assumption in 3 * 5; * is a defined function, if you need to know how it works you can look. What's important is that it's computable. Notation often isn't, too many implicit assumptions that rely on a trained eye to execute correctly.

Re: Why math is painful to read

#29
post #27

Earlier quoted context omitted.

I don't think anything, I was recalling what I heard Sussman say at a conference, which he makes clear in http://en.wikipedia.org/wiki/SICM . Though I saw him a good 8 years after the book, so I'm sure he'd grown some new opinions. He is of the opinion that if you can't write the algorithm, you don't understand it; forcing students to write the algorithm aids in teaching them a real understanding. He spent quite a bi…

He is of the opinion that if you can't write the algorithm, you don't understand it; forcing students to write the algorithm aids in teaching them a real understanding. Absolutely. I had memorized the notation for derivatives. Until I was able to realize how the notation tied to finite numerical approximations, I never really understood it. If you don't know what I'm talking about, the right way to approximate (d^2/d…

> When you try to write the algorithm, you're going to be reminded of its meaning, fast.

Exactly, and forced to replace implicit assumptions with explicit instructions to make it work.

Re: Why math is painful to read

#30
People seem to be pretty critical of this post, but can anyone give me a good reason why math notation shouldn't have some concept of scope? I can't see any downsides. It would certainly help me puzzle out my professor's notes when he has used f to mean three different things in as many lines.
Post reply on HN