News for hackers. Stuff that matters.
Re:Programming is hard by MaysonL on Wednesday October 20, 2010 @03:04PM (#1812490)
I did enough math at college that complex data structures and algorithms were not at all scary. Recursion just reminded me of the infinite descending spiral of the ideals in Noetherian rings :) And working through the proofs of the equivalence of a dozen different versions of the axiom of choice helped me learn to reason about my programs. Never used more than a trivial amount of the math content, but the math processes of thought have been invaluable.
Re:Programming is hard by CodeMage on Wednesday October 20, 2010 @03:23PM (#1812605)
Recursion has always been my favorite example of how learning math helps understand programming. If you've ever proven something by induction, you should have no problem understanding recursion.
Re:Programming is hard by edanm on Wednesday October 20, 2010 @03:50PM (#1812765)
Honestly, I think most people who "prove" things using induction don't really understand what they're doing. Then again, most people don't really understand recursion either.
Re:Programming is hard by ent on Wednesday October 20, 2010 @07:52PM (#1813658)
This sounds more like a case of people not understanding what proving by induction is (and as a consequence, not doing so) rather than them proving by induction and and not understanding what they are doing.
Re:Programming is hard by tkahn6 on Wednesday October 20, 2010 @07:18PM (#1813554)
Honestly, I think most people who "prove" things using induction don't really understand what they're doing

Can you explain what you mean by this?

Re:Programming is hard by edanm on Wednesday October 20, 2010 @07:26PM (#1813584)
Sure.

In my experience, most people who go through math classes at a University, not to mention classes in High School, are mostly "blindly" following a template of how to do induction. They don't really understand the principle behind it, why it's a valid proof technique, etc. Put another way, if I used induction incorrectly, I could probably still trick them into thinking it's a valid proof because it looks like induction.

The same goes for a lot of things in Mathematics. The same also goes for recursion - most people don't really understand recursion (unless it's used at a "simple" level, like in Tree Recursion).

Re:Programming is hard by lmkg on Wednesday October 20, 2010 @08:27PM (#1813744)
> if I used induction incorrectly, I could probably still trick them into thinking it's a valid proof because it looks like induction.

You mean like this one?

http://en.wikipedia.org/wiki/All_horses_are_the_same_color

My college calculus professor used this example when she was teaching induction.

Re:Programming is hard by johnaspden on Thursday October 21, 2010 @06:11AM (#1814875)
Beautiful. Thank you.
Re:Programming is hard by jemfinch on Wednesday October 20, 2010 @10:46PM (#1814078)
That's a perfect demonstration of the difference between epistemic induction (unprovable) and mathematical induction (provable).
Re:Programming is hard by RiderOfGiraffes on Thursday October 21, 2010 @04:37AM (#1814736)
Er, actually it's not. It is mathematical induction, but with a broken case.