Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Christopher Moretti

Fall 2020


Directory
General Information | Schedule | Assignments | Announcements | Policies

Week-by-Week

The schedule will change throughout the course. Please check it frequently.

Weeks start on Mondays, and are indexed from 1.


Week 1: 8/31 - 9/6

Reading (corresponding): Unix Tutorial for Beginners

Reading (complementary): GNU Emacs Tutorial

Reading (complementary): Linux Pocket Guide (excerpt: Programming with Shell Scripts)

Precepts will NOT meet on Monday 8/31 and Tuesday 9/1.

Lecture 1: (Tuesday) Introduction; Linux and Bash (6up) (Lecture1A and Lecture1B on Kaltura Media Gallery on Canvas (hereafter KMG/C) and YouTube)

Precept 1: (Wednesday/Thursday) Introduction; The Computing Environment; Linux; Bash

Lecture 2: (Thursday) Bash (continued); Version Control using Git [no slides] (Lecture 2 and Lecture 2 supplement on KMG/C and YouTube)


Week 2: 9/7 - 9/13

Reading (corresponding): C Programming (King) 2, 4, 5, 6, 7, 9, 20.1
This is a lot, but two calming notes:
1 - the reading assignments don't continue at this frenetic pace all term, Weeks 2 and 4 are the bulk.
2 - much of this content will already be familiar to you from another high level language, e.g. Java.

Reading (complementary): C Programming (King) 1, 3, 14

Reading (complementary): The Practice of Programming (Kernighan & Pike) 1

Reading (complementary): Wikipedia "Deterministic finite automaton" article

Precept 2: (Monday/Tuesday) Emacs; Bash

(Tuesday 9/8) Introductory Survey Assignment Due (at 9:00PM)

Lecture 3: (Tuesday) C History and Goals; A Taste of C (6up) (Lecture 3 on KMG/C and YouTube)

Precept 3: (Wednesday/Thursday) Simple C Programs; Program Preparation

Lecture 4: (Thursday) C Statements and I/O; Number Systems (6up) (Lectures 4A and 4B on KMG/C and YouTube)


Week 3: 9/14 - 9/20

Reading (corresponding): C Programming (King) 15

Reading (complementary): GNU GDB Tutorial

Precept 4: (Monday/Tuesday) C Fundamentals; Multi-File C Programs (part 1)

Lecture 5: (Tuesday) Numeric Data Types (6up) (Lecture 5 on KMG/C and YouTube)

Precept 5: (Wednesday/Thursday) Multi-File C Programs (part 2); GDB

Lecture 6: (Thursday) Pointers, Arrays, Strings (6up) (Lecture 6 on KMG/C and YouTube)

(Thursday 9/17) De-Comment Assignment Due (at 9:00PM)


Week 4: 9/21 - 9/27

Reading (corresponding): C Programming (King) 8, 11, 12, 13, 16, 17.1-6, 24.1

Reading (complementary): The Practice of Programming (Kernighan & Pike) 2

Reading (complementary): The Practice of Programming (Kernighan & Pike) 4

Reading (complementary): GNU Make Tutorial

Precept 6: (Monday/Tuesday) C Pointers; C Arrays

Lecture 7: (Tuesday) Building with make (6up) (Lecture 7 on KMG/C and YouTube)

Precept 7: (Wednesday/Thursday) C Strings

Lecture 8: (Thursday) Structures, Command Line Arguments, and Dynamic Memory (6up) (Lecture 8 on KMG/C and YouTube)


Week 5: 9/28 - 10/4

Reading (corresponding): C Programming (King) 19

Reading (complementary): The Practice of Programming (Kernighan & Pike) 6

Precept 8: (Monday/Tuesday) Dynamic Memory Management

Lecture 9: (Tuesday) Testing (6up) (Lecture 9 on KMG/C and YouTube)

Precept 9: (Wednesday/Thursday) Tools for Debugging Dynamic Memory Management

Lecture 10: (Thursday) Data Structures (6up) (Lecture 10 on KMG/C and YouTube)

(Thursday 10/1) String Module Assignment Due (at 9:00PM)


Week 6: 10/5 - 10/11

Reading (complementary): The Practice of Programming (Kernighan & Pike) 5

Precept 10: (Monday/Tuesday) Abstract Data Types

Lecture 11: (Tuesday) Debugging (6up) (Lecture 11 on KMG/C and YouTube)

Precept 11: (Wednesday/Thursday) NO PRECEPT - There will be extra office hours Wednesday. The exam period begins Thursday.

Lecture 12: (Thursday) NO LECTURE - The exam period begins Thursday.

(Thursday 9:00AM) Midterm Examination Period Begins (Midterm Exams and Answers from Previous Semesters)

(Saturday 9:00AM) Midterm Examination Period Ends

(Saturday 10/10 and Sunday 10/11) Fall Break


Week 7: 10/12 - 10/18

(Monday 10/12 and Tuesday 10/13) Fall Break

Reading (complementary): The Practice of Programming (Kernighan & Pike) 8

Precept 12: (Wednesday/Thursday) Void Pointers; SymTable Assignment

Lecture 13: (Thursday) Modularity (6up) (Lecture 13 on KMG/C and YouTube)


