4 ms·
For some reason, math notation has always felt less formal and rigorous to me than any programming language. Think of how liberating it would be if you could j
by ced 16y ago
For some reason, math notation has always felt less formal and rigorous to me than any programming language.
Think of how liberating it would be if you could just write pseudo-code, and the computer would figure out what you meant, instead of complaining about a missing semi-colon. That's how mathematics is typically written: for other mathematicians to read. But the underlying meaning conveyed is usually very, very precise, more so than in a typical program (which may have bugs in spite of being "formal and rigorous").
you can always run a program to get a result
That's the distinction between procedural and declarative information. Most lower animals, and most programming languages are firmly in the procedural camp. Perhaps the biggest breakthrough in Homo Sapiens was the ability to do declarative reasoning, which is much more flexible and powerful.
There are a few baby steps in declarative programming languages, like Prolog and Mathematica, but the revolution has yet to happen IMO.
- maxwell 16y agoThink of how liberating it would be if you could just write pseudo-code, and the computer would figure out what you meant, instead of complaining about a missing semi-colon. I've noticed Lisp, Python, Ruby, JavaScript, etc. hackers don't tend to talk about "pseudo-code", and I believe it's that they think in their chosen notation, rather than mentally compiling it. I know I do. I think in JavaScript, not "pseudo-code". Not that I wouldn't opt for more elegant notation (e.g. CoffeeScript).
- dangrover 16y agoWell, if by pseudo-code you mean super-terse language fitted for the problem at hand, then yes, that's much better than having to remember semicolons and stuff. But not if you mean not having to fully specify the details of new ideas you're expressing in your chosen language/notation (e.g. the mythical "powerpoint compiler" that turns ideas into code). If your program doesn't compile, or has a fatal flaw in its logic -- whether it's written declaratively or procedurally -- you have to fix it. You don't get to just say "Oh, this is an exercise for the reader, fuck you." I guess my problem really is with teaching more than the actual subject matter. Math, at its best, is a formal system just like anything else. You build understanding through axioms and proving things and you can always test an idea by trying it out. At least, so I hear. I've never actually had it taught that way, and have never been able to make myself think of it that way. In my studies, mathematicians usually prove things more by fiat and intimidation and hand-waving, not by actually working through a system and its rules. It's hard to actually trace reasoning down the entire "stack" like you would when working in code. The only GOOD math-y books I've read are Sipser's Theory of Computation and GEB. The tone of these is "Here's how shit is, and here's why Y makes sense if you accept X", not "Here's the problems you'll be doing on the test, and you have to practice them so you can solve them with pen and paper in less than 2 minutes each" When teaching introductory programming to newbies, part of the goal is to get people to think of it as a consistent formal system that you can do anything you want within to reach your goals. If something doesn't compile or you find a bug, you work through and test your thinking at every way to see what the problem is. But math is usually taught as a set of heuristics for solving pre-defined types of problems. You have to just take it on faith half the time. I wish I could kind of have some kind of epiphany and suddenly understand math, but it's never going to happen.
- tel 16y agoI'm of the opinion that math is something between the two, really. At the end of the day, understanding math lies both in being able to construct and follow rigorous formal declarative proofs and being able to visualize and abstract what those rules have unearthed. Generally conversation switches rapidly between those two modes using each one in its forte to move the discourse along. I won't argue that math is often taught very poorly, but I also want to bring up that most people only want unconnected heuristics. Number theory and algebra are far simpler and more beautiful than add/subtract/multiply/divide, but they're also not very useful in a grocery store. Most people are script kiddie mathematicians at best. The final thing I want to mention is that much of math is discussed at a level that is very far from "formal" but still rigorous and constructive. At this level, there is exploration whereas the formalities tend to exist to fill in the gaps and understand all edge cases. Rigor seems to me to have less value in formal language manipulation and more in complete understanding of the assumptions and conditions required to uphold your theories. So yeah, math can be formalized, but a lot of it exists as a notational convenience sitting upon oceans of convention that let us rapidly invoke and discuss abstract notions. This is why nigh every paragraph in math begins with affixing some temporary, useful notation to the abstract concepts you've introduced.