CMPU-101

Computer Science I

Fall 2009



Section Professor Class Meetings (OLB 105) Lab Meetings (OLB 104)
CMPU-101-01 Hunsberger Tue/Thu @ 12:00 - 1:15 p.m. Mon @ 1:30 - 2:45 p.m.
CMPU-101-02 Hunsberger Tue/Thu @ 3:10 - 4:25 p.m. Mon @ 3:10 - 4:25 p.m.


Contents and Frequented Links


Overview

People use computers to solve problems. To be effective, programmers must understand not only the problem to be solved, but also the relationship between the programmer, the program and the computer. Investigating this relationship raises several unexpected, but important issues. For example, how can we interpret a computer (i.e., a piece of hardware) as a computational device? How can different kinds of data be stored in computers? What sort of language do we want to use to "communicate" with a computer? What sorts of problems can computers be expected to solve? What are the basic elements of computation? What concepts or constructions can facilitate the task of programming a computer? This course addresses these and other important issues by having students directly interact with computers from the very beginning. The lectures involve the exploration of topics not only by discussing them, but also by regularly putting ideas to the test in a live computer session. (The computer code seen in lecture is regularly posted on the course web site.) The course includes weekly lab sessions in which students get regular hands-on experience with the issues being addressed in the lectures. These lab sessions also serve as a kind of warm-up for the weekly programming assignments in which students explore issues in greater depth.

The course covers the following topics:

These topics are addressed in the context of the Scheme programming language. Although these topics could be discussed in the context of any programming language, Scheme is a good choice because it has a comparatively simple computational model and syntax, yet is as powerful as any programming language.

To facilitate the writing and running of programs, this course employs the DrScheme software, which is installed on all of the lab computers and is freely available from drscheme.org.

There is no textbook for this course. Instead, students will be provided with handouts and other materials as needed throughout the semester. In addition, links to online books will be provided after the first couple of weeks.

Nuts and Bolts

Instructor Prof. Luke Hunsberger, OLB 121
Prof. Hunsberger's Office Hours See My Web Page
Text There is no textbook for this course. Instead, you will be provided with a variety of handouts and other materials. You are strongly encouraged to purchase a 1-inch think loose-leaf binder to hold the numerous handouts that you will receive during the course of the semester.
Lectures The lectures will be used to present new material, typically augmented by handouts. Most lectures will use live programming sessions to analyze and test the concepts being presented. Program code from these sessions will typically be posted on the course web page shortly after class. The material covered each week will build on what was covered in prior weeks. As such, it is essential that you attend every lecture (and keep up with the reading assignments).
Labs This course has weekly lab sessions held in the Intro Computer Lab in OLB 104. These computers use the Linux operating system and have the drScheme software that we will be using throughout the semester. Even if you have the DrScheme software installed on your own computer, you must do your lab work in the lab on one of the lab computers during the lab time. Each lab session should be viewed as a warm-up to prepare you for that week's forthcoming assignment. There is nothing to turn in or submit for a lab session. Instead, when you are finished, simply ask the professor (or lab coach) to verify that you have done the work and he/she will record your grade on a scale from 0 (no work) to 3 (well done).
Exams There will be two in-class, paper-and-pencil midterm exams and one final exam. All exams will be open-book and open-notes. However, no electronic devices will be allowed during the exams.
Assignments There will generally be one assignment each week. Most of the assignments will be programming assignments. Unless explicitly authorized for a particular assignment, collaboration is NOT allowed on assignments. If you run into difficulty with an assignment, you should contact one of the student coaches during their office hours or Prof. Hunsberger during his office hours. All programming assignments must be submitted electronically. As you will find out, submitting assignments electronically is easy to do from the Lab computers. If you want to do a programming assignment on your own computer (see "Software" below), save a copy of your assignment files on a USB flash drive and submit the assignment from one of the Lab computers. More details will be provided in the near future about how to submit an assignment electronically. You must also turn in a paper copy of your programming assignments.
Coaches' Office Hours Office Hours
Software The computers in the lab are set up for you to use the DrScheme software. If you'd like to set up DrScheme on your own computer, visit drscheme.org. (Let me know if you have any trouble. In the meantime, use the computers in the lab.)
Grades Based on Labs (15%), Assignments (55%), First Midterm Exam (10%), Second Midterm Exam (10%), and the Final Exam (10%).
Note: Although higher numerical scores will necessarily receive higher grades, I do not feel bound to follow the frequently used 90/80/70/60 cut-offs.
Academic Integrity Don't cheat! Read Originality and Attribution: A guide for student writers at Vassar College. The guidelines that apply to writing in general apply equally well to the writing of computer programs. Copying someone else's code without attribution amounts to plagiarism! School policy dictates that instructors must report all suspected incidents of cheating to their department chair. Did you read the preceding sentence?! Please don't put yourself or your professor in that position.
  • In this course, collaboration is not allowed on assignments or exams.
  • However, you are encouraged to work in pairs on the labs.

