Live data from Hacker News

Why there is no Hitchhiker’s Guide to Mathematics for Programmers

jeremykun.com

31–40 of 76 posts

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#31
I know this is a bit off topic, but does anyone know of a source (book, video, website, etc) which you could use to review the math from 0 to Calculus in one day? A sort of big picture overview of how math evolves from simple to complex. I've always wanted to do it, just to keep the math in my head fresh.

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#32
The argument of the author sounds like an argument of someone who is addicted to writing ugly Perl one-liners. Many, many, complicated and co-dependent one-liners. "But I need this expressive power to do things!" Perhaps you primary concern should be about explaining things you did, rather than doing them. Especially if your job it to explain something to people.

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#33

I know this is a bit off topic, but does anyone know of a source (book, video, website, etc) which you could use to review the math from 0 to Calculus in one day? A sort of big picture overview of how math evolves from simple to complex. I've always wanted to do it, just to keep the math in my head fresh.

Khan Academy might be exactly what you're looking for. It has videos ranging from addition all the way through to second year undergrad calculus. I've found the most important (and difficult) part of learning math is to force myself to practice.

Much like programming, mathematics is something best learned actively. Simply reading/watching videos rarely gets me anywhere.

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#34
post #17

> “The proof is trivial.” This is the mathematician’s version of piping output to /dev/null. Heh heh. Never thought about it like that. Amazing write-up, btw. As somebody who dabbled in both CS & Math, I'd say the cultures are vastly different. You can spend years, decades even, just teaching undergrad calc courses while having barely 1-2 papers to your name, and yet you'd be considered a legitimate mathematician & g…

I've seen CS papers that use mainstream programming languages directly, instead of pseudocode, so you can just copy/paste it. However, many CS papers aren't an easy lecture either, even if they talk about something really practical. I remember reading the paper on String B-trees, which is a data-structure for string search optimized for external storage (so you don't have to fit the whole index in RAM) and even if I…

Writing prose, even highly structured prose, is an unevenly distributed skill. Thankfully, it's also perfectly possible to get better at it. Would that more academics (lawyers, &c.) would try.

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#35

I've come up against this recently and I think a lot of imperative programmers will. For me, the basic pattern, starting from a career based on perl/php/java was this series of realizations: - EECS circuit design is based on a conceit that gives chips a speed limit - as a result, chips aren't getting much faster and that multi-cores are happening instead - parallel programming will become more and more essential to m…

There's no reason you can't have immutable variables and pure functions in imperative languages, though.

Not that I don't support your quest to learn Haskell, Haskell is awesome and I hope you enjoy it :)

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#36
post #19
post #7

I don't know about the OP's point on the value of proof to programmers. I do optimization and machine learning, and I use all kinds of math on a regular basis. But I don't prove things, and rarely need to follow someone else's proof either. You can get a lot out of applied math without touching a proof. And if it isn't applied, then you really don't need it ;-). I agree there is value in learning how to read math not…

Just because you don't explicitly write it down doesn't mean you didn't prove something. For optimization, you have to prove to yourself that the new code behaves equivalently to the old code. Anytime you use algebra you're doing a small proof to show that two expressions should be treated equivalently. Writing a proof down is the very last step, the hard part is thinking it through.

I do derivations all the time. I just do a series of algebraic transformations, starting from what I have, and getting to what I need. Some might say that I'm doing a proof. But I never use proof by contradiction, contrapositive, induction, or proper proof techniques.

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#37
post #28

There's a lot of interesting and valuable stuff in this post (enthusiastically upvoted!), but I think there are a lot of errors, too. First of all, let's acknowledge that many (the great majority of?) programmers have little or no use for math, and know it, and are correct. That's totally fine. I think danso's comment captures this well, with references to UI design, domain knowledge, engineering practices, etc, and…

I agree.

I would say that people who have not spent a lot of time playing with math are not going to have developed the kind of intuition that will let them understand the subject, or see how to apply it to novel problems. Also there is a dearth of math material aimed at people who don't already have a strong math background. Therefore people who you find who can handle math usually also have a background in proofs.

