Introductory Programming (Com S 227)

This page gives access to information about the course offerings of ``Introduction to Programming'' as taught (in Fall 1992, Spring and Fall 1993) by Gary T. Leavens for the Department of Computer Science at Iowa State University. Note that the current version of 227 is a substantially different course.

Information is available under the following headings.

Also available are the following.


This course teaches introductory programming, using Scheme. (For the planning of Iowa State's introductory sequence, see Albert L. Baker, David Fernandez-Baca, and Gary T. Leavens ``Course Specifications for New Introductory Courses: Computer Science 227X and 228X,'' Department of Computer Science, Iowa State University, TR #92-09, April 1992.)

The following information reflects the last time I taught the course. More recent were taught by David Fernandez-Baca.

The course has changed radically starting in Fall 1996.

Course Description

This class is designed to explore computing and to show you some of the art of computer programming. You will see some of what computers can do and how hard or easy it is to do certain things. You will develop a sense of style and aesthetics for programs that will help your programming. You will learn some of the design principles for writing good programs. You will learn a number of programming idioms---standard ways of doing things. Finally we hope to share our sense of the joy and fun in computer programming.

The ISU catalog description of the course is as follows:

An introduction to computer programming. Symbolic and numerical computation. Recursion and iteration. Modularity and data abstraction. Functional and interactive programming. Imperative programming. Emphasis on principles of programming and program design through extensive practice in writing, running, and reasoning about programs. This course is designed for majors. (3 credits).

Numeric computation involves numbers (200+27), while symbolic computation involves letters and other symbols (although we have no plans for teaching graphics yet). Recursion and iteration are two ways of repeating computations. Modularity means designing a program in parts that can be separately understood and tested---the parts are called modules. For example, a bicycle has as modules wheels, frame, brakes, and so on. Functional, interactive, and imperative programming are all styles of programming. Functional programs only use expressions (2+3) and function calls (f(x)) to accomplish their work. Interactive programs talk to the user. Imperative programs add to functional programs a notion of a time-varying state; you can think of the program's state as a piece of paper with data written on it; changing the state is like changing what is written on the paper.

It is important to distinguish programming a computer from using a computer; a programmer designs new programs in much the same sense that an architect designs houses. Another analogy is that a programmer is like someone who writes a cookbook, as opposed to a cook.

To clarify a common misconception---we do not teach C++ in (this old version of) Com S 227. You will learn C++ in Com S 228X, but not in this course. This is not a course about Scheme, it is a course for you to explore computer programming, and Scheme happens to be a good vehicle for that.

Administrative Information

Com S 227, ``Introduction to Programming,'' is usually taken by freshman and sophomores. The class has a ``lecture'' that meets 3 times a week, for 50 minutes a time. It also has a discussion section that meets once a week with a teaching assistant. There are usually 43 or 44 lecture meetings in a semester. The course carries 3 credit hours.


The formal prerequisite for Com S 227 in the ISU catalog is ``2 years of high school algebra and 1 year of high school geometry.'' In terms of ISU math placement tests, this means that you should have placed out of Math 140. Also since Math 165 is a co-requisite of Computer Science 228X, you are advised to not take Com S 227 unless you can complete Math 165 by the end of next term. That means that you should either be taking trigonometry (Math 141 or 142) this term or have placed out of it.


The general objectives for Com S 227 are divided into two parts: a set of essential objectives and a set of enrichment objectives. The essential objectives will be helpful for your career as a computer scientist. You are encouraged to explore the enrichment objectives, both for their own sake and because learning more about those will help deepen your understanding of the essential objectives.

Essential Objectives

In one sentence the essential goal is for you to discover what computing and computer programming have to offer. To do that in a way that is not superficial you should:

The main reason for having this course is to give you an insight into what computing is all about, so that you can be sure you have the right major. Assuming you will go on in computing, we also wish to give you a firm foundation for good programming practice and for later study in computer science or engineering. Hence the main skills we emphasize are those related to being a good programmer, at least in programming small problems.

Good style is partly in the eyes of the beholder, but that you should have some sense of style can hardly be argued. I believe that the best way to enjoy programming, and thus in the long run to excel at it, is to try to make one's programs beautiful.

The concepts of data abstraction, recursion, imperative programming are fundamental to computer science. Functional programming is used as a teaching tool, to gradually introduce concepts and to allow more formal reasoning early on in the study of programming. It is a potentially important paradigm for future programming as well. Procedural abstraction is important because you should only write code once; and because it allows you to encapsulate and name plans that they have used several times.

Enrichment Objectives

Enrichment objectives could be multiplied endlessly. Listed here are those that would be easy to teach based on the text.


The course text is Scheme and the Art of Programming by George Springer and Daniel P. Friedman (McGraw-Hill Book Company, 1989).

Also required is the Project Vincent User's Guide by the ISU Computation Center (Document 134, 1991).

The following are the recommended texts.

The book The Little LISPer by Friedman and Felleisen (MIT Press, 1987) has been helpful to previous students, as it presents the basics of Scheme in a way that is suitable for self-study.

If you have an IBM PC (or compatible) computer, and if you want to run PC Scheme on it, and if you want documentation for PC Scheme, you may also want to buy the book PC Scheme by Texas Instruments (Scientific Press, 1988). This contains reference materials on PC Scheme and the edwin editor (which is like emacs). You do not have to buy this book. (If you have a 80486 processor, you also need a copy of PC Scheme that runs on it, but this book will still give you the documentation.)

If you are new to computers, and have never used an operating system before, you might be wise to go to the bookstore (or the library) and find a book on Unix that suits you. Some suggestions appear in our handout ``Becoming a Computing Professional'' (see Gary T. Leavens, ``Aiding Self-motivation with Readings in Introductory Computing,'' Department of Computer Science, Iowa State University, TR #94-08, May 1994.)


This syllabus tells when we will be discussing the various topics, and reflects the last time I taught the course. The ``when'' is specified below by class meeting numbers (a count of the ``lectures'' which are 50 minutes each). The essential and otherwise unattributed readings are from Scheme and the Art of Programming by Springer and Friedman, The symbol ``PV:'' means the User's Guide to Project Vincent, ``LL:'' means The Little LISPer, ``PS:'' means Programming in Scheme and ``SICP:'' means Structure and Interpretation of Computer Programs. These books are all on reserve at the library.

Some of the following will doubtless be changed, especially the exact dates of tests. If we have more time, we will discuss Chapter 12.

Meetings Topic 		         Essential Readings  Other Readings
1	 Introduction		 Handouts,	     Foreword, Preface 
2-3	 Unix and Proj. Vincent  PV: 3, 4.1-4.2,     PV: 5,8,9.3,10,13-14 
                                    9.1, 11.1-2, 15
4-5	 Data and Operators	 pp. 1-4, 1.3-1.5    p. 5, 1.2, LL: 1, PS: 3 
6-10     Procedures & Recursion  2.1-2.5	     LL: 2-3, PS: 4-5 
11-13    Data Abstraction & Nums 3.1-3.3             LL: 4, SICP: 2 
15	 Test			 1-2                 
14-18	 Data Driven Recursion	 4.1-4.6	     LL: 5-6; PS: 8, SICP: 1.2 
19-23	 Locally Defined Procs   5.1-5.4	     PS: p. 25, PS: 9,11 
24	 Test			 3-4		
25-27	 Interactive Programming 6.1-6.6	  
31	 Test			 5-6	   
28-34	 Abstracting Procedures  7.1-7.5  	     LL:8-9; PS:12, SICP:1.3 
38	 Test			 7		     8 
35-39    Using Vectors 	         9.1-9.3 	     10, PS: pp. 241-243 
40-43    Mutation		 11.1-11.3	     PS: 13, SICP: 3.1-3.3 
44	 Course Eval and Review  		     12-13 

Make your visit count, load this image.
Gary T. Leavens
229 Atanasoff Hall
Department of Computer Science, Iowa State University
Ames, Iowa 50011-1040 USA