6 ms·
No question about it. Mathematical notation is pure evil that should be cast into mount doom and then some. Mathematical notation makes Javascript operators loo
by yodelshady 6y ago
No question about it. Mathematical notation is pure evil that should be cast into mount doom and then some. Mathematical notation makes Javascript operators look sane.
There is barely a single operation in the last few maths papers I've read that doesn't have at least four possible interpretations at first glance, so the only way to understand a single line is to understand the entire theory at once. Needless to say, all variables are described with single letters.
The best defense for it is that it evolved from handwriting, where the difference between `matmul(a,b)` and `a x b`, repeated a few dozen times, is significant. These days, as I type, I define commands to turn the unambiguous longhand into the shorthand.
("But yodel, a and b aren't bolded or uppercase so according to convention they must be scalars!", I hear you say. Ha, ha, ha.)
I am genuinely angry about this. A great deal of practical mathematics is not hard. Mathematical notation is hard, and everyone using it should be a little bit ashamed at how needlessly difficult the field is.
- Garlef 6y agoWhile I get your reasoning, I think it misses a few important points. -- 1. Having the same symbol for several things is the mathematicians way of having polymorphism and is a very nice feature. Take for example the plus sign. Everytime we encounter it, we will most likely be dealing with some kind of abelian group. So just from seing the sign, we can already tell a lot about the context. Another example would be the sign for the tensor product. I we see it, we are most likely dealing with some symmetric monoidal category . It might be vector spaces, modules over some commutative ring, coherent sheaves, objects in some derived category, etc. But still the important part is that all the stuff we know about this context can be applied. -- 2. "so the only way to understand a single line is to understand the entire theory at once." What do you expect out of a single line? Just think of a codebase with 800k lines. Would you expect to understand what the codebase is about by just looking at a single line? I guess not: You'd rely on the naming of the functions/classes/etc. and how they are composed to understand what the codebase is doing. You'd also need a lot of knowledge about the area the codebase is concerned with to tell what is going on: Is it about a webserver providing a SPA? Is it a database? Is it a compiler? You also don't expect to understand the whole codebase and it's dependencies (including low level abstractions)in its entirety: If you write a frontend `<div>` tag as part of a frontend do you really need to know the exact way this will end up as instructions on the chip of the computer that is running running a specific version of a specific browser running a certain version using drivers for a specific monitor, graphics card, etc... All this is also true for mathematics. -- 3. "A great deal of practical mathematics is not hard. Mathematical notation is hard ..." Of course mathematics is hard. In fact: If anything related to human thought is hard, it is mathematics. And more explicit notation will not make it easier. Do you think the twin prime conjecture is still unsolved because a layperson may misinterpret the meaning of a plus sign?
- secondcoming 6y agoYes, but sometimes you just want to code up a formula from a book.
- BiteCode_dev 6y agoAren't the key words, "most likely"?
- TeMPOraL 6y agoExactly. It could be what you expect, or it could be that the particular paper/journal/field has a slightly different syntactic convention, where underlined or bold letters mean something entirely different than usual. And even if the paper explains the syntax it uses somewhere, it's still a new ruleset that you have to constantly remind yourself of as you're reading the paper.
- pwdisswordfish2 6y ago> What do you expect out of a single line? Just think of a codebase with 800k lines. Would you expect to understand what the codebase is about by just looking at a single line? The whole point is not having to understand everything at once. And I would expect to understand what that particular line does to whatever level of detail I want by reading that line and recursively working backwards through the definitions of each operation invoked. Like clicking on each identifier and then doing ‘jump to definition’ in an IDE, instead of reading a book from cover to cover. With code, I do this on a regular basis. With mathematics, it is plain impossible. (And yes, this is why literate programming is a silly idea best forgotten.) > Do you think the twin prime conjecture is still unsolved because a layperson may misinterpret the meaning of a plus sign? No. But it very much may be because too few people understand the relevant portions of number theory in sufficient depth — from the highest levels of abstraction down to the bits and bolts of set theory — to notice the key insight necessary to solve it.
- xvilka 6y ago> With code, I do this on a regular basis. With mathematics, it is plain impossible. It's easily possible with systems like Coq [1] plus a nice IDE [2]. There are mathematical libraries for the foundations [3][4]. [1] https://github.com/coq-community/awesome-coq https://github.com/coq-community/awesome-coq [2] https://github.com/coq-community/vscoq https://github.com/coq-community/vscoq [3] https://github.com/UniMath https://github.com/UniMath [4] https://github.com/math-comp https://github.com/math-comp
- xelxebar 6y agoI agree that figuring out what the symbols mean can be a frustrating part of mathematics, but once that part is done, I find the notation to be lightyears ahead of what normal programming languages can do in the way of communicating an idea directly. Seriously, take any 100 ksloc codebase; how many bugs do you expect to be in there? How many of the developers do you expect to really grok what their code is doing on all functional levels of abstraction? Math papers certainly contain bugs sometimes, even critical ones, but the density of bugs is way lower overall. It's simply much easier to find a bug by staring at a terse one-liner than it is by groveling around 10 pages of "readable" code. Arthur Whitney's code is definitely not approachable, but once you get over the hump, I find it emminently readable compared to what we hackers tend to tout as "readable code." I think most of the debate boils down to different concerns. As a communication tool, what is the function of your code? If it's to introduce ideas to a large audience or many non-inductees, then please, use Python or similar. But if your primary communications are only between the system experts, do you really need to optimize for "this code looks grokkable at first sight"?
- simion314 6y agoYou are demanding to be able to read a random line in the middle of a book and understand everything. This is stupoid, the book/article/theory will have a section that defines everything is used. You have same shit on JS where + can mean do a numeric addition or it can mean concat 2 strings and other powerful languages will allow you to have + enhanced so you can use it to add matrices,vectors,fractions time intervals etc. If you want for example to understand the fundamental theorem of statistics you can read only it and his proof you need to read and understand everything in the book before it.
- foxes 6y agoI disagree completely. You have to be aware of the context. It's like having hundreds of different programming languages. You work in a particular context and you get used to it. I assume you come from a non mathematical perspective.
- LeanderK 6y agoyeah, I would view every Mathmatical discipline or any discipline that heavily involves maths as a different "programming language". Each having evolved their own sets of conventions and styles (e.g. Mathmatical physics vs Statistics sometimes differ in notations despite describing the same thing). You can't switch from one to the other without learning their style of writing. They seem like a crazy mix of noise at first, but that's just because you're not used to it. It's like a javascript developer reading their first lines of rust, or the C-programmer reading their first lines of Haskell.
- enricozb 6y agoHave you ever read a perl program?
- andrepd 6y ago>No question about it. Mathematical notation is pure evil that should be cast into mount doom and then some. This sort of juvenile over-the top hyperbole is getting pretty boring now. Can you present your criticisms like a normal person instead of calling technical things you don't like "terrible and evil"? Especicially when you say (imo) ridiculous statements like "maths is not hard, it's the notation that's hard". Notation is, most of the time, trivial compared to the concepts they represent. Funny you should give "matmul(a,b)" as an example, that would be a pretty atrocious way to write mathematics. Imagine writing "equals( matmul(S,matmul(A,inv(S))) , A)" rather than "SAS⁻¹ = A". Which do you think most clearly represents the concept at hand? The "overloading" that you complain so much about, it actually illuminates the fact that the underlying concept of "scalarmul(a,b)" and "matmul(A,B)" is the same. Going even one step further, Einstein notation: a development purely of notation, that makes dealing with tensor algebra a million times more clear. I swear I don't understand this line of reasoning. EDIT: I'll go out on a limb here: you're a programmer, not a mathematician, so you tend to look at these things from the prism of a programmer, not a mathematician. When all you have is a hammer...
- throwaway_pdp09 6y ago> that doesn't have at least four possible interpretations at first glance show us
- BeetleB 6y ago> The best defense for it is that it evolved from handwriting, where the difference between `matmul(a,b)` and `a x b`, repeated a few dozen times, is significant. These days, as I type, I define commands to turn the unambiguous longhand into the shorthand. How much math/physics have you actually done? In deriving something, or solving a problem, I can have pages of the concise notation. Dealing with your expanded notation would be Hell that no mathematician/physicist would put up with. We struggle even with the concise notation. We'd like an equation to fit on a line, for example, and it's a pain when it doesn't. With your notation, very little of substance would fit on a line. It's a bit like programming in that sense. If you can fit a function in one screen, it greatly improves the chances of you understanding it. With your notation, you're intentionally going verbose. It may help you understand that one line, but will likely make it harder to understand the overall picture. And really, it's not `a x b`, it's 'ab' :-) (And with matrices, it's more often 'AB'). > Mathematical notation is hard, and everyone using it should be a little bit ashamed at how needlessly difficult the field is. Everyone has his preference of comfort. I don't like much of the notation of logic, and I'm thankful most other math disciplines don't replace "and" and "or" and "negation" with the symbols used in logic. However, the set of practicing mathematicians who share your comfort preference is virtually nil. I don't like the concise, implicit notation in general relativity, either (where lots of stuff isn't even written down but kept in your head) - but I'll trust what everyone who has studied it says: You'd go crazy if it were as explicit as I want it - let alone your level of verbosity. Also, as an aside, I've had to read code that represented mathematical operations (numerical integration, matrix operations, etc) written by others, and without comments or access to the author it was virtually impossible to follow. Most of the standard programming language's syntax is poor for mathematics. Edit: I'll add that if your primary exposure is through math journal papers, then I do understand your frustration. They're usually much, much harder to understand than the level in a typical textbook. Unfortunately, this is intentional.