Week 8: 10/19 - 10/25

Reading (corresponding): C Programming (King) 17.7, 10, 18

Precept 13: (Monday/Tuesday) Function Pointers

Lecture 14: (Tuesday) Processes (6up) (Lecture 14A, Lecture 14B, and Lecture 14C on KMG/C and YouTube)

Precept 14: (Wednesday/Thursday) Scope, Linkage, Duration, Declarations, Definitions

Lecture 15: (Thursday) Directory and File Tree Assignment Concepts and Details [no slides] (Lecture 15 on KMG/C and YouTube)


Week 9: 10/26 - 11/1

Reading (corresponding): ARM 64 Bit Assembly Language (Pyeatt with Ughetta) 2-5

Reading (complementary, for reference only): ARMv8 Instruction Set Overview

Reading (complementary, for reference only): ARM Architecture Reference Manual

Precept 15: (Monday/Tuesday) Abstract Objects; Directory and File Tree Assignment (part 1)

Lecture 16: (Tuesday) Storage Hierarchy (6up) (Lecture 16 on KMG/C and YouTube)

(Tuesday 10/27) Symbol Table Assignment Due (at 9:00PM)

Precept 16: (Wednesday/Thursday) The DynArray ADT; Directory and File Tree Assignment (part 2)

Lecture 17: (Thursday) Assembly Language (part 1) (6up) (Lecture 17 on KMG/C and YouTube)


Week 10: 11/2 - 11/8

Reading (complementary): ARM 64 Bit Assembly Language (Pyeatt with Ughetta) 6-7

Precept 17: (Monday/Tuesday) ARM Architecture Intro; Assembly Language Intro

Lecture 18: (Tuesday) Assembly Language (part 2) (6up) (Lecture 18 on KMG/C and YouTube)

Precept 18: (Wednesday/Thursday) Assembly Language Fundamentals; Assembly Language Control (part 1)

Lecture 19: (Thursday) Assembly Language Functions (6up) (Lecture 19 on KMG/C and YouTube)

(Thursday 11/5) Directory and File Tree Assignment Due (at 9:00PM)


Week 11: 11/9 - 11/15

Reading (corresponding): The C Programming Language (Kernighan & Ritchie) 8.7 (available through Canvas in the "Files" section)

Reading (complementary, for reference only): GNU Gprof Tutorial

Reading (complementary): The Practice of Programming (Kernighan & Pike) 7

Precept 19: (Monday/Tuesday) Assembly Language Control (part 2); Assembly Language Register Addressing

Lecture 20: (Tuesday) Assembly Language Assignment (6up); GDB with Assembly Language Programs (Lecture 20A and 20B on KMG/C and YouTube)

Precept 20: (Wednesday/Thursday) Assembly Language Local Variables; Assembly Language Function Calls

Lecture 21: (Thursday) Performance Improvement (6up) (Lecture 21 on KMG/C and YouTube)


Week 12: 11/16 - 11/22

Precept 21: (Monday/Tuesday) BigInt_add; GDB for BigInt_add

Lecture 22: (Tuesday) Buffer Overruns and the "B" Attack (6up) (Lecture 22 on KMG/C and YouTube)

Precept 22: (Wednesday/Thursday) "B" Attack Recap; Writing Binary; GDB for Buffer Overrun

Lecture 23: (Thursday) "A" Attack Overview; Machine Language (part 1) (6up) (Lecture 23 on KMG/C and YouTube)


Week 13: 11/23 - 11/29

Reading (corresponding): C Programming (King) 24.2-3

Precept 23: (Monday/Tuesday) Mini-Assembler; "A" Attack Details

Lecture 24: (Tuesday) Machine Language (part 2); Closing (6up) (Lecture 24 on KMG/C and YouTube)

(Tuesday 11/24) Assembly Language Assignment Due (at 9:00PM)

(Wednesday 11/25 through Sunday 11/29) Thanksgiving Break


Reading Period: 11/30 - 12/8

(Tuesday 12/8) Dean's Date

(Tuesday 12/8) Buffer Overrun Assignment Due (at 5:00PM)


Final Exam Period: 12/9 - 12/12

(Online) Final Exam Preparation Materials: Final Exam Prep Document, Final Exams and Answers from Previous Semesters, and the Final Exam Preparation Ed post for questions and answers related to old exam questions.

(Wednesday 12/9) Study Day - Office Hours Schedule TBA

(Thursday 12/10 through Saturday 12/12) Final Exam Window

(Saturday 12/12) University deadline for submission of takehome examinations


All lecture notes are copyright 2001-2020 by Andrew W. Appel, David August, Thomas Funkhouser, Aarti Gupta, David R. Hanson, Kai Li, Christopher Moretti, Vivek Pai, Larry Peterson, Jennifer Rexford, Szymon Rusinkiewicz, Jaswinder Pal Singh, Randolph Wang, and/or Robert M. Dondero, Jr. All precept handouts are copyright 2001-2020 by Robert M. Dondero, Jr. and/or Xiaoyan Li. Permission to reproduce these notes for not-for-profit educational purposes is hereby granted. These notes may not be reproduced for commercial purposes without the express written consent of the author.