Cosmetic Errors of Beginning Scheme Programmers

Clint Ryan
(Professor Michael Clancy)

"Cosmetic errors" are significant errors that produce results that, at least to beginning programmers, appear to be essentially correct except for minor formatting issues. An example common among students in CS 3, "Introduction to Symbolic Computing," is a procedure that should return a number, such as 4, but actually returns a list with a number as its only element, such as (4). Another example is a procedure that returns exactly the list that it should, except that it contains a null list as its last element. Many students consider procedures such as these to be essentially correct. Others seem not to even notice the difference, although the list (2 3 5 7 ()) is clearly not the list (2 3 5 7).

The goal of this research is to determine how it is that students can continue to make these mistakes once they have a good understanding of the different Scheme data types, and to develop exercises that help students stop making these mistakes. While there appear to be a number of different reasons for these errors, some of the most common involve the way students understand null or one-item lists and empty strings (called empty words in CS 3). For example, some students view empty lists and strings as "nothing," which can be safely ignored when it shows up in another list and used as a return value if a procedure is given arguments out of its range. Others, including a number of very good students, believe that one-element lists are useless and that Scheme automatically converts them to the element they contain.

Guided by informal interviews and assessments given in summer and fall 2002, we will assess and interview CS 3 students about null and one-element lists and empty words at the start of the spring 2002 semester. Using the data we gather, we intend to target certain cosmetic errors that typically occur later in the semester. If this proves to be successful, we can design activities that address cosmetic errors throughout the semester.

Send mail to the author : (

Edit this abstract