Live data from Hacker News

Why math is painful to read

matusiak.eu

81–90 of 106 posts

Re: Why math is painful to read

#81
post #46
post #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 nev…

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. This case analysis works if you only consider people who've been sitting in on the class the whole time, but someone who appears mid-way through the semester (or analogou…

Notation is what it is because it serves our ( ie. mathematicians') interest so well. If every one of us started writing Integral Of Quadratic Polynomial = Cubic Polynomial plus constant maybe we would increase the size of the audience a tad bit....but the downside would be, we'd move at a glacial pace & never make progress.

Things like direct product and cyclic groups are basic....almost trivial even.

If a non-programmer asks you "Why do you guys say int x = 10; float y = 0.2 Why not x is an whole number who value is 10 y is a fraction whose value is one fifth.

you can sit down & reason with him for a while....but if he insists that everything be spelled down in such great verbose detail, you will at some point, pick up your starbucks coffee and say "Dude, this programming thing, its not for you. The average program is like 10s of 1000s of LOC and if I start writing everything out in plain English, I'm going to get writers cramp & file for disability insurance."

Trust me, math gets immensely complicated very, very fast. The only way to have even a fighting chance of keeping up is terse notation ( and frequent breaks ).

One reason for this schism is the lack of rigor. eg. When a programmer says "function", he is order of magnitude less rigorous than what a mathematician means by that word. You ask a programmer what probability is, and he will say "you know, whether something will happen or not, how likely it is to happen, so if it doesn't happen we say 0, if it is sure to happen we say 1, otherwise its some number between 0 & 1. Then you have Bayes rule, random variable, distribution, blah blah...I can google it :))"

You ask a mathematician what probability is...even the most basic definition would be something like "a function from the sample space to the closed interval [0,1] ". Note how incredibly precise that is. By the word "function", the mathematician has told you that if you take the cross product of the domain ie. a Set of unique outcomes of your experiment, with the range, which is the closed interval [0,1], you'll get a shit-ton of tuples, and if you then filter out those tuples so that that every outcome from the domain has exactly one image in the range, then that is what we call "probability". And this is just the beginning...the more advanced the mathematician is, the more precise he'll get. I've seen hardcore hackers who've designed major systems that use numerical libraries walk out of a measure theory class on day 1, simply because they overestimate how little they know. Calling APIs is very, very different from doing math. The professor is like the compiler - he isn't going to care if you know or not what measure is or what a topological space is...its a given that you've done the work that's laid out in the pre-reqs, and if you haven't, go write an API or something, don't bother the mathematician....atleast that's the general attitude in most American universities I've seen. If you tell him "describe its purpose and give a full description" he will look at you as if you are from Mars, and then tell you to enroll in the undergraduate section of Real Analysis 101 :)

Re: Why math is painful to read

#82
post #81
post #46

Earlier quoted context omitted.

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. This case analysis works if you only consider people who've been sitting in on the class the whole time, but someone who appears mid-way through the semester (or analogou…

Notation is what it is because it serves our ( ie. mathematicians') interest so well. If every one of us started writing Integral Of Quadratic Polynomial = Cubic Polynomial plus constant maybe we would increase the size of the audience a tad bit....but the downside would be, we'd move at a glacial pace & never make progress. Things like direct product and cyclic groups are basic....almost trivial even. If a non-progr…

If a non-programmer asks you "Why do you guys say int x = 10; float y = 0.2 Why not x is an whole number who value is 10 y is a fraction whose value is one fifth.

Knowing what language we're working in is enough to know that's exactly what that code says. This is not the case in mathematical notation. C × A could be the direct product of two groups, or maybe the tensor product of two graphs, or perhaps the product of two lattices, or it could be one of who knows how many other things. The issue here is not high precision, but the opposite: heavy reliance on convention and context in order to be unambiguous.

Re: Why math is painful to read

#83

No, that's not why math is painful to read. The reason math is painful to read is because it's either obvious, in which case it's not painful to read, or because it contains new ideas that you need to work hard on before you can grok them. There is no short cut. You can't write math like a novel, you can't read math like a novel. There are ideas that are deep and difficult, and unless you actually spend time working…

> The reason math is painful to read is because it's either obvious, in which case it's not painful to read, or because it contains new ideas that you need to work hard on before you can grok them. The same could be said for code that uses only single letter variables and functions. It'd be a lot easier with readable variable names.

Yes. In reading other people's code, I've had coding style make the difference between taking about a day and taking about half an hour (two programs to do the same thing in essentially the same way).

Re: Why math is painful to read

#85
post #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.

I always felt that if math theorems were presented in a programming language, they would be way more understandable ….

Find out empirically! Look at theorems in some formal methods/programming languages papers and their corresponding mechanizations and see which you find more understandable. (Actually, it might be better to start with something like Software Foundations to get a gentler introduction to a programming language used for this sort of thing -- http://www.cis.upenn.edu/~bcpierce/sf/ )

Re: Why math is painful to read

#86

If someone were awesome (maybe somebody like John Resig), they could come up with a math notation framework that started terse but could expand to more detailed definitions with a click. E.g., Starts with (capital sigma) but expands to 'Sum(1..n)' and then expands again to 1 + 2 + 3 + ...n. Clicking the + changes it to 'add' which maybe links off to Wikipedia or Khan Academy. Clicking the numbers might change them to…

A math IDE. I think Wolfram Alpha may do just that, then again dealing with formal maths is not my thing.

An IDE makes sense if it can encapsulate the symbols and terms you're conveying. How many programmers sit down with notepad or vi and write huge programs? Yes, some do (and I have), but it's far easier with the IDE.

Re: Why math is painful to read

#87
This is an old chestnut. Mathematical notation is terse because mathematics doesn't consist entirely of notation! Look at any book or research paper; you'll find a great deal of text surrounding equations. Comparing this to code is nonsensical. Unless you're reading something in WEB, you are much more likely to encounter code than comments. There are certainly some unfortunate conventions and cruft in mathematics, but every generation of mathematicians rewrites in part what it inherited from its forebears.

Re: Why math is painful to read

#88
If we ignore the cosmological constant contribution, for each of the 10 non-zero components of the Ricci curvature tensor, the sum of the component of the Ricci curvature tensor minus half of the corresponding component of the metric tensor multiplied by the Ricci scalar is equal to four times the ratio of the circumference of an arbitrary circle divided by its radius, multiplied by Newton's gravitational constant divided by the fourth power of the speed of light in vacuum and multiplied by the corresponding component of the stress-energy tensor.

Would this be clearer than the original [http://en.wikipedia.org/wiki/Einstein_field_equations]? After all, I don't use any weird symbols and avoid greek letters... Surely the author of that blog post would be satisfied by this ... Perhaps, I should include what I mean by Ricci curvature tensor ... but first define what I mean by a tensor, including the metric tensor, and explain other words like stress-energy tensor; it should not take more than a few lines of text for it to be completely clear, right?

Re: Why math is painful to read

#89
post #64

No doubt about it, mathematical notation can be difficult to read. It's terse, conceptually dense, operators are commonly overloaded, etc., etc. But that's not why it's hard to read. Math is hard to read, I think, because math is hard: (1) Some core mathematical concepts are fundamentally difficult. Notions like infinity (and different kinds of infinity!) are entirely foreign to our daily experience. (2) In addition,…

You contradict yourself:

> the natural way of programming is to define relations (functions) on a small number of core data structures. ... > ... And that information is embodied in its type

If you encode information in type, you will have a very large number of data structures.

Re: Why math is painful to read

#90
post #55
post #47

Earlier quoted context omitted.

For the sake of an argument, let's assume you are right, and the language of math sucks. Then, we have had centuries of mathematicians inventing ever changing notations and ending up with a notation that sucks. If so, those mathematicians must be extremely stupid. Surely persons of average intelligence must be able to come up with better notations, and find proofs for stuff that is out of reach of those morons? I do…

> If so, those mathematicians must be extremely stupid. Not necessarily. Before modern times mathematicians worked alone and didn't need a notation that others would understand. Newton, for example -- his calculus notation wasn't very good, and over time Liebniz' notation ended up being used instead (completely apart from the issue of who invented the calculus). > Surely persons of average intelligence must be able t…

Liebniz was a mathematician.

Newton was a member of the Royal Academy. They communicated with each other.

Post reply on HN