Live data from Hacker News

Equations True Computer Science Geeks Should (at Least Pretend to) Know

elegantcoding.com

81–90 of 100 posts

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#81
post #13
post #9

I really wish my brain didn't gloss over the first time I see a math symbol. All of this stuff seems intriguing but it's almost as if I'm hardwired to translate all those symbols into mush. I'd be much more interested in seeing the equivalent code snippets these ideas express.

For several of the equations presented, there's not really a "code equivalent". And for most of the others, presenting it in code form would make it much more verbose and complex than it needs to be. In a way, it's already written in code – it's just been written by mathematicians :) It can be a bit daunting at first, but I find mathematical concepts and notation extremely useful tools for programmers, especially whe…

That's because mathematical notation is context-bound and telegraphic. Gerry Sussman has gone so far as to call it "Impressionistic". Beyond basic arithmetic and elementary algebra, it is much more concise than it is precise -- it is often inconsistent (the "power" in cos^2 x doesn't mean the same thing as it does in cos^-1 x, for instance), and there's a lot of hand-waviness (and sometimes some outright lies) in order to make the notation concise. It's a useful jargon for the initiated, but it is hardly self-explanatory even if you know what the individual symbols are supposed to mean.

A code-like representation may have the disadvantage of being more verbose, but it has the advantage of being unambiguous. It gives up conciseness in favour of precision. And no, it is not impossible to represent mathematical concepts in a code-like manner -- it just forces you to actually say all of what you mean rather than using an ambiguous and incomplete shorthand.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#82
Here's a real simple and practical equation: 1+2+3+4 . . . N = N(N+1)/2

This equation represents the number of edges on a complete graph with N+1 vertices or the number of possible pairings given N+1 objects. Useful when estimating O(N) for certain algorithms that involve comparing an item to every other item in a set.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#83
post #9

I really wish my brain didn't gloss over the first time I see a math symbol. All of this stuff seems intriguing but it's almost as if I'm hardwired to translate all those symbols into mush. I'd be much more interested in seeing the equivalent code snippets these ideas express.

You better toughen up and immerse yourself in math

I actually surround myself in math all the time since I do a lot of game development. A poster above pointed to the math symbol list on wikipedia and I think "Great. I need to scour a daunting page to find the meaning of an obscure symbol?" It's pretty similar to reading a post in another language and I'm not sure it's worth my time considering by the time I figure that out I would have spent an hour decyphering the equations. Google translate for math, perhaps? I'd use it.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#84
post #56
post #9

I really wish my brain didn't gloss over the first time I see a math symbol. All of this stuff seems intriguing but it's almost as if I'm hardwired to translate all those symbols into mush. I'd be much more interested in seeing the equivalent code snippets these ideas express.

I have the same problem, but I think I figured out a way around it. You have to fight the gloss-over effect. It takes conscious effort. Remember that "deliberate practice" all those blog entries say it takes to master something? Well, same thing. You have to deliberately overcome your brain's tendency to go "math is hard, let's go shopping!" Eventually you'll be able to look at an equation and recognize patterns. Whe…

Seems like a lot of effort for an unknown gain - to me. It's about the same as reading a code block in Scala. It may or may not be useful to me but to figure that out I have to go off into a completely different world. I just wish the mathematical symbols weren't hiding so much meaning. Can I really guess what a backwards-E-equals-looking symbol is? Nope. I get it wrong every time.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#85

Here's a real simple and practical equation: 1+2+3+4 . . . N = N(N+1)/2 This equation represents the number of edges on a complete graph with N+1 vertices or the number of possible pairings given N+1 objects. Useful when estimating O(N) for certain algorithms that involve comparing an item to every other item in a set.

Please be careful how you use big-O notation here.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#86
post #50

Shannon's Information Theory, Eigenvector, DeMorgan's Laws, etc. None of those names are meaningful or descriptive. And then the greek letters and made up symbols. Math could learn something from Computer Science: https://www.google.com/search?q=readable+code

Most of math notation is optimized for allowing people talking to each other about abstract concepts to use blackboards and chalk as memory aids.

Mathematical notation is always supposed to be used in a context similar to literal programming.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#87
post #70

Earlier quoted context omitted.

