Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 when designing algorithms. It allows you to express powerful, abstract ideas in a few lines whereas the same reasoning in pseudo-code would take much more time and effort.

I'm glad my undergraduate program was heavy on the math (although I hated it at the time)– it made graduate CS courses easier to understand, and programming easier for me in the long term. I actually miss my pure math courses now.



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: