ABSTRACT

This chapter describes a framework, 'Naive Iteration", which accounts for the conceptualizations underlying the construction of buggy looping programs. The chapter explains where such a view comes from in the first place, and exactly how a mapping onto programming language constructs might take place. Empirical studies of programmers' use of looping constructs indicate that novices have difficulty mapping their own particular view of repetitive sequences onto the constructs of typical modern programming languages. Naive programmers more often have problems coping with the virtual tasks. There is strong evidence suggesting that experienced programmers may have acquired a view of iteration which has influenced their real-world thinking about it. The chapter argues that a novice programmer faced with a coding task involving iteration first goes through a planning phase in which a mental model of the execution sequence must be constructed.