Section 52
Spring 2020
Prof. Jenny Walter

Lectures Lab Meetings
T/R @ 1:30 to 2:45 a.m. in SP 309 F @ 3:10 to 5:10 p.m. in SP 309

Note: SP = "Sanders Physics"

Attribution: Thanks to Professor Luke Hunsberger for sharing his course materials!

Contents and Frequented Links

Why you should take this course:

People use computers to solve problems. To be effective, programmers must thoroughly understand not only the problem to be solved, but also the interesting relationship between the programmer, the program and the computer. Investigating this relationship raises several unexpected, but important issues. For example, 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 live computer sessions. (The computer code seen during 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. Most lab sessions begin with a quiz.

The course covers the following topics:

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

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

Nuts and Bolts

Instructor Professor Jenny Walter, Office SP 306 (right across the hall!)
Prof's Email Address jewalter at vassar dot edu
Prof's Office Hours M/W 11am to noon
T/R 2:45pm to 4pm or by appointment (make appointments via e-mail).
Text The textbook for this course is provided online---for free. You may wish to print it out and put it into a loose-leaf binder. This would also be good for holding lab and assignment solutions if you want to print them out.
Lectures The lectures will add to the material covered in the online textbook by providing in-depth examples and analyses. The material covered each week builds 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 SP 309 on Fridays. The lab computers use the Linux operating system and the DrRacket software that we will be using throughout the semester. You must do your lab work in the lab during your scheduled lab time. Each lab session should be viewed as a warm-up to prepare you for that week's upcoming assignment. If you get stuck in lab, raise your hand to ask for help. When you have finished a lab, ask the professor or one of the coaches to verify that you have done the work and they will record your grade on a scale from 0 (no work or no-show), 1 or 2 for partial completion, to 3 (completed).
Each lab, after the first week or so, will begin with a short quiz. Together, these quizzes will serve as warm-ups for the in-class exams.
Exams There will be two in-class exams: one right before Spring break, and another near the end of the semester.

All exams will be hand-written using paper-n-pencil. You may not use any computers or phones, just a pencil (and eraser!). You may bring to each exam one or two 8.5"-by-11" pieces of paper with whatever notes you want to write on both sides. You may consult this sheet of notes during the exam.
Assignments Starting the second week of classes there will typically be one assignment each week. Most 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 (see link below) or Prof. Walter during her office hours.
NOTE: Student coaches are expected to give only limited information about assignment problems to students in this course.
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), either email it to your CS account or copy it to a flash drive and bring the drive to one of the computer science labs (SP 309 or SP 307) to load on the CS Linux network. You will need to create a directory (folder) in your CS Linux account for the lab or assignment, either create or move the files into the folder, and then submit the folder. Details will be provided in the first lab concerning assignment submission.
Assignments will be assessed a 10% penalty for each day they are late and no assignment will be accepted after the assignment has been scored and e-mailed back to each student, usually a week after the due date.
The final programming assignment will be a two-week project that will count the same as two ordinary assignments. It will be due at the end of the semester.
Coaches' office hours Office Hours
Software The computers in the lab are set up for you to use the DrRacket software. If you'd like to set up DrRacket on your own computer, go to to download the software. All submissions must be done on the CS lab computers.
Computer Accounts Each student will be provided with a CS computer account that is distinct from, but which has the same name as, your Vassar computer account. The DrRacket software that is used in this course is available in your CS computer account. More details will be provided during your first programming lab.
Grades Based on Labs (5%), Quizzes (10%), Class Participation and Attendance (5%), Assignments (30%), First Exam (20%), Final Exam (30%).
Note: Although higher numerical scores will necessarily receive the same or higher letter grades, I do not feel bound to follow the frequently used 90/80/70/60 cut-offs.
Academic Integrity Don't cheat! Read Going to the Source: A Guide to Academic Integrity and Attribution 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. In this course, unless explicitly stated otherwise, collaboration is not allowed on assignments; and it is never allowed on exams.
Academic Accommodations Academic accommodations are available for students registered with the Office for Accessibility and Educational Opportunity (AEO) . Students in need of disability (ADA/504) accommodations should schedule an appointment with me early in the semester to discuss any accommodations for this course that have been approved by the Office for Accessibility and Educational Opportunity, as indicated in your AEO accommodation letter.
Title 9 Note Vassar College statement on providing a safe learning environment.
Caution! This course starts out with basic concepts, but each week the online course notes, 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!


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.

Tuesday Lecture

Thursday Lecture

Friday Lab

Jan. 21st no lecture
Jan. 23rd
First Lecture

