Versions Compared

Key

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

...

Instructors:

Prof. Robert "Corky" Cartwright

Staff:

Alina Sbirlea

 

Dr. Stephen Wong

 

Kamal Sharma

 

 

 

Nicholas Coltharp

Lectures:

Duncan Hall (DH) 1075

Time:

MWF 10:00-1110:50am

Lab:

Ryon 102

Time:

Tuesday 10:50am-12:05pm

Introduction

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

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 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.

...

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

...

  • Principles of Object-Oriented Programming by Zung Nguyen and Stephen Wong. An online self-contained introduction to OOP in Java roughly corresponding to the former Comp 212 course. It is reasonably complete, but still under construction.
  • Design Patterns Lens  - A collection of short descriptions of the design patterns covered in the course.
  • Index to online Java Tutorials by Sun Microsystems The Sun tutorials refer to the full Java language not the Elementary and Intermediate language levels supported by DrJava.Nevertheless, they cover many important language details in depth, such as the complete collection of primitive operators on primitive data types.
  • Java Basics by Fred Swartz is a clearly written traditional introduction to Java that focuses on Java mechanics rather than OO Design. It can be helpful in learning the {\em mechanics} of writing full Java code. Please ignore what he says about program design.
  • Java Notes by Fred Swartz is a reasonably comprehensive Java reference that is a good supplement to the official Sun documents.

DrJava: Please download and use the DrJava pedagogic programming environment available from drjava.org. You must install either the Java 5 or Java 6 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 a the Apple Java 5.0 or Java 6.0 JDK.

Entrance Survey

Please fill out this survey.

Confirm that You Can Attend Lab

...

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.

...

This wiki for Comp 211 is a revision of last year's 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.

Course Schedule

Note that future date schedules are only guidelines. Future homeworks and slides may contain materials from previous Comp 210 and Comp 212 classes. New material will be provided before the corresponding class. There will only be two 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 no final examination.

 

Day

Date(2011)

Topic

Reading

Lectures

Problems

Due(2011)

Lab

Supplements

1

Mon

Jan 10

Introduction & Scheme Primitives

 

L 1, L 2

HW 0

W Jan 12

Lab 0

Pair Programming

2

Wed

Jan 12

Inductive data, conditionals, and the design recipe Function definitions and conditionals

Read Chs. 1-10

L 32

HW 1

F Jan 21

 

 

3

Fri

Jan 14

Data -directed design I Definitions & The Design Recipe

Read Chs. 11-13

L 43

 

 

 

 

-

Mon

Jan 17

School Holiday

 

 

 

 

Lab 1

 

4

Wed

Jan 19

Data-directed design II

Read Chs. 14-15

L 54

 

 

 

 

5

Fri

Jan 21

Mutually Referential Data Definitions

Read Chs. 16-17

Data-directed design: trees

 

L 5 L 6

HW 2

Fri Mon Jan 28 31

 

 

6

Mon

Jan 24

Local Definitions and Lexical Scope Mutually Referential Data Definitions

Read ChChs. 1816-17

L 76

 

 

Lab 2

 Class Demo

7

Wed

Jan 26

Functional Abstraction and Polymorphism  

Read ChsCh. 19-2018

L 86

 

 

 

 

8

Fri

Jan 28 Functions as Values

Local Definitions and Lexical Scope

Read Chs. 2119-2220

L 97

HW 3

 

  Fri Feb 5

 

 

9

Mon

Feb 01

xxx

xxxx

L 9

 

Jan 31

Functional Abstraction and Polymorphism

Read Chs. 21-22

L 8

HW 3

Mon Feb 7 

Lab 3

 

10

Wed

Feb 03 02

Functions as Values Lambda the Ultimate

Read Ch. 24

L 109

 

 

 

 

11

Fri

Feb 05 04

Lambda the Ultimate Generative Recursion

Read Chs. 25-28

L 1110

HW 4

 

  Fri Feb 15

 

 

12

Mon

Feb 08 07

Generative Recursion Illustrated

Study Chs. 25-28

L 1211

 

HW 4

Mon Feb 14 

Lab 4

 

13

Wed

Feb 10 09

Complexity and Accumulators

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

L 13

 

 

 

 

14

Fri

Feb 12 11

Accumulators and Tail Calls

Read Chs. 30-32

L 14

HW 5

 

  Fri Feb 19

 

 

15

Mon

Feb 15 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 17 16

Exam Review Vectors and Iteration

Review prior readings

L 16, L 17

 

 

 

 

17

Fri

Feb 19

Exam Review

Review prior readings

L 17

HW 6 (optional)
Exam 1

18

On to Java

OO Design Notes Ch 1.1-1.4

L 18

 

  Fri Feb 26

 

 

18

Mon

Feb 22 21

On to Java  

OO Design Notes Ch 1.1-1.4

L 18

 

HW 6 (Optional)
Exam 1

Mon Mar 07 

Lab 6

parse/unparse  

19

Wed

Feb 24 23

Java Design Recipe

OO Design Notes Ch 1.1-1.4

L 19

 

 

 

IntList
  IntListTest

20

Fri

Feb 26 25

Defining Inductive Data in Java

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

L 20

HW 7  

 

 

IntList.dj0
IntListTest.dj0

 

-

M-F Mar 01-

05 Feb 28-Mar 4

Spring Break

 

 

 

 

 

 

21

Mon

Mar 08 07

Static Class Members and the Singleton Pattern

OO Design Notes Ch 1.6

L 21

 

HW 7

Mon Mar 14 

Lab 7

ObjectList.dj1
ObjectListTest.dj1

22

Wed

Mar 10 09

Polymorphism and Interfaces

OO Design Notes Ch 1.8

L 22

 

 

 

ComparableList.dj1
ComparableListTest.dj1

23

Fri

Mar 12 11

Handling Exceptions and Errors

OO Design Notes Ch 1.9-1.10, 1.12

L 23

HW 8

 

  Fri Mar 13

 

 

24

Mon

Mar 15 14

The Strategy and Visitor Patterns

OO Design Notes Ch 1.9, 1.11

L 24

 

HW 8

Mon Mar 21 

Lab 8

IntList.dj1
IntListVisitor.dj1
IntListTest.dj1

25

Wed

Mar 17 16

Visitors, Visitors, Vistors ...

OO Design Notes Ch 1.11

L 25

 

 

 

 

26

Fri

Mar 19 18

Accepting Reality: Full Java, Arrays, Mutation

OO Design Notes Ch 1.13

L 26

HW 9

 

  Wed Mar 31

 

IntList.java
IntListTest.java

27

Mon

Mar 22 21

  Visibility, Type-Checking, and Generics

OO Design Notes Ch. 1.10, 1.13

L 27   

HW 9

 Fri Apr 4

Lab 9

List.java
ListTest.java

28

Wed

Mar 24 23

Generics with Discretion  

 

L 28  

 

 

 

 

29 -

Thurs-Fri

Mar 26

Mutation and Bi-Directional Linked Lists

OO Design Notes Ch 1.13

24-25

School Holiday

 

  L 29

 

 

 

 

30 29

Mon

Mar 29

Mar 28

Simple Generics in Java Graphical User Interfaces

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

L 3029

 

 

Lab 10

lec29_code.zip  (incl. genList)

31 30

Wed

Mar 31 30

Anonymous Inner Classes and Task Decomposition Mutation and Bi-Directional Linked Lists

OO Design Notes Ch 21.1 13

L 3130

HW 10  

 

 

BigBiList.java
BigBiListTest.java

 

31 -

Fri

Apr 1

BiLists Continued

OO Design Notes Ch 2.1

School Holiday L 30

 

 

  

BigBiList
  BigBiListTest

 

32

Mon

Apr 5 4

Mutable Trees

OO Design Notes Ch 2.1

L 32

 

HW 10

Wed. Apr 13 

Lab 11

TreeMap.java
TreeMapTest.java
OOTreeMap.java
OOTreeMapTest.java

33

Wed

Apr 7 6

Mutable Trees Review: Confronting the Reality of Full Java

 

L 3332

 

 

 

 

34

Fri

Apr 9 8

QuickSort Revisited Mutable Trees

 

L 3432

HW 11  

 

 

FunctionalQuicksort.java
CallableQuicksort.java
CallableQuicksortAlternateOrder.java
ParallelQuicksort.java
QuicksortWithComparable.java
QuicksortTest.java

35

Mon

Apr 12 Graphical User Interfaces II 11