Note: The paragraph above, as well as the one that follows below, were lifted practically verbatim from the web page for sections 02 and 03 of CMPU-101 in the Fall of 2006!
Students with Disabilities Academic accommodations are available for students with disabilities who are registered with the Office of Disability and Support Services. Students in need of disability accommodations should schedule an appointment with me early in the semester to discuss any accommodations for this course which have been approved by the Office of Disability and Support Services, as indicated in your DSS accommodation letter.
Caution! This course starts out with basic concepts, but each week the text segments, lectures, labs and assignments build new ideas on top of what was seen previously. Therefore, it is extremely important that you attend all lectures, keep up with the reading, and do all labs and assignments in a timely fashion. Historically, those students who experienced difficulty with CMPU-101 got into trouble by ignoring this advice. If you find yourself having trouble, by all means, come to my office hours! I'm more than happy to assist!

Calendar

The following calendar of lecture topics will be filled out during the course of the semester. Typical calendar entries will also include links to the code we looked at in class that day.

Mon. (Lab)

Tue.

Thu.r

Aug. 31
Introduction to CMPU-101
Sept. 1
Introduction to Scheme and DrScheme (pages 1-12), the basic computational model of Scheme.
Sept. 3
Introduction to Scheme and DrScheme (pages 13-22), the define and quote special forms.
Sept. 7
LABOR DAY: No Lab!
Sept. 8
The lambda special form.
Code from class
Asmt. 0 SOLUTIONS!
Sept. 10
Defining and using functions; strings, printf, load, the RUN button, comments.
Handout (pages 23-26), Code from class
Sept. 14
Lab 1 SOLUTIONS!
Sept. 15
Conditional Expressions and Boolean Operators: if, cond, and, or, not
Handout (pages 27-33), Code from class
Asmt. 1 SOLUTIONS!
Sept. 17
Conditional expressions (continued)
Code from class
Sept. 21
Lab 2 SOLUTIONS!
Sept. 22
Design Recipes and a snippet of Recursion
Code from class
Asmt. 2 SOLUTIONS!
Sept. 24
More Recursion
Code from class, Handout (pages 34-39)
Sept. 28
Lab 3 SOLUTIONS!
Sept. 29
More fun with recursion!
Code from class
Asmt. 3 SOLUTIONS!
Oct. 1
Accumulators and Tail Recursion
Code from class, Handout (pages 40-49)
Oct. 5
Lab 4 SOLUTIONS!
Oct. 6
More accumulator-based tail recursion; and the let special form.
Asmt. 4 SOLUTIONS!
Code from class, Handout (pages 50-55)
Oct. 8
Lists and list-based recursion!
Code from class .
Oct. 12
FIRST MIDTERM EXAM: Paper-and-pencil exam held during the Lab period. Exam 1 Solutions!
Oct. 13
More list-based recursion: functions that return numbers or booleans.
Handout (pp. 56-58), Code from class
Asmt. 5 SOLUTIONS!!
Oct. 15
More list-based recursion: functions that return lists.
Code from class
FALL BREAK FALL BREAK FALL BREAK
Oct. 26
Lab 5 SOLUTIONS!!
Oct. 27
List-based recursion with accumulators; the MERGE-SORT algorithm.
Code from class
Asmt. 6 SOLUTIONS!!
Oct. 29
Defining functions that take any number of inputs, functions that take at least N inputs, functions that take other functions as input.
Code from class
Nov. 2
Lab 6 SOLUTIONS!!
Nov. 3
Fun with the built-in MAP and APPLY functions!
Code from class
Asmt. 7 SOLUTIONS!!
Better version of APPLICATE
Nov. 5
Functions that return other functions; LETREC.
Handout on LETREC
Code from class
Nov. 9
Lab 7 SOLUTIONS!!
Nov. 10
Hierarchical lists.
Code from class
Asmt 8 SOLUTIONS!!
Nov. 12
Defining custom data structures using define-struct; recursive data structures: Binary Trees.
Code from class
Nov. 16
Exam 2 SOLUTIONS!
Nov. 17
More about binary trees!
Code from class, binary-trees.txt
Nov. 19
Vectors and Destructive Programming!
Code from class
Asmt. 9: Due Wed., Nov. 25 @ 3 pm.