Forwarded: How Not to Teach Recursion
There’s a big difference between knowing the name of something and knowing something.
I think about this statement from Richard Feynman sometimes and often use it as a lens to reflect the depth of concepts I study. Recursion is one such fascinating idea that looks too simple on the surface to grasp.
Recursion was one of the first programming concepts I learnt as a kid - implementing factorials and Fibonacci series. However, as a software engineer I do not consider using recursive solution for potentially suitable problems I face (tail recursion is a separate topic altogether).
This article articulates why our awareness about recursive strategies does not translate to implementations. The author argues that our mental models around recursion are very pedantic, not pragmatic. We are taught to solve niche mathematical problems as examples in classes/books but mostly use such solutions in isolation. This renders the power of recursion as a problem solving technique rather weak as compared to iteration.
The author also inquires the question whether some problems are inherently recursive. The take on the origins of recursion from self-references in data is particularly intriguing. Particularly, the idea that the use of certain data types to solve any given problem inherently affects how the probelm is solved. Moreover, it suggests that using self referential data types (e.g. tree) can potentially lead to the development of recursive problem solving approach.