Mutable Trees and OO Data Structure Review

OO Design Notes

L 35 32

 

 

Lab 12

 

36

Wed

Apr 14 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 for Sorting.pptxSlides
Design Patterns for Sorting SIGCSE paper.pdfPaper
Sorter Demo code.zip

37

Fri

Apr 16 15

Graphical User Interfaces Fast Searching with Balanced Trees

 

L 37

HW 12

 

 

, 2010

 

 

 

  Red-Black Trees
Animated PPT
OOPSLA paper on balanced trees
Executable demo
Demo source code

38

Mon

Apr 19 18

Fast Searching and Memoization

 

L 38

 

 

Lab 13

MyHashMap.java
MyHashMapTest.java
BetterMath.java

39

Wed

Apr 21 20

Fast Sorting Methods Parallel Programming Tradeoffs

 

L 39

 

 

 

 

40

Fri

Apr 23 22

Exam II Review

 

L 40

 

 

Lab 14 

 

Grading, Honor Code Policy, Processes and Procedures

...

Take-home exams, which are pledged under the honor code, test your individual understanding and knowledge of the material. Collaboration on exams is strictly forbidden. AnchorMailingListsMailingLists

Mailing Lists:

.

Anchor
MailingLists
MailingLists

We will normally use the OwlSpace Comp 211 Announcements and General Discussion forum to post important announcements and discussions related to the
class, particularly Q&A on class assignments.   The Owlspace e-mail alias to the entire class (see above) will also be used.

Other Mailing Lists:

  • cs-events-l@mailman
  • comp211-discussion-l@mailman.rice.edu
    (subscribe here (https:mailmanriceedumailmanlistinfocomp211discussionl)):
    • This is where important announcements related to the class will be posted.
    • Students are required to sign up to this list.
    • You may use this list for open discussions relating to the course. \
      Postings are expected to abide by standard \
      Netiquette.
  • comp211-teachers@mailman.rice.edu:
    • Any questions Announcements relating to the course can be sent talks and other interesting events hosted by the CS departments.
    • Subscription to this list .
    • Specific questions about homework problems and grading can be directed here.
  • cs-events-l@mailman.rice.edu:
    • Announcements relating to talks and other interesting events hosted by the CS departments.
    • Subscription to this list is optional but highly recommended

Questions

    • is optional but highly recommended

Questions

If you have a question about homework – you're not sure what is expected for a given problem, you haven't received feedback from a previous assignment, or you don't understand or agree with the assessment of your work, for example – you can raise the question with a TA in lab or on the class mailing list. It is preferable to send a question out for the whole class to discuss so that everyone can benefit from eachother's contributions as well the responses from the staff.   Please restrict messages sent to only the staff to more sensitive matters that do not warrant viewing by the entire class. If you still If you have a question about homework-you're not sure what is expected for a given problem, you haven't received feedback from a previous assignment, or you don't understand or agree with the assessment of your work, for example-you can raise the question with a TA in lab or on the discussion mailing list. If, after doing so, you don't feel that your concerns have been addressed, you may wish to contact Prof. Cartwright or Prof. Sarkar Wong directly.

Homeworks:

Homeworks help you verify your understanding of the material and prepare you for the exams. You are encouraged to discuss the homework problems with the instructors and staff. Help from other students, including Comp 211 graduates, is also encouraged (but should be cited), although that does not include giving or receiving complete answers. All homework partners are responsible for knowing all the submitted material. If you fail to understand the homework solutions, you won't succeed on the exams.

...

Reading: For each lecture, there is associated reading. Students are required to complete the reading before the class associated with this reading.h2

Other Resources

...

The New Turing Omnibus, A. K. Dewdney

QA76 .D448 1993

Algorithmics: The Spirit of Computing, David Harel

QA76.9 .A43 H37 2004

Computers Ltd.: What They Really Can't Do, David Harel

QA76.5 .H3575 2000

Great Ideas in Computer Science, Alan W. Biermann

QA76 .B495 1997

Computer Science: An Overview, J. Glenn Brookshear

QA76 .B743 1997

G�delGodel, Escher, Bach: An Eternal Golden Braid, Douglas Hofstadter

QA9.8 .H63 1980

Metamagical Themas, Douglas Hofstadter

Q335 .H63 1985

...