Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Vivek Pai

Spring 2006


Directory
General Information | Schedule | Assignments | Announcements | Policies


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


Week 1: 2/6 - 2/12

Reading (required): C Programming (King) 1, 2, 3, 4, 5, 6 (lightly, noting the differences between C and Java)

Reading (recommended): Programming with GNU Software (Loukides & Oram) 1, 2, 3, 4

Lecture 1: (Monday) Introduction

Precept 1: (Monday/Tuesday) Introduction; The Program Preparation Process

Lecture 2: (Wednesday) Character I/O

Precept 2: (Wednesday/Thursday) UNIX; Xemacs


Week 2: 2/13 - 2/19

Reading (required): C Programming (King) 7, 8, 9, 16.5, 21, 24.1

Reading (required): The Practice of Programming (Kernighan & Pike) 1, 4, 6

Reading (recommended): Programming with GNU Software (Loukides & Oram) 6

Lecture 3: (Monday) Variables, Pointers, and Arrays

Precept 3: (Monday/Tuesday) Simple C Programs

Lecture 4: (Wednesday) Good Programming

Precept 4: (Wednesday/Thursday) C Fundamentals; C Multi-File Programs; Gdb

(Sunday) File Compression Assignment Due


Week 3: 2/20 - 2/26

Reading (required): C Programming (King) 11, 12, 13, 14, 15

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

Lecture 5: (Monday) Scoping and Testing

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

Lecture 6: (Wednesday) Memory Allocation

Precept 6: (Wednesday/Thursday) C Pointers and Arrays (cont.); C Strings; C Constants

(Sunday) MyString Module Assignment Due


Week 4: 2/27 - 3/5

Reading (required): C Programming (King) 16.1-3, 17, 19.1-3, 22

Lecture 7: (Monday) Abstract Data Types

Precept 7: (Monday/Tuesday) C Command Line Arguments; C Files; C Structures; C Dynamic Memory Management

Lecture 8: (Wednesday) Function pointers and ADTs

Precept 8: (Wednesday/Thursday) C Abstract Data Types


Week 5: 3/6 - 3/12

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

Lecture 9: (Monday) Hash tables

Precept 9: (Monday/Tuesday) Void Pointers and Abstract Data Types; The Symbol Table Assignment

Lecture 10: (Wednesday) Binary Numbers

Precept 10: (Wednesday/Thursday) C Function Pointers and Abstract Data Types; A DynArray ADT

(Sunday) Symbol Table Assignment Due


Week 6: 3/13 - 3/19

Reading (required): C Programming (King) 10, 18, 20

Lecture 11: (Monday) Exam Preparation

Precept 11: (Monday/Tuesday) C Declarations and Definitions; Exam Preparation

Lecture 12: (Wednesday) Midterm Examination (Exams from Previous Semesters; This Semester's Exam; This Semester's Exam with Answers)

Precept 12: (Wednesday/Thursday) NO PRECEPT


Week 7: 3/20 - 3/26

(Monday - Sunday) Spring Recess


Week 8: 3/27 - 4/2

Reading (required): C Programming (King) 16.4

Reading (required): The C Programming Language (Kernighan & Ritchie) 8.7 (handout distributed in precepts)

Lecture 13: (Monday) NO LECTURE

Precept 13: (Monday/Tuesday) Abstract Objects; Unions; The Heap Manager Assignment: Introduction

Lecture 14: (Wednesday) Inner Workings of Malloc and Free

Precept 14: (Wednesday/Thursday) The Heap Manager Assignment: The Baseline Implementation


Week 9: 4/3 - 4/9

Reading (required): C Programming (King) 20.1, 20.3

Reading (recommended): Programming with GNU Software (Loukides & Oram) 7, 9

Lecture 15: (Monday) Optimizing Malloc and Free

Precept 15: (Monday/Tuesday) The Heap Manager Assignment: The First and Second Assignment Implementations

Lecture 16: (Wednesday) Make and Gprof

Precept 16: (Wednesday/Thursday) Assembly Language: Getting Started

(Sunday) Heap Manager Assignment Due


Week 10: 4/10 - 4/16

Reading (required): Programming from the Ground Up (Bartlett) 1, 2, 3, 10, B, E

Reading (recommended, for reference only): IA32 Intel Architecture Software Developer's Manual: Volume 1: Basic Architecture; Using as, the GNU Assembler

Lecture 17: (Monday) Computer Architecture and Assembly Language

Precept 17: (Monday/Tuesday) Assembly Language: Fundamentals, Control Transfer

Lecture 18: (Wednesday) Function Calls in Assembly Language

Precept 18: (Wednesday/Thursday) Assembly Language: Gdb for Assembly Language (Part 1); Instruction Operands, Local Variables


Week 11: 4/17 - 4/23

Reading (required): Programming from the Ground Up (Bartlett) 4, 9, F

Reading (recommended): Programming from the Ground Up (Bartlett) 5, 6, 7, 8, 11, 12, 13, C

Reading (recommended, for reference only): IA32 Intel Architecture Software Developer's Manual: Volume 2: Instruction Set Reference

Lecture 19: (Monday) Assemblers and Linkers

Precept 19: (Monday/Tuesday) Assembly Language: Functions; Gdb for Assembly Language (Part 2)

Lecture 20: (Wednesday) Computer Security

Precept 20: (Wednesday/Thursday) Assemblers and Linkers; Machine Language

(Sunday) UNIX Commands in Assembly Language Assignment Due


Week 12: 4/24 - 4/30

Reading (required): C Programming (King) 24.3

Reading (recommended, for reference only): Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification

Lecture 21: (Monday) Operating Systems

Precept 21: (Monday/Tuesday) The Buffer Overrun Attack Assignment

Lecture 22: (Wednesday) Standard I/O Library

Precept 22: (Wednesday/Thursday) UNIX Signals and Alarms

(Sunday) Buffer Overrun Attack Assignment Due


Week 13: 5/1 - 5/7

Lecture 23: (Monday) Signals

Precept 23: (Monday/Tuesday) Gprof; The Execution Profiler Assignment (Part 1)

Lecture 24: (Wednesday) Portability and Course Wrap-Up

Precept 24: (Wednesday/Thursday): The Execution Profiler Assignment (Part 2)


Week 14: 5/8 - 5/14

(Monday - Sunday) Reading Period


Week 15: 5/15 - 5/21

(Monday - Tuesday) Reading Period

(Tuesday) Dean's Date

(Tuesday) Execution Profiler Assignment Due

(Thursday) Exam Preparation Session

(Wednesday - Sunday) Final Examinations


Week 16: 5/22 - 5/27

(Monday) Final Examination, 9:00 AM, Frick Chemistry Laboratory 324 (Exams from Previous Semesters; This Semester's Exam; This Semester's Exam with Answers)


All lecture notes are copyright 2001, 2002, 2003, 2004, 2005, 2006 by Vivek Pai, Jennifer Rexford, Randolph Wang, Kai Li, Andrew W. Appel, Thomas Funkhouser, Larry Peterson, and/or David R. Hanson. All precept handouts are copyright 2001, 2002, 2003, 2004, 2005, 2006 by Robert M. Dondero, Jr. 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.