Owlspace Course Site (https:owlspaceccmriceedu) |
Discussion Archive (https:mailmanriceedumailmanprivatecomp211discussionl) |
COMP 211: Principles of Program Design
Instructors: |
|
---|---|
|
|
|
|
Staff: |
|
|
|
|
|
|
Mina Yao |
|
Robert Brockman |
|
TBA |
Lectures: |
Duncan Hall (DH) 1064 |
Time: |
MWF 10:00-11:50am |
Labs: |
Ryon 102 |
Times: |
Monday 2:00-3:20 pm, Monday 3:30-4:50 pm, Tuesday 2:30-3:50 pm. |
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 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 by Felleisen et al. QA76.6 .H697 2001 (Available online; no purchase is necessary.)
DrScheme: Please download and use the DrScheme system embedded in Version 4.2.3.
To avoid compatability problems, please make sure you use Version 4.2.3 (as of 1-11-10, the latest version).
Notes for Java: Object-oriented Design
References for Java
[[http:--cnx.org-content-col10213-1.31] [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.
- 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. If you machine is running some flavor of Windows or Linux, go to the [Sun Download Site for the Java SE 6.0. 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 Java 5.0 or Java 6.0 JDK.
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(2009) |
Topic |
Reading |
Lectures |
Problems |
Due(2009) |
Lab |
Supplements |
1 |
Mon |
Jan 11 |
Introduction |
|
W Jan 13 |
||||
2 |
Wed |
Jan 13 |
Scheme primitives; function and data definitions |
W Jan 20 |
|
|
|||
3 |
Fri |
Jan 15 |
Inductive data, conditionals, and the design recipe |
|
|
|
|
||
– |
Mon |
Jan 18 |
School Holiday |
|
|
|
|
|
|
4 |
Mon |
Jan 18 |
Data-directed design I |
|
|
|
|||
5 |
Wed |
Jan 20 |
Data-directed design II |
HW 2 (Solution to 12.4.2 (https:wikiriceedudisplayCSWIKI2111242solss)) |
Th Jan 22 |
|
|
||
6 |
Fri |
Jan 22 |
Mutually Referential Data Definitions |
|
|
|
|
||
Mon |
Jan 25 |
School Holiday |
|
|
|
|
|||
7 |
Wed |
Jan 27 |
Local definitions and Lexical Scope |
Mon Feb 2 |
|
|
|||
8 |
Fri |
Jan 29 |
Functional Abstraction and Polymorphism |
|
|
|
|
||
9 |
Mon |
Feb 01 |
Functions as Values |
|
|
|
|||
10 |
Wed |
Feb 03 |
Lambda the Ultimate |
|
|
|
|
||
11 |
Fri |
Feb 05 |
Generative Recursion |
Mon Feb 9 |
|
|
|||
12 |
Mon |
Feb 08 |
Generative Recursion Illustrated |
|
|
|
|||
13 |
Wed |
Feb 10 |
Complexity and Accumulators |
|
|
|
|
||
14 |
Fri |
Feb 12 |
Accumulators and Tail Calls |
|
|
|
|
||
15 |
Mon |
Feb 15 |
Review and First-Class Functions |
Review prior readings |
Mon Feb 16 |
||||
16 |
Wed |
Feb 17 |
Powerful Functionals |
Review prior readings |
|
|
|
|
|
17 |
Fri |
Feb 19 |
Exam Review |
Review prior readings |
Take-home exam |
|
|
||
18 |
Mon |
Feb 22 |
On to Java |
OO Design Notes Ch 1.1-1.4.1 |
Mon Feb 23 |
parse/unparse (https:wikiriceedudisplayCSWIKI211parsess) |
|||
19 |
Wed |
Feb 24 |
Java Design Recipe |
OO Design Notes Ch 1.1-1.4 |
|
|
|
|
|
20 |
Fri |
Feb 26 |
Defining Inductive Data in Java |
OO Design Notes Ch 1.5 |
|
|
IntList (https:wikiriceedudisplayCSWIKI211IntListdj0) IntListTest (https:wikiriceedudisplayCSWIKI211IntListTestdj0) |
||
21 |
Mon |
Mar 01 |
Static Class Members and the Singleton Pattern |
OO Design Notes Ch 1.6 |
|
|
ObjectList (https:wikiriceedudisplayCSWIKI211ObjectListdj1) ObjectListTest (https:wikiriceedudisplayCSWIKI211ObjectListTestdj1) |
||
22 |
Wed |
Mar 03 |
Polymorphism and Interfaces |
OO Design Notes Ch 1.8 |
|
|
|
ComparableList (https:wikiriceedudisplayCSWIKI211ComparableListdj1) ComparableListTest (https:wikiriceedudisplayCSWIKI211ComparableListTestdj1) |
|
23 |
Fri |
Mar 05 |
Loose Ends and First-class Functions |
OO Design Notes Ch 1.9-1.10, 1.12 |
Fri Mar 13 |
|
|
||
24 |
Mon |
Mar 9 |
The Strategy and Visitor Patterns |
OO Design Notes Ch 1.9, 1.11 |
|
|
IntList.dj1 (https:wikiriceedudisplayCSWIKI211IntListdj1) IntListTest.dj1 (https:wikiriceedudisplayCSWIKI211IntListTestdj1) |
||
25 |
Wed |
Mar 11 |
Visitors, Visitors, Vistors ... |
OO Design Notes Ch 1.11 |
|
|
|
|
|
26 |
Fri |
Mar 13 |
Full Java |
OO Design Notes Ch 1.13 |
Wed Mar 25 |
|
|
||
27 |
Mon |
Mar 16 |
Visibility, Type-Checking, and Generics |
OO Design Notes Ch. 1.10, 1.13 |
|
|
List.java (https:wikiriceedudisplayCSWIKI211Listjava) ListTest.java (https:wikiriceedudisplayCSWIKI211ListTestjava) |
||
28 |
Wed |
Mar 18 |
Generics with Discretion |
|
|
|
|
|
|
29 |
Fri |
Mar 20 |
Mutation: Succumbing to the Dark Side? |
OO Design Notes Ch 1.13 |
|
|
|
|
|
30 |
Mon |
Mar 23 |
Arrays as Bounded Sequences |
OO Design Notes Ch 2.1 |
|
|
|
||
31 |
Wed |
Mar 25 |
Mutable Linked Lists |
OO Design Notes Ch 2.1 |
|
|
BigBiList.java (https:wikiriceedudisplayCSWIKI211BiListjava) BigBiListTest.java (https:wikiriceedudisplayCSWIKI211BiListTestjava) |
||
32 |
Fri |
Mar 27 |
Mutable Trees |
OO Design Notes Ch 2.1 |
|
|
|
TreeMap.java (https:wikiriceedudisplayCSWIKI211TreeMapjava) TreeMapTest.java (https:wikiriceedudisplayCSWIKI211TreeMapTestjava) |
|
33 |
Mon |
Mar 30 |
Designing OO Data Structures |
|
|
|
OOTreeMap.java (https:wikiriceedudisplayCSWIKI211OOTreeMapjava) OOTreeMapTest.java (https:wikiriceedudisplayCSWIKI211OOTreeMapTestjava) |
||
34 |
Wed |
Apr 1 |
Efficient Representations of Maps and Sets |
|
|
|
|||
35 |
Fri |
Apr 3 |
Rice Board Game Framework |
|
|
|
|
|
|
36 |
Mon |
Apr 5 |
OO Design Retrospective |
OO Design Notes |
|
|
|
||
37 |
Wed |
Apr 7 |
Faster Searching Methods |
OO Design Notes |
|
|
|
|
|
38 |
Fri |
Apr 9 |
The Othello Game Framework |
The Othello Game Framework |
|
|
|
|
|
39 |
Mon |
Apr 13 |
Faster Searching Methods |
OO Design Notes |
|
|
MyHashMap.java (https:wikiriceedudisplayCSWIKI211MyHashMapjava) MyHashMapTest.java (https:wikiriceedudisplayCSWIKI211MyHashMapTestjava) |
||
40 |
Wed |
Apr 15 |
Fast Sorting Methods |
OO Design Notes |
|
|
|
|
|
41 |
Fri |
Apr 17 |
Graphical User Interfaces |
OO Design Notes Ch. 3 |
|
|
|
|
|
41+ |
Fri |
Apr 24 |
Optional Othello Tournament |
|
|
|
|
|
Exit Survey
Please take the exit survey to help us improve this course and the core programming curriculum. Follow this link:
Exit Survey
Grading, Honor Code Policy, Processes and Procedures
Grading will be based on your performance on homeworks (worth
50%) and exams (20% for first exam, and 30% for the
second exam).
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.
Mailing Lists:
- 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 relating to the course can be sent 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
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 teachers mailing list (questions of general interest may alternately be raised 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. Taha 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.
Homeworks will generally be handed out on Mondays, and will be due before class
the following Monday.
You are expected to work in groups of two.
You may change partners during the semester.
Partners should work together on all aspects of the homework -- all
students are expected to contribute equally. You and your partner
should hand in exactly one solution.
Late homework will not be
accepted with one exception. Every student is allotted 15 slip days. Each whole day or fraction of a day that an assignment is late counts as a slip day. Each student in the pair submitting a late assignment must spend the requisite number of slip days.
Since assignments get progressively harder during the semester, we strongly encournage you to hoard your slip days for use near the end of the term.
We recommend that you review the homework guide as you develop your solutions. Review the submission checklist when you turn in your homework. Your work will be graded as documented on the grading page.
Reading: For each lecture, there is associated reading. Students are required to complete the reading before the class associated with this reading.
Other Resources:
- Practical matters:
- Special interest groups:
- CSters
- Computer Science Club
- ... (please send in suggestions!)
Additional References:
Here is a nice article about
the basic approach taken in this course.
More on CS: |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76 .D448 1993 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76.9 .A43 H37 2004 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76.5 .H3575 2000 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76 .B495 1997 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76 .B743 1997 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA9.8 .H63 1980 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
Q335 .H63 1985 |
|
|
|
If you liked Scheme, you'll love these resources: |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
(Online) |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76.73 .S34 F75 1996 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76.73 .S34 F77 1996 |
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
QA76.62 H83 2000 |
|
|
|
More on Java: |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
^ |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
|
|
|
More on Data Structures and Algorithms: |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|
Accomodations for Students with Special Needs
Students with disabilities are encouraged to contact me during the
first two weeks of class regarding any special needs. Students with
disabilities should also contact Disabled Student Services in the Ley Student Center and the Rice Disability Support Services.
Access Permissions: (Please don't edit)
- Set ALLOWTOPICCHANGE = Main.TeachersComp211Group