When you've been taught that computers process a sequence of operations (ie. statements, not actual instructions), from the top to the bottom, it's difficult to imagine "start from the beginning, but rename all variables and substitute some values". Recursion is a bit hard when you do it in assembler (need to explicitly work with the stack), but that's not the mental model we typically use in programming. Yet, it's often the model that the students encounter first.
I really liked the SICP lectures from 1980s where the lecturer goes ahead and demonstrates recursion with evaluating expressions by writing them on a blackboard with chalk. It also demonstrates the space and time complexity of the evaluation.
This is why I think that beginner programming lectures should be more focused on expressions than statements. More functional, less procedural.
I agree! The author does just this when demonstrating the difference between the naïve recursive implementation of `length`, and the tail-recursive one using an accumulator. I don't know if he or she did so with the student, but I thought it was a nice pedagogical touch in the post.
Its especially bad when the definition is given to you as code you barely understand performing either a trivial task in a weird way that would seem to be a simple for-loop or a more sophisticated task involving say trees that you struggle to grasp even without the $5 word hanging over it telling you that you don't understand something.
Terms like self-reference are more intuitive.
One reason I think the word becomes confusing is that recursive functions typically also require introducing a recursive data-structures. It makes the teacher feel powerful introducing a special concept but the learner struggles with what feels like a category error - they were trying to understand a processing concept and now its also a property that can apply to static structures too.
As I think was implicit in rosstex (https://news.ycombinator.com/item?id=12504541 )'s comment, this attitude is worthless. Evidently recursion is not hard for you, but there are people who find it hard. If someone else has found an educational approach that works for at least one such person, then what is the use of sneering at it, without even offering anything constructive in return?
A teacher who said such a thing would not only not help his or her students this time, but ensure that they'd never look for help in the future.
Your points are excellent and constructive. It is well stated that a classroom cannot always be serving the needs of each of its members, since they will sometimes be in conflict, and that part of the job of a teacher is to figure out how best to address these disparate needs.
My objection was not to this constructive point, but rather to the dismissive ideas (not yours, of course) that (1) having difficulty with a concept (whatever that concept is!) is the mark of a mental disability rather than part of the learning process, and (2) it is worthless even to attempt to address and resolve this difficulty.