Recursion vs. Iteration: An Empirical Study of Comprehension Revisited

This study compares differences in students' ability to comprehend recursive and iterative programs by replicating a 1996 study. These studies are interesting for the following reasons: (1) there have been few studies on the comprehension of recursive programs, (2) there have been few studies of recursion that involve the use of data structures, (3) subjects were asked to read and comprehend code that manipulated linked lists recursively. In a 1996 study, subjects found a recursive version of a linked list search function easier to comprehend than an iterative version. The results of this study contradict these earlier findings; subjects in this study were equally likely to correctly describe the purpose of the search algorithm, regardless of iterative or recursive implementation. Consistent with the findings in the 1996 study, subjects in this study were more likely to correctly describe the copy task using the iterative version of this problem rather than the recursive version. Subjects who correctly described the purpose of the copy method wrote abstract summaries. Many of the subjects who did not recognize the purpose of the code, and who answered incorrectly, provided a line-by-line (partial) trace of the code. While revealing some understanding of the execution of the code, these subjects were generally not able to see the forest for the trees.

[1]  J. Rohl,et al.  Recursion via Pascal , 1980 .

[2]  Stephen A. Bloch,et al.  Teaching linked lists and recursion without conditionals or null , 2003 .

[3]  Colleen M. Lewis Exploring variation in students' correct traces of linear recursion , 2014, ICER '14.

[4]  Richard T. White,et al.  Book Review: Evaluating the Quality of Learning: The SOLO Taxonomy (Structure of the Observed Learning Outcome) , 1983 .

[5]  Christian Rinderknecht,et al.  A Survey on Teaching and Learning Recursive Programming , 2014, Informatics Educ..

[6]  John R. Anderson,et al.  Learning Flow of Control: Recursive and Iterative Procedures , 1986, Hum. Comput. Interact..

[7]  Bruria Haberman,et al.  The case of base cases: why are they so difficult to recognize? student difficulties with recursion , 2002, ITiCSE '02.

[8]  David B. Sher Recursive Objects--An Object Oriented Presentation of Recursion , 2004 .

[9]  Judith Gal-Ezer,et al.  What (else) should CS educators know? , 1998, CACM.

[10]  Claudio Mirolo Is iteration really easier to learn than recursion for CS1 students? , 2012, ICER '12.

[11]  Alan C. Benander,et al.  Recursion vs. Iteration: An Empirical Study of Comprehension , 1996, J. Syst. Softw..

[12]  Susan Wiedenbeck Learning recursion as a concept and as a programming technique , 1988, SIGCSE '88.

[13]  Susan Wiedenbeck,et al.  Learning Iteration and Recursion from Examples , 1989, Int. J. Man Mach. Stud..

[14]  Edgar G. Daylight,et al.  Dijkstra's Rallying Cry for Generalization: The Advent of the Recursive Procedure, Late 1950s-Early 1960s , 2011, Comput. J..

[15]  Stuart Reges The mystery of "b := (b = false)" , 2008, SIGCSE '08.