|Professor Robert "Corky" Cartwright|
|Office Hours:||MW 2:00PM – 2:50PM|
|Office Hours:||T 5:00PM – 7:00PM|
|Office Hours:||Thursday 3:00PM – 4:50PM
Course website: http://www.cs.rice.edu/~javaplt/311/
Course mailing list: email@example.com
Email address to reach the entire teaching staff: firstname.lastname@example.org
Check the website and the mailing list regularly. The assignments will be posted on the website, and the schedule will be adjusted as we go along. The mailing list is probably the fastest way to get help.
The recommended textbook for this class is Friedman, Wand, and Haynes, Essentials of Programming Languages, 2nd ed. (MIT Press, 2001).
Please also look at the additional references and the language resources on the course website.
7 programming projects
2 written take-home exams during the semester
Potentially several written homework assignment
The purpose of the homework is to deepen your understanding of the material introduced in class and to prepare you for the exams. The assignments will be posted on course website.
Generic Java (Java 1.5), Scheme and O'Caml are the only languages that are acceptable for use in the assignments in this course. Scheme and O'Caml are used in most of the examples given in lecture because they are more concise, but the same abstractions can be expressed equally well in Java. Students who elect to do the assignments in Generic Java are expected to write their programs in the essentially same "mostly functional" style as well-written Scheme code. Mostly functional Java programs rarely mutate the fields of objects or classes. A thorough understanding of the composite and visitor design patterns is a prerequisite to writing good solutions in Java. For tutorial guidance on how to write interpreters in Generic Java, see Dr. Cartwright's lecture notes on Object-Oriented Program Design (HTML) (postscript).
On the other hand, Java 1.5 is an industrial strength language that supports "programming in the large" more effectively than Scheme because it supports OO design and provides precise static type checking. If you have taken Comp 212 or have a good background in OO design patterns, then we strongly encourage you to do the assignments in Java. Java 1.5 supports generics, the parameterization of classes and methods by type and performs type checking at the level of parameterized types - eliminating the need for the most common uses of casting in Java. If you choose to use Java, you have to use generics.
The Java 1.5 compiler can be downloaded from the Java website at Sun. The compiler is also available on Owlnet in /home/comp311/packages/jdk1.5.0/bin. The entire compiler distribution tree is available at /home/comp311/packages/jdk1.5.0. The Java programming platform also includes an effective unit testing tool called JUnit which we expect you to use to test your Java programs. We will only support the course software on on Owlnet machines. The supported Scheme implementation will be DrScheme Release 208 and the supported Java implementation will be DrJava which incorporates a compiler ` for Java 1.5. Once you register for the course on Owlnet by typing "register comp311" and confirming that you do want to register, all these programs get added to your path automatically.
O'Caml combines some of the advantages of Scheme and Java. O'Caml is a "mostly" functional language like Scheme but it has an industrial strength type system and some (albeit quirky) support for object-oriented programming. The main disadvantages of O'Caml is the brittleness of its type system and the paucity of tools to support software development in O'Caml. In addition, software development in O'Caml is not nearly as close to "real world" programming experience as the corresponding software development in Java. The O'Caml type system is inflexible because every data value belong to a unique monotype. In contrast, every Java object belongs to an extensive hierarchy of class and interface types. The only way to abstract over monotypes in O'Caml is to use implicit polymorphism which is quite restrictive.
All assignments will be graded based on how they perform using the current releases of DrScheme and DrJava on Owlnet.
We strongly encourage you to use pair programming on these projects, but we realize that scheduling constraints may make pairing impossible at times. Nevertheless, we expect both students on a team to understand every part of the project. Please employ good coding practices and document your programs extensively. Include a README file with your submission that explains how your project functions and how to invoke it. Test your program well! We will usually supply you with some test cases, but you are expected to add more.
Later projects heavily depend on earlier ones. Please make sure your projects are easy to use and extend (that's why good coding practices are important). For the first three projects, we will give you support code for the first project and solutions to the preceding project for the second and third projects. After that, you will have to use your own code.
The projects are due about every one and a half weeks. For an up-to-date schedule, please check the course website regularly. The assignments do not involve huge amounts of code, but the concepts behind them can be very deep. Please start early.
If you cannot find a partner, please email one of the teaching assistants or post to the mailing list.
There will be two written take-home exams, one approximately in the middle of the semester, one during the last week of classes.
Your grade in this course will probably be based on home work assignments (50%) and the exams (50%).
Each student has seven (7) slip days that can be used for any homework assignments during the semester, exams excluded. An assignment that is submitted up to one day late will be accepted at the cost of one slip day. Similarly, an assignment that is submitted up to two full days late will be accepted at the cost of two slip days. A day consists of 24 hours; weekend days are included.
If a student has no slip days left, late submissions will not be accepted. If there are any extraordinary circumstances, please try to let us know in advance.
Recommendation: Save your slip days until the end of the term when the assignments are longer and more challenging.
You are encouraged to talk with the lecturer, the teaching assistants, and to any classmates that you choose about the homework. Such conversations are to help you understand the lecture material, the homework problem, and possibly even the key idea for the solution. However, you are ultimately responsible for writing your own solutions in cooperation with your partner. You must do all work jointly with your partner; this stipulation includes every line of code. You and your partner are not permitted to copy the solution from another source.
If you have a general question, please post to the mailing list at email@example.com. We will be monitoring it and by answering questions there, we can help the entire class. Please subscribe so you will also receive messages sent to the mailing list.
If your question involves code, please DO NOT post to the mailing list (see honor code policy). Instead, send an email to firstname.lastname@example.org to reach the entire teaching staff.
Students with disabilities are encouraged to contact the instructor or the teaching assistants 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.
A lot of you might be more comfortable with Java. Solutions in Java are straightforward to write but Java is a very wordy language so they require many more lines of code than the corresponding Scheme or O'Caml solutions. For this reason, most code fragments shown in class will be in Scheme or O'Caml.
Start working on the projects early. While they do not involve a terrible amount of code, the concepts behind them are very deep. Make sure your approach is correct.
Code well. While we provide code at the beginning, it's very likely that you'll have to base the later projects on code you have written at the beginning. Don't make it a pain to use later.
Test well. There often are intricate usage cases for some language constructs.
Make sure you stay in sync with the lecture material. Come to class, ask questions. You might be able to solve the projects without it, but the exams will get you.
Document your code and use good coding style (in Java, use design patterns and Javadoc, for example). We will deduct points for bad style.
You can talk to the instructor, TAs, and even classmates about general concepts. Ultimately, however, you have to write your own solutions. For example, you cannot share code with anyone outside of your group. This is not the only rule, it was just an example. If in doubt, ask first!
For the projects, you'll have to work in pairs and do pair programming for every part. Both partners have to know how each part of the program works.