The role of learning from examples in the acquisition of recursive programming skills.

Abstract
An analysis and simulation model of verbal protocols of 2 college students (SS and AD) and one 8-yr-old child (JP) learning to program recursive functions are presented. The model is formalized as a production system capable of acquiring new production rules based on problem-solving experience. The model and protocols suggest: that problem solving by analogy to worked-out examples is frequent in initial attempts by novices to write recursive functions; different representations of examples are used to guide problem solving by analogy; and performance on later problems reflects the particular representations used in problem solving by analogy on earlier problems. The protocols and simulations suggest that learning is facilitated by using abstract representations of the structure of recursion examples to guide initial coding attempts.