5 ms·
I'd love if all the formulas on Wikipedia were written as pseudo code with meaningful variable names. I'd understand them so much faster.
by mrfusion 11y ago
I'd love if all the formulas on Wikipedia were written as pseudo code with meaningful variable names. I'd understand them so much faster.
- contravariant 11y agoI don't think that's possible for most of them. Quite a few formulas aren't equivalent to any one program, and most variables don't have a fixed meaning. Can't really think of one that could be improved by writing it as pseudo code.
- weinzierl 11y ago> I don't think that's possible for most of them. Quite a few formulas aren't equivalent to any one program, Even every proof can be expressed as a program, see Curry–Howard correspondence [1]. > and most variables don't have a fixed meaning. I think this is kind of the point of the original comment. For a physicist PV=nRT is concise and clear but for everyone else? The letters P, V, n, R, T can have many meanings but in the context of this formula their meaning is fixed. Why not write: pressure * volume = AVOGADRO * BOLTZMAN * temperature > Can't really think of one that could be improved by writing it as pseudo code. See example above, but I think it strongly depends on what one is familiar with. [1] https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...
- vlasev 11y agoThere are a lot of conventions in physics and math and they come to the rescue. In the CONTEXT of gases, it's easy to realize that V must be volume, T must be temperature, etc. The formula PV = nRT is for physicists, not for "anyone else".
- contravariant 11y ago>Even every proof can be expressed as a program, see Curry–Howard correspondence Well, that is true, but that's still pretty far removed from any common programming language. And readability doesn't usually improve. >For a physicist PV=nRT is concise and clear but for everyone else? You've somewhat got a point there, physics would be a lot easier if all formulas and variables were actually defined when needed. But symbolic notation is still a necessity, simply because symbolic manipulation is really powerful, and it's a pain to have to write 'BOLTZMAN_CONSTANT' every single time, instead of just k_B. Also, your notation might work for simple equations like the ideal gas equation, but an equation that's only slightly more complicated, the van der Waals equation, would become quite hideous: (pressure + number_of_particles^2 * attraction / volume^2) * (volume / number_of_particles + excluded_volume) == BOLTZMANN_CONSTANT * number_of_particles * temperature I really wouldn't want to have to write that out several times just to do some calculations with it.
- moultano 11y agoSeriously! Any programmer would get pilloried for working solely in single letter variable names. It's so tedious that this is the norm in math.
- wtallis 11y agoI think it's largely because the long-standing mathematical tradition comes from an era where those formulas always had plenty of context, be it that of a topic-specific class/lecture or a paper that is published in a journal with a particular focus. Once you know what field of mathematics you're dealing with, there are strong conventions for what variables mean what; that's one of the things that has let to mathematics drawing from so many alphabets. It's only been with relatively recent advances in information technology that the highly technical details of many specialties have been aggregated closely enough for the context to be lost. Also, long variable names would greatly obscure the overall structure of many formulas, which could be an even bigger problem.
- narrator 11y agoI think that the short variable names in math come from the time when these things had to be written out in long hand on blackboards. You ever see old sci-fi movies, like "The Day The Earth Stood Still" where professors are working out ideas on huge blackboards? Having long variable names wouldn't fit on the blackboard and would be slow and hurt your hands.
- wtallis 11y agoThe lack of an efficient IME for verbose math input on a computer certainly accounts for why math is still terse when done in real-time such as when extemporaneous lectures or when working something out. But I don't think it fully explains why the convention persists even in published works that took months or years to prepare; there's got to be a significant effect for the readers and not just the writers. If a longhand style of presentation were as clearly superior for mathematics as for software source code, one probably would have caught on by now.