Live data from Hacker News

How not to teach recursion (2021)

parentheticallyspeaking.org

81–90 of 121 posts

Re: How not to teach recursion (2021)

#81
post #68

Maybe the trick is to just teach it young. I first learned about the towers of Hanoi when I was about 14. Blew my mind. It was like circular reasoning that worked somehow. Unlike a lot of people, I don't have this fear/anxiety about recursion. In fact the opposite. I friggin love recursion. I actively seeking out the recursive answer. It doesn't hurt my brain. In fact the opposite, it's gratifying on an almost sexual…

Perfect! I'll add not to teach recursion (or any hi lev math) before 14teen

Re: How not to teach recursion (2021)

#82
post #68

Maybe the trick is to just teach it young. I first learned about the towers of Hanoi when I was about 14. Blew my mind. It was like circular reasoning that worked somehow. Unlike a lot of people, I don't have this fear/anxiety about recursion. In fact the opposite. I friggin love recursion. I actively seeking out the recursive answer. It doesn't hurt my brain. In fact the opposite, it's gratifying on an almost sexual…

You must your kids:

1. Recursion 2. Teach your kids this entire comment

Re: How not to teach recursion (2021)

#84
post #68

Maybe the trick is to just teach it young. I first learned about the towers of Hanoi when I was about 14. Blew my mind. It was like circular reasoning that worked somehow. Unlike a lot of people, I don't have this fear/anxiety about recursion. In fact the opposite. I friggin love recursion. I actively seeking out the recursive answer. It doesn't hurt my brain. In fact the opposite, it's gratifying on an almost sexual…

[deleted]

Re: How not to teach recursion (2021)

#85
post #71

My favorite recursion example is multiplication. Multiplying two numbers is inherently recursive, even though we don't typically think of it that way. (Following is expressed in base 10 for clarity, but in base 2, the multiplications by powers of 10 are of course merely shifts so they don't cost anything.) 68628933 * 26973931 = (6862 * 3931) * 10000 + (2697 * 8933) * 10000 + (6862 * 2697) * 10000 * 10000 + (8933 * 39…

A simpler way multiplication is recursive is the way it is defined for natural numbers in mathematics: a × b = 0 if b = 0 a × b = a + a × (b - 1) if b ≠ 0

a x b = a if b = 1

Re: How not to teach recursion (2021)

#86

I see nothing wrong with either factorial or Fibonacci numbers. The author argues that nobody uses or needs neither factorial nor Fibonacci numbers. But that is not the point. If you are going to teach a concept it's best to use easy to understand examples. And factorial Fibonacci numbers are just that. I rather use factorial to teach recursion than QuickSort using Hoare partition algorithm. And if it comes about tea…

It was counterproductive for me when recursion was taught with Fibonacci and factorials. They were literally the opposite of easy to understand for me, I had absolutely no idea why those examples actually worked, so I just gave up and treated them like magic.

I think recursion should be taught with examples that would be easier for a student to write with recursion than without it. For example, listing all files in a directory.

Re: How not to teach recursion (2021)

#87
What a pretentious take, mathematical concepts that have a recursive variation are not appropriate as a learning tool because "we don't use them"? Since when do we stop teaching recursion after the canonical examples? Do we not teach tree traversals right after? The mathematical examples demonstrate exactly what they are designed to do, the effects of a function called by it self. Tree traversals (or any other abstract data structure traversal) demonstrates side effects might happen in between. Learning anything is a iterative process and that is exactly what the canonical examples are for: an entry point for the learning process.

Re: How not to teach recursion (2021)

#90

What a pretentious take, mathematical concepts that have a recursive variation are not appropriate as a learning tool because "we don't use them"? Since when do we stop teaching recursion after the canonical examples? Do we not teach tree traversals right after? The mathematical examples demonstrate exactly what they are designed to do, the effects of a function called by it self. Tree traversals (or any other abstra…

[deleted]
Post reply on HN