Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Jennifer Rexford

Fall 2005


Directory
General Information | Schedule | Assignments | Announcements | Policies | Exams


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


Week 1: 9/12 - 9/18

Reading (required): The C Programming Language (Kernighan & Ritchie) 1

Lecture 1: (Thursday) Introduction


Week 2: 9/19 - 9/25

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

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

Lecture 2: (Tuesday) Character I/O

Precept 2: (Wednesday/Thursday) UNIX; Xemacs

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


Week 3: 9/26 - 10/2

Reading (required): The C Programming Language (Kernighan & Ritchie) 2, 3, 4, B1, B2, B4, B6, B11; The Practice of Programming (Kernighan & Pike) 1, 4, 6

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

Precept 3: (Monday/Tuesday) Simple C Programs

Lecture 4: (Tuesday) Good Programming

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

Lecture 5: (Thursday) Scoping and Testing

(Sunday) De-Comment Assignment Due


Week 4: 10/3 - 10/9

Reading (required): The C Programming Language (Kernighan & Ritchie) 5, B3; The Practice of Programming (Kernighan & Pike) 1

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

Lecture 6: (Tuesday) Memory Allocation

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

Lecture 7: (Thursday) Abstract Data Types

(Sunday) MyString Module Assignment Due


Week 5: 10/10 - 10/16

Reading (required): The C Programming Language (Kernighan & Ritchie) 6, 7, B5; The Practice of Programming (Kernighan & Pike) 2

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

Lecture 8: (Tuesday) Function pointers and ADTs

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

Lecture 9: (Thursday) Review of old midterms


Week 6: 10/17 - 10/23 

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

Lecture 10: (Tuesday) Hash tables

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

Lecture 11: (Thursday) Binary Numbers

(Sunday) Symbol Table Assignment Due


Week 7: 10/24 - 10/30

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

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

Lecture 12: (Tuesday) Make and Gprof

Precept 12: (Wednesday/Thursday) NO PRECEPT (Make and Gprof Handouts from Lecture 12)

Lecture 13: (Thursday) Midterm Examination (exam, answers, discussion)


Week 8: 10/31 - 11/6

(Monday - Sunday) Fall Recess


Week 9: 11/7 - 11/13

Reading (required): The C Programming Language (Kernighan & Ritchie) 8.7

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

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

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

Lecture 15: (Thursday) Optimizing Malloc and Free


Week 10: 11/14 - 11/20

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

Precept 15: (Monday/Tuesday) The Heap Manager Assignment: The Second Assignment Implementation

Lecture 16 (alias Precept 15.5): (Tuesday) Assembly Language: Getting Started

Precept 16: (Wednesday/Thursday) Assembly Language: Fundamentals, Control Transfer

Lecture 17: (Thursday) Computer Architecture and Assembly Language

(Sunday) Heap Manager Assignment Due


Week 11: 11/21 - 11/27

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

Precept 17: (Monday/Tuesday) Assembly Language: Gdb (Part 1), Instruction Operands, Local Variables

Lecture 18: (Tuesday) Function Calls in Assembly Language

(Thursday - Friday) Thanksgiving Holiday


Week 12: 11/28 - 12/4

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

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

Precept 18: (Monday/Tuesday) Assembly Language: Functions, Gdb (Part 2)

Lecture 19: (Tuesday) Assemblers and Linkers

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

Lecture 20: (Thursday)Computer Security

(Sunday) UNIX Commands in Assembly Language Assignment Due


Week 13: 12/5 - 12/11

Reading (required): The C Programming Language (Kernighan & Ritchie) 8.1, 8.2, 8.3, B9

Precept 20: (Monday/Tuesday) The Buffer Overrun Assignment

Lecture 21: (Tuesday) Operating Systems

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

Lecture 22: (Thursday) Standard I/O Library

(Sunday) Buffer Overrun Attack Assignment Due


Week 14: 12/12 - 12/18

Reading (required): The Practice of Programming (Kernighan & Pike) 7, 8

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

Lecture 23: (Tuesday) Signals

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

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


Week 15: 12/19 - 12/25

(Monday - Sunday) Winter Break


Week 16: 12/26 - 1/1

(Monday - Sunday) Winter Break


Week 17: 1/2 - 1/8

(Monday - Sunday) Winter Break


Week 18: 1/9 - 1/15

(Monday - Sunday) Reading Period


Week 19: 1/16 - 1/22

(Monday - Tuesday) Reading Period

(Tuesday) Dean's Date

(Tuesday) Execution Profiler Assignment Due

(Wednesday - Sunday) Final Examinations


Week 20: 1/23 - 1/29

(Monday - Saturday) Final Examinations

Exam Preparation

(Wednesday) Final Examination (exam, answers)


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