That's totally the standard way that all mathematicians think about n-dimensional spaces. I've never heard a mathematician claim math is the universal solution to all problems... sounds like you had a bad high school experience. Do you need a math-hug? :)

>sounds like you had a bad high school experience. Not exactly high school. I'm a university student in Germany. But yes, it's pretty much a bad experience. I've seen quite a lot of other students which are otherwise bright persons struggle with math simply because they aren't good at learning to interpret arcane sequences of symbols which pretty much represent nothing relevant to reality. Math the way it is taught h…

I studied math and CS in Germany. The mathematicians were usually adept at CS, but the computer scientist didn't--with some exceptions of course--even get what math was about at all.

They should probably stop trying to dumb down the math for computer scientist. Math is hard, and pretending otherwise, won't save one from reality.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#88
post #57
post #50

Shannon's Information Theory, Eigenvector, DeMorgan's Laws, etc. None of those names are meaningful or descriptive. And then the greek letters and made up symbols. Math could learn something from Computer Science: https://www.google.com/search?q=readable+code

Eigenvector isn't that bad, it's just not english: "The prefix eigen- is adopted from the German word "eigen" for "own"[1] in the sense of a characteristic description" (from wikipedia) I think Shannon's Information Theory is pretty fair too. It's about how much information is in a message. Plus, Computer Science has it's own grievous names: A* search, B* search, B tree, B+ tree, B* tree. That always drove me nuts.

And lots of algorithms named after people. Which is fine (we have lots of things named after people in math, too), but not descriptive.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#89

Earlier quoted context omitted.

I disagree. Programming is math. Highly advanced math, in fact. It's just a different type of math. And the 11 equations in the OP's article just barely touches on what CS is about. There is far more to it than that.

No. Programming is logic , and logic is a superset of math. What you need to make good programs isn't some obscure, arcane language that the few who actually understand it (mathematicians) assert to be the universal answer to everything, yet refuse to make it more accessible (when it could be), what you need is logical thinking and the ability to think in abstractions. Yes, studying math will teach you this, because…

This opinion alone will get (and has got) me branded as a heretic amongst many people, and that alone proves how deeply we are stuck in this tar-pit.

Caution is advised when interpreting opposition to a position as justification for the position. This kind of tenuous logic is frequently used to justify continued oppression in e.g. obscure religious communities ("They all hate us, so we must be right!"). I'm not saying your position is invalid (nor as a non-mathematician am I qualified to do so), just that it could be better supported.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#90
post #70

Earlier quoted context omitted.

That's totally the standard way that all mathematicians think about n-dimensional spaces. I've never heard a mathematician claim math is the universal solution to all problems... sounds like you had a bad high school experience. Do you need a math-hug? :)

>sounds like you had a bad high school experience. Not exactly high school. I'm a university student in Germany. But yes, it's pretty much a bad experience. I've seen quite a lot of other students which are otherwise bright persons struggle with math simply because they aren't good at learning to interpret arcane sequences of symbols which pretty much represent nothing relevant to reality. Math the way it is taught h…

I think you are obsessing about minutiae. Perhaps mathematical instruction is very different in Germany than in the United States, or perhaps our brains are simply incompatible, but I've never found symbology to significantly affect my understanding.

Symbols are just convenient and useful abbreviations. In my experience, they facilitate both speed and precision in mathematical work, far and above what is possible in a natural language like English. There is no particular reason why certain concepts are associated with certain symbols apart from convention. Any decent mathematician should be able to operate with any set of symbols, although not necessarily with equal proficiency.

I won't deny that many mathematicians have a hard time expressing themselves in natural-language speech and writing. Perhaps for them the symbols have become a crutch. But I still think you have erected a mental block around an ultimately inconsequential aspect of mathematics, which is needlessly impeding your understanding.

That having been said, I think there are definitely bad ways to approach the use of symbols in instruction. Concepts and their related symbols should be introduced incrementally, and you should always have ample opportunity to practice with the ones you have just learned before having to learn new ones. I think that a well rounded mathematics curriculum should include a course with a significant focus on understanding and manipulating common mathematical and logical techniques, with mathematical language being a significant if not necessary part thereof.

Post reply on HN