But it is perfectly possible to explain useful and subtle math points to people who can think well, even though they may lack math background. However as I've found writing articles like http://elem.com/~btilly/ab-testing-multiple-looks/part1-rigo..., it is deceptively harder to do than I'd have thought. Unless a mathematician has specific reason to believe that it will be read by people who do not normally choose to read math, they can't be blamed for not making that effort. (Incidentally the next installment in that series should arrive next week.)

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#38
post #20
post #16

If this is intended as a defense of Math culture, I think it falls short. He does a good job of pointing out the corresponding problems in the state of programming: Indeed, the opposite problems are familiar to a beginning programmer when they aren’t in a group of active programmers. Why is it that people give up or don’t enjoy programming? Is it because they have a hard time getting honest help from rudely abrupt mo…

This isn't entirely true. Numerous mathematicians have publicly bemoaned the difficulty of communication between mathematicians in different specialties. So it's definitely not something that is ignored. The question is what to do about it. We're not just talking about confusion arising from different notation between mathematical specialties (resolving that would be as easy as defining your notation in an appendix),…

Fair enough. But even though there's no hope of coming up with a single programming language for everything, we do have quite good tools for popular areas. It seems like being able to mechanize the error-checking of proofs in certain of the more useful and popular subfields of math might be just what's needed by non-mathematicians?

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#39

I know this is a bit off topic, but does anyone know of a source (book, video, website, etc) which you could use to review the math from 0 to Calculus in one day? A sort of big picture overview of how math evolves from simple to complex. I've always wanted to do it, just to keep the math in my head fresh.

I'll do an outline here - then follow each outline item to Khan Academy for steps and details

* numbers - natural numbers, integers +ve/-ve numbers addition subtraction

* numbers - rationals, reals, multiplication/division

* numbers - fraction and decimal representations - addition/subtraction/mult/division of fractions and decimals

* sets and functions - mappings, single valued and multivalued, domain and range

* powers and exponents

* algebra - functions and equations linear equations, quadratic equations, simultaneous equations

* geometry and trig

^^ althat was pre-calculus and I may have condensed the steps a lot

* limits * continuity of functions

* derivatives

mean value theorem

* integrals

integration and differentiation is often taught in that order but integration is much easier to understand intuitively since areas and volumes are more concrete and tangible velocity as a vector tangent to the direction of motion is less tangible to most.

After this point you take a sidestep and start the process again at a higher level with * sequences and series (limits on steroids) * linear algebra (simultaneous equations on steroids) * multivar calc (calculus on steroids)

Then there's complex analysis, differential equations, partial differential equations and so on.

Note here I am taking the usual more 'applied' approach to math which is tangible. The more 'pure' approach' - abstract and much harder for most is to go

logic and number systems real analysis algebra complex analysis measure theory / probability functional analysis ... which is what you'd do if you were on a pure math rather than an engineering math track.

Hope that helps.

Re: Why there is no Hitchhiker’s Guide to Mathematics for Programmers

#40
post #28

There's a lot of interesting and valuable stuff in this post (enthusiastically upvoted!), but I think there are a lot of errors, too. First of all, let's acknowledge that many (the great majority of?) programmers have little or no use for math, and know it, and are correct. That's totally fine. I think danso's comment captures this well, with references to UI design, domain knowledge, engineering practices, etc, and…

OP here. My point was that if you want to be better at math, then you need to get comfortable with proofs. There are lots of instances of using math for useful things, but if you don't do proofs you won't get any better at understanding mathematics. There are a lot of times when people want to know more about a particular mathematical fact (they genuinely want to understand why it is the way it is) but the minute you tell them, they stop wanting to hear it. This is what I think is ludicrous.

The for loop analogy may be a bit of a stretch, but the reasons for it are as wacky as for the mathematical syntax of inventing or dropping indices. Literally the C99 standard says that if a test expression is missing in a for loop, it's replaced by a nonzero constant. In my mind as a programmer and as a mathematician, that's as arbitrarily confusing as dropping the limits of an indexing variable in a summation. They both just allow you to write/type less and have the expression still mean something.

Post reply on HN