Go over syllabus (link is above on this page and in a handout).
  • Syntax and Semantics

  • DrRacket data types

    1. Primitive atomic data types: numbers, booleans, empty list, quoted symbols (others will be introduced later).
    2. Primitive compound data types: strings, quoted and non-quoted non-empty lists, structs, vectors.

  • The language of data and the language of operations on the data.
  • The default evaluation rule
  • The global environment

Reading assignment:
Prof. Hunsberger's book Read Chapters 1-6
Not all at once, but we will jump around a bit.

Lecture slides

Extra notes for lecture (Ch. 2 and 3)

Data Types, functions, and literal values
Jan. 24th

  • Continuation of Thursday's lecture - No quiz

  • Default evaluation

  • The global environment

  • Intro to special forms define and lambda

  • Lecture slides

    Racket file for Ch. 1, 2, and 4

    Racket file for Ch. 6

    Jan. 28th
    • Special form evaluation:
      1. define: constants and functions
      2. lambda: lambda means "function"
      3. quote: shield from evaluation


    Lecture slides (Ch. 3 through 5)

    Racket file for Ch. 5
    Jan. 30th
    • Recap of quote, define, and lambda special forms
    • More about design recipes
    • Using unnamed lambda expressions
    • The printf function

    Lecture notes and slides:
    Jan. 31st
    Lab 1
    1. The directions for this lab can be found at this link (a pdf file)
    2. The starter file for lab1 can be downloaded as
    Follow the directions in the lab1inst.pdf file and get checked off for the lab when you are finished.
    Feb. 4th
    • Testing functions (ch. 10):
      1. The require and load functions
      2. The tester function
      3. The check-expect form
    • The if, when, and cond special forms (ch. 11 and 13)
    • Making decisions using predicate functions (ch. 8)
    • The and & or special forms and the not function (ch. 13)

    Lecture notes and slides:
    • Racket file to finish today
      This file covers the define, lambda, nameless lambda, check-expect, and tester.

    • Racket file to start today
      This file covers the relational operators, logical operators, type-checkers, type-specific equality checkers, check-expect, and tester.


    Feb. 6th
    • The if, when, and cond special forms (ch. 11 and 13)

    Lecture notes and slides:
    Feb. 7th
    Lab 2
    1. The directions for this lab can be found at this link (an html file)
    2. The starter file for lab2 can be downloaded from the link below:
    3. The asmt-helper.txt file can be downloaded from the link below:
    Follow the directions in the lab2-inst.html and the lab2-defns.rkt files and get checked off for the lab when you are finished.
    Feb. 11th
    • Function calls and the local environment
    • Recursive functions (Chapter 12): Numerical Recursion
      1. factorial function
      2. summation function
      3. print-n-times function

    Lecture notes and slides:
    Feb. 13th
    • Continuation of Numerical Recursion
      1. summation function
      2. print-n-times function
    • Introduction to structural recursion
      1. The similarity of strings and lists
      2. Functions covered: string, string-length, string-append, substring (overloaded function), string-ref; list, length, append, list-ref, first, rest, cons

    Lecture notes and slides:
    Feb. 14th
    Lab 3
    1. The instructions for this lab can be found at this link (an html file)
    2. The starter file for lab3 can be downloaded from the link below:
    3. The asmt-helper.txt file can be downloaded from the link below:

    Feb. 18th
    • Continuation of Structural (list) Recursion
      1. Using the first and rest functions to access all elements in a list.
      2. Writing a function to process a list of arbitrary size.
      3. Writing a list-processing function with 2 recursive cases.
      4. Writing a function to consume a list and produce a list.
      5. Writing a predicate function over lists.
    • Introduction to tail recursion (Chapter 14)

    Lecture notes and helper function:
    Reading assignment: Chapters 14 through 16.
    Feb. 20th
    • More structural recursion over lists:
      1. Functions to filter lists (my-filter)
      2. Functions to perform an operation on every element of a list (my-map), producing a list
      3. Functions to perform an operation of every element of a list (my-apply), producing a single result
    • Introduction to tail recursion (Chapter 14)
    • Introduction to local special form (like what is in Chapter 15)

    Lecture notes and helper function:
    Feb. 21st
    Lab 4
    • The files for this lab can be accessed from the link below.
      Click this link

    • There will a 10 minute quiz at the start of lab today.

    • The lab will include both recursive and tail-recursive functions.

    Watch this space for the posting of Assignment 3!
    Feb. 25th
    Feb. 27th
    Feb. 28th
    Lab 5
    Mar. 3rd
    Mar. 5th
    Mar. 6th
    Exam 1
    Mar. 10th
    Spring Break
    Mar. 12th
    Spring Break
    Mar. 13th
    Spring Break
    Mar. 17th
    Spring Break
    Mar. 19th
    Spring Break
    Mar. 20th
    Spring Break