Do Students Have Difficulty Learning to Program?

At Yale University in the 1980s, Elliot Soloway gave the same assignment regularly in his Pascal programming class [Soloway et al. 1983]:

Write a program that repeatedly reads in positive integers, until it reads the integer 99999. After seeing 99999, it should print out the average.

Called “The Rainfall Problem,” it became one of the most studied problems in the early years of computing education research. In the 1983 paper from which this formulation of the problem is taken (other formulations were explored in other papers), the Yale team was exploring whether having a leave statement (a break in C or Python) improved student performance on the problem. They gave the problem to three groups of students:

  • First-semester CS1 students after learning and using WHILE, REPEAT, and FOR, 3/4 of the way through the term

  • CS2 (second semester of computing coursework, typically a data structures course) students 3/4 of the way through the term

  • Juniors and seniors in a systems programming course

In each class of students, half the students used traditional Pascal and the other half had the opportunity to use Pascal with an added leave statement. The results, summarized in Table 7-1, may shock those who have successfully entered a programming career. Only 14% of the introductory students could solve this problem in raw Pascal? And 30% of the most advanced students couldn’t solve it either? This study was repeated in the literature several times (e.g., ...

Get Making Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.