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
Instructor
Prof. Nate Nystrom (SI-203)
Assistants
Long Le (2nd floor open space)
Igor Moreno Santos (2nd floor open space)
Book
[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

Schedule

Date Topic Reading Assignments
Tue 18 Sep First program Preface,
Slides,
Notes
 
Wed 19 Sep Atomic data Prologue,
Git slides
Entry survey,
Notes
Mon 24 Sep Functions, more atomic data Part I. Fixed-Size Data,
Sec 1. Arithmetic,
Notes,
intro-to-functions.rkt
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,
Notes,
time.rkt,
circle-test.rkt
 
Mon 1 Oct Booleans, more atomic data Sec 4. Intervals, Enumerations, and Itemizations,
Notes,
booleans.rkt,
enums.rkt
 
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,
Notes,
flashing.rkt,
mode.rkt,
track.rkt
Lab 3,
Lab 3 description
Tue 9 Oct Lab    
Wed 10 Oct Structures    
Mon 15 Oct Big Bang Sec 6. Itemizations and Structures,
Notes,
ball-move.rkt
 
Tue 16 Oct Lab    
Wed 17 Oct More Big Bang drawing-app.rkt  
Mon 22 Oct Lists Part II. Arbitrarily Large Data,
Notes,
drawing-app-with-segment-list.rkt,
drawing-app-with-undo.rkt
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,
list-examples.rkt
 
Mon 29 Oct More lists Sec 12. Design by Composition,
Sec 13. Extended exercises with lists,
Notes,
lists-2.rkt
 
Tue 30 Oct Lab    
Wed 31 Oct Local definitions and lexical scope Notes  
Mon 5 Nov Abstraction Part III. Abstraction,
Sec 16. Similarities everywhere,
Notes
Lab 5,
Lab 5 description
Tue 6 Nov Lab    
Wed 7 Nov BST Sec 17. Designing abstractions,
Sec 18. Using abstractions,
bst.rkt
 
Mon 12 Nov Recursion on numbers Part V. Generative Recursion,
Sec 29. Non-standard Recursion,
Notes
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,
sorting.rkt
Lab 7,
Lab 7 description
Tue 20 Nov Lab    
Wed 21 Nov Quiz 3, Merge sort    
Mon 26 Nov Accumulators Part VI. Accumulators,
Notes,
accum.rkt
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,
(notes/guess-a-number.rkt)
 
Tue 4 Dec Lab / Project    
Wed 5 Dec Binary search Notes,
(notes/binary-search.rkt)
 
Mon 10 Dec Review recursion-review.rkt,
longest.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  

Policies

Labs

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

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.