Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

COMP 211: Principles of Program Design

Instructors:

Prof. Robert "Corky" CartwrightTBA

Staff:

Alina SbirleaTBA

 Dr. Stephen Wong 

 

Kamal Sharma 

 

 

 

Nicholas Coltharp 

Lectures:

Duncan Hall (DH) 1075TBA

Time:

MWF 10:00-10:50amTBA

Lab:

Ryon 102TBA

Time:

Tuesday 10:50am-12:05pmTBA

Office Hours:

  • Dr. Cartwright: MWF 9:00 AM - 10:00 AM
  • Dr. Wong:   See home page
  • Alina: MWF 11:00 AM -12:00 PM
  • Kamal:  MF 3:00 PM - 5:00 PM
  • Nicholas: TR 7:00 PM - 8:30 PM

e-mail the entire class: comp211s11 at owlspace-ccm.rice.edu 

e-mail just the staff: comp211 at rice.edu 

Introduction

  • TBA

e-mail the entire class: TBA 

e-mail just the staff: TBA 

Introduction

This course This course is an introduction to the fundamental principles of programming. The focus is on systematic methods for developing robust solutions to computational problems. Students are expected to have experience writing interesting programs in some credible programming language (e.g., Python, Java, Scheme, C#, C++, Visual Basic .NET, PRL, Scheme, Lisp, etc.) but no specific programming expertise is assumed. The course is targeted at potential Computer Science majors but mathematically sophisticated non-majors are welcome. We expect students to be comfortable with high-school mathematics (primarily algebra, mathematical proofs, and induction) and the mathematical rigor and vocabulary of freshman calculus. Success in the course requires a deep interest in the foundations of computer science and software engineering, self-discipline, and a willingness to work with other people on programming projects. Topics covered include functional programming, algebraic data definitions, design recipes for writing functions, procedural abstraction, reduction rules, program refactoring and optimization, object-oriented programming emphasizing dynamic dispatch, OO design patterns, fundamental data structures and algorithms from an OO perspective, simple Grapical User Interfaces (GUIs), and an exposure to the challenges of concurrent computation.

Students will learn the practical skills required to write, test, maintain, and modify programs. Labs and assignments use the Scheme and Java programming languages.

Text For Scheme: How to Design Programs, Second Edition (DRAFT) by Felleisen et al. QA76.6 .H697 2001 (Available online; no purchase is necessary.)The First Edition was published in 2001 and has LC classification QA76.6 .H697 2001.  We will refer to this text as HTDP.

DrScheme/DrRacket: Please download and use the DrScheme/DrRacket system available from the Racket download site. To avoid compatibility problems, please make sure you use a Version numbered 5.0.2

Notes for Java: Object-oriented Design

...

DrJava: Please download and use the DrJava pedagogic programming environment available from drjava.org. You must install either the Java 5 6 or Java 6 7 JDK on your machine for DrJava to work. (Addendum: DrJava releases starting in 2011 can also run using a Java 7 JDK.) If you machine is running some flavor of Windows or Linux, go to the \[Sun Download Site for the Java SE 6.0 (http://java.sun.com/javase/downloads/index.jsp\]). Make sure that you download the JDK not the JRE. If you have a Mac, a Java JDK is available from Apple. In fact, it is part of the standard Mac OS X software package. DrJava will run on either the Apple Java 5.0 or Java 6.0 JDKmay work with Java 5; it has not been tested since Java 5 is no longer supported by Oracle.) If you machine is running some flavor of Windows or Linux or a recent version of Mac OS X, go to the Oracle Download Site for Java SE 6.0.

Entrance Survey

Please fill out this survey.

Confirm that You Can Attend Lab

The lab is an essential component of the course. Every student should attend lab on Tuesday 10:50-12:05 in Ryon 102.
If you have a conflict, you probably should drop the course. If you have a conflict, but still want to take the course, please come see Prof. Cartwright or Prof. Wong to evaluate your options.essential component of the course. Every student should attend lab on TBA.

Computing Environment

All Comp 211 programming assignments will be run and graded on the CLEAR (Linux) educational computing facility. The Ryon 102 lab is equipped with machines connected to the CLEAR network. For instructions on how to use CLEAR, see the CLEAR web page.TBA educational computing facility. 

Errata

This wiki for Comp 211 is a revision of last year's the Spring 2011 Comp 211 wiki and may contain a significant number of broken links and typos. If you notice an error in the wiki, please send email to the Comp 211 staff Prof. Robert (Corky) Cartwright.

Course Schedule

Note that future date schedules are only guidelines. Future are based on the 2011 calendar; they are merely guidelines for creating a similar calendar.   The homeworks and slides may contain materials from previous Comp 210, 211, and Comp 212 classes. New material will be provided before the corresponding class. There will only be two . In the Spring 2011 edition of this course, there were two take-home exams in the course: one given on functional programming during week 7 and one on object-oriented programming given during in the last week of the course. Both are take-home exams. There is There was no final examination.

 

Day

Date(2011)

Topic

Reading

Lectures

Problems

Due(2011)

Lab

Supplements

1

Mon

Jan 10

Introduction & Scheme Primitives

 

L 1

HW 0

W Jan 12

Lab 0

Pair Programming

2

Wed

Jan 12

Function definitions and conditionals

Read In HTDP, read Part I including the Intermezzo and Chs. 19-10 in Part II

L 2

HW 1

F Jan 21

 

 

3

Fri

Jan 14

Data Definitions & The Design Recipe

Read Chs. 11-1315 (including Intermezzo [Ch. 15])

L 3

 

 

 

 

-

Mon

Jan 17

School Holiday

 

 

 

 

Lab 1

 

4

Wed

Jan 19

Data-directed design

Read Chs. 1416-1520

L 4

 

 

 

 

5

Fri

Jan 21

Data-directed design: trees

 

L 5

HW 2

Mon Jan 31

 

 

6

Mon

Jan 24

Mutually Referential Data Definitions

Read Chs. 16-17

L 6

 

 

Lab 2

Class Demo

7

Wed

Jan 26

 

Read Ch. 18

L 6

 

 

 

 

8

Fri

Jan 28

Local Definitions and Lexical Scope

Read Chs. 19-20

L 7

 

 

 

 

9

Mon

Jan 31

Functional Abstraction and Polymorphism

Read Chs. 21-22

L 8

HW 3

Mon Feb 7

Lab 3

 

10

Wed

Feb 02

Functions as Values

Read Ch. 24

L 9

 

 

 

 

11

Fri

Feb 04

Lambda the Ultimate

Read Chs. 25-28

L 10

 

 

 

 

12

Mon

Feb 07

Generative Recursion

Study Chs. 25-28

L 11

HW 4

Mon Feb 14

Lab 4

 

13

Wed

Feb 09

Complexity and Accumulators

Read Chs. 29.1-2
Skim Chs. 30-32

L 13

 

 

 

 

14

Fri

Feb 11

Accumulators and Tail Calls

Read Chs. 30-32

L 14

 

 

 

 

15

Mon

Feb 14

Clever Programming With Functions

Review prior readings

L 15

HW 5

Mon Feb 21

Lab 5

210 Exam 1
210 Exam 2
Solution to 12.4.2

16

Wed

Feb 16

Exam Review

Review prior readings

L 16, L 17

 

 

 

 

17

Fri

Feb 18

On to Java

OO Design Notes Ch 1.1-1.4

L 18

 

 

 

 

18

Mon

Feb 21

 

OO Design Notes Ch 1.1-1.4

L 18

HW 6 (Optional)
Exam 1

Mon Mar 07

Lab 6

 

19

Wed

Feb 23

Java Design Recipe

OO Design Notes Ch 1.1-1.4

L 19

 

 

 

IntList
IntListTest

20

Fri

Feb 25

Defining Inductive Data in Java

OO Design Notes Ch 1.5
Tony Hoare: "Null References: The Billion Dollar Mistake"

L 20

 

 

 

 

-

M-F

Feb 28-Mar 4

Spring Break

 

 

 

 

 

 

21

Mon

Mar 07

Static Class Members and the Singleton Pattern

OO Design Notes Ch 1.6

L 21

HW 7

Mon Mar 14

Lab 7

ObjectList
ObjectListTest

22

Wed

Mar 09

Polymorphism and Interfaces

OO Design Notes Ch 1.8

L 22

 

 

 

ComparableList
ComparableListTest

23

Fri

Mar 11

Handling Exceptions and Errors

OO Design Notes Ch 1.9-1.10, 1.12

L 23

 

 

 

 

24

Mon

Mar 14

The Strategy and Visitor Patterns

OO Design Notes Ch 1.9, 1.11

L 24

HW 8

Mon Mar 21

Lab 8

IntList
IntListVisitor
IntListTest

25

Wed

Mar 16

Visitors, Visitors, Vistors ...

OO Design Notes Ch 1.11

L 25

 

 

 

 

26

Fri

Mar 18

Accepting Reality: Full Java

OO Design Notes Ch 1.13

L 26

 

 

 

IntList
IntListTest

27

Mon

Mar 21

 

OO Design Notes Ch. 1.10, 1.13

 

HW 9

Fri Apr 4

Lab 9

List
ListTest

28

Wed

Mar 23

 

 

 

 

 

 

 

-

Thurs-Fri

Mar 24-25

School Holiday

 

 

 

 

 

 

29

Mon

Mar 28

Simple Generics in Java

OO Design Notes Ch 1.13.4 (contains advanced material as well)

L 29

 

 

Lab 10

lec29_code.zip  (incl. genList)

30

Wed

Mar 30

Mutation and Bi-Directional Linked Lists

OO Design Notes Ch 1.13

L 30

 

 

 

 

31

Fri

Apr 1

BiLists Continued

OO Design Notes Ch 2.1

L 30

 

 

 

BigBiList
BigBiListTest

32

Mon

Apr 4

Mutable Trees

OO Design Notes Ch 2.1

L 32

HW 10

Wed. Apr 13

Lab 11

TreeMap
TreeMapTest
OOTreeMap
OOTreeMapTest

33

Wed

Apr 6

Mutable Trees

 

L 32

 

 

 

 

34

Fri

Apr 8

Mutable Trees

 

L 32

 

 

 

FunctionalQuicksort

35

Mon

Apr 11

Mutable Trees and OO Data Structure Review

OO Design Notes

L 32

 

 

Lab 12

 

36

Wed

Apr 13

OO Sorting Algorithms

CNX Module on Sorting (incl. insertion and selection sort animations)

L 36

HW 11

Milestone 1: Mon. Apr 18
Milestone 2: Fri. Apr 22

 

Design Patterns Slides
Design Patterns Paper
Sorter Demo

37

Fri

Apr 15

Graphical User Interfaces

 

L 37, 2010

 

 

 

 

38

Mon

Apr 18

Fast Searching and Memoization

 

L 38

 

 

Lab 13

MyHashMap.java
MyHashMapTest.java
BetterMath.java

39

Wed

Apr 20

Fast Sorting Methods

 

L 39

 

 

 

 

40

Fri

Apr 22

Review

 

L 40

 

 

 

 

...