While only in the past ten years have large numbers of people been engaged in computer programming, a small body of studies on this activity have already been accumulated. These studies are, however, largely atheoretical. The work described here has as its goal the creation of an information processing theory sufficient to describe the findings of these studies. The theory postulates understanding, method-finding, and coding processes in writing programs, and presents an explicit model for the coding process.