View on GitHub

Programming Fundamentals 1

Fall 2018

PF1 is a first course in programming — applying computation to problem solving. The course is aimed at students with little or no prior programming experience. We’ll be using a programming language called Racket, in which we will practice functional programming. But, this is not a course about Racket; it’s a course about software construction: designing programs and then translating designs into implementations. Designing software means making wise choices about data structures, algorithms, and program organization. Implementing means more than just writing code: it means making wise decisions about systems and interfaces. By the end of the course, students should be familiar with various programming constructs universal to all languages, they should be able to analyze problems and then create programs to solve them.

Lectures Mon, Tue, Wed 8:45–10:15 in Room SI-008
Course staff
Prof. Nate Nystrom (SI-203)
Long Le (2nd floor open space)
Igor Moreno Santos (2nd floor open space)
[HtDP] How to Design Programs, Second Edition
Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Shriram Krishnamurthi, 2018.
Moodle Website PF1 on Moodle
Policies Lab submission and coding conventions
Grading 20% Participation, 10% Project, 20% Quizzes, 50% Final exam


Date Topic Reading Assignments
Tue 18 Sep First program Preface,
Wed 19 Sep Atomic data Prologue,
Git slides
Entry survey,
Mon 24 Sep Functions, more atomic data Part I. Fixed-Size Data,
Sec 1. Arithmetic,
GitHub exercises
Tue 25 Sep Lab   Lab 1,
Lab 1 description
Wed 26 Sep The design recipe Sec 2. Functions and Programs,
Sec 3. How to Design Programs,
Mon 1 Oct Booleans, more atomic data Sec 4. Intervals, Enumerations, and Itemizations,
Tue 2 Oct Quiz 1, Animations Notes Lab 2,
Lab 2 description
Wed 3 Oct Lab    
Mon 8 Oct Compound data Sec 5. Adding Structure,
Lab 3,
Lab 3 description
Tue 9 Oct Lab    
Wed 10 Oct Structures    
Mon 15 Oct Big Bang Sec 6. Itemizations and Structures,
Tue 16 Oct Lab    
Wed 17 Oct More Big Bang drawing-app.rkt  
Mon 22 Oct Lists Part II. Arbitrarily Large Data,
Lab 4,
Lab 4 description
Tue 23 Oct Lab    
Wed 24 Oct Quiz 2, More lists Sec 9. Lists,
Sec 10. Designing with Self-Referential Data Definitions,
Mon 29 Oct More lists Sec 12. Design by Composition,
Sec 13. Extended exercises with lists,
Tue 30 Oct Lab    
Wed 31 Oct Local definitions and lexical scope Notes  
Mon 5 Nov Abstraction Part III. Abstraction,
Sec 16. Similarities everywhere,
Lab 5,
Lab 5 description
Tue 6 Nov Lab    
Wed 7 Nov BST Sec 17. Designing abstractions,
Sec 18. Using abstractions,
Mon 12 Nov Recursion on numbers Part V. Generative Recursion,
Sec 29. Non-standard Recursion,
Lab 6,
Lab 6 description
Tue 13 Nov Lab    
Wed 14 Nov Functional abstraction Sec 19. Nameless functions  
Mon 19 Nov Sorting and computational complexity Notes,
Lab 7,
Lab 7 description
Tue 20 Nov Lab    
Wed 21 Nov Quiz 3, Merge sort    
Mon 26 Nov Accumulators Part VI. Accumulators,
Project idea
Tue 27 Nov Lab / Project    
Wed 28 Nov More accumulators Sec 36. The Loss of Knowledge,
Sec 37. Designing Accumulator-Style Functions,
Sec 38. More Uses of Accumulation
Mon 3 Dec set! Notes,
Tue 4 Dec Lab / Project    
Wed 5 Dec Binary search Notes,
Mon 10 Dec Review recursion-review.rkt,
Tue 11 Dec Lab / Project    
Wed 12 Dec Review longest-acc.rkt  
Mon 17 Dec Project presentations Project  
Tue 18 Dec Project presentations    
Wed 19 Dec Project presentations    
Thu 20 Dec Project presentations in Auditorium (14:00)    
Mon 14 Jan Final exam (meet in room 8) (08:30) Practice exercises  



There will be approximately one lab per week. The lab will be handed out on Tuesday and is due the following Tuesday. Doing the labs is essential to passing the class. The exam will test how well you understand the material and practice with writing code is essential to understanding.

Your lab grade will depend on whether or not you do the lab, not on its correctness. For most labs you and your partner are required to meet with a TA to discuss the lab. The TA will ask you to explain your code and will provide you with feedback.

Code reviews

During the semester the assistants will perform code reviews with you on your labs. You must participate in reviews to get full credit for the “Participation” portion of your grade. Participation includes not just showing up but also being able to present your code and demonstrate that you understand it. The assistants will provide suggestions for improving your code which you should take into account on subsequent labs.

Quizzes and exams

There will be approximately one 20-minute written quiz every two weeks.

The final exam is a 3-hour written exam. The best preparation for the exam is to do the labs and to read the the assigned readings.

The course methodology emphasizes using design recipes to help you design programs in a systematic way. On exams and quizzes, you must demonstrate not only that you can write correct functions, but also that you can write meaningful comments explaining your code and good test cases. Following the design recipe is a good way to demonstrate these.

Group Work

Exams and quizzes must be done alone.

Some labs are individual labs and some labs should be done in pairs. Do not do labs in groups larger than two people. The contributions of each student must be explicitly described. Every code file must have a comment ascribing authorship to an initial author or authors and any collaborators. All students are responsible for understanding the labs during code reviews.


Cheating and plagiarism are unacceptable. You are free to discuss assignments and solutions with others. However, you must write your own assignments, and must not represent any portion of others’ work as your own. Assignments or exams found to have been plagiarized will be given a grade of 0. Allowing others to copy your assignments or exams will result in a 0.