COMP 411 Principles of Programming Languages (Fall 2012)

Professor Robert "Corky" Cartwright
Department of Computer Science
Rice University
Houston, Texas, USA
Room 1042, Duncan Hall, MWF 1:00pm - 1:50pm
   

Course Information

Instructors

Professor: Robert "Corky" Cartwright
Email: corky.cartwright at gmail dot com
Office: DH 3104
 
Office Hours: Monday, 11am–noon
Wednesday, 11am–noon
Friday, 11am–noon
By appointment

Teaching Assistants

Name: Nick Vrvilo
Email: Nick.Vrvilo at rice dot edu
Office: TBA
Office Hours: TBA
Name: William Forson
Email: william.forson at rice dot edu
Office: DH 3108 (the PLT lab)
 
Office Hours: By appointment

Please try to arrive early during the scheduled office hours or let us know that you will be coming to talk to us.

Course Website and Contact Information

Course website: http://www.cs.rice.edu/~javaplt/411/

Course mailing list: comp411-l@mailman.rice.edu (subscribe https://mailman.rice.edu/mailman/listinfo/comp411-l)

Email address to reach the entire teaching staff: comp411@rice.edu

Note: The mailing list comp411-l@mailman.rice.edu and the teaching staff email comp411@rice.edu automatically block non-Rice email addresses to reduce the amount of spam. If you plan to send emails from a non-Rice email address, please write your name and the email address you want to use on a piece of paper and give it to a TA to unblock the address.

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.

There is an archive of all discussions that have occurred on the comp411-l@mailman.rice.edu mailing list available at https://mailman.rice.edu/mailman/private/comp411-l/, dating back to August 2005. Sometimes it may make sense to see what problems the students last year had.

Recommended References

The recommended reference book for this class is:

Another good reference is:

Please also look at the additional references and the language resources on the course website.

Assignments, Exams, and Grading

Overview

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.

Projects

Scala 2.9 is the only language that is acceptable for use in the assignments in this course. Scala is also in many examples given in lecture, but the same abstractions can be expressed clearly but much more verbosely Java. Students are expected to write their programs in a "mostly functional" style while exploiting OO program organization (inheritance) where appropriate. Mostly functional Scala programs rarely mutate the fields of objects or classes. A thorough understanding of the composite design pattern and pattern matching is a prerequisite to writing good solutions in Scala. For some tutorial guidance on the composite pattern see Prof. Cartwright's Notes on Object-Oriented Program Design.

Scala is a putative successor to targeted at "programming in the large" (real world software engineering). If you have taken Comp 310, then you have already been educated in how to write Java programs in a clean OO style. In this case, the jump to Scala, particularly if you have some familiarity with a functional language like Scheme or ML, should be easy. If not, you need to dig into the references listed for Scala at the beginning of the course. Scala runs on top of the Java Virtual Machine. You must download a Java 6 or 7 JDK to your development platform if you do not already have it. Scala 2.9.1 is already bundled with DrScala so no installation beyond a Java JDK is necessary.

The current release of Java 7, but Scala is technically built on top of Java 6. For advanced Scala development including GUI interfaces, you need to us a Java 6 JDK. But DrScala works well with Java 7 and it is unlikely that you will encounter the specific dependencies of Scala on Java 6 in the Comp 411 course assignments.

The Java programming platform also includes an effective unit testing tool called JUnit. Scala is compatible with JUnit so expect you to test your Scala programs using JUnit. This tool is built-in to DrScala. DrScala includes a command on the "File" menu that generates test class templates for you. If you execute the test command by activating the "Test" button.above the Definitions Pane, DrScala will run all open unit test classes. We only support course submission software on CLE@R machines.

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 to two 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. Groups of more than two students will not be allowed.

Exams

There will be two written take-home exams, one approximately in the middle of the semester, one during the last week of classes.

Grading

Your grade in this course will equally based on your performance on homework assignments and on the exams.

Slip Days and Late Submissions

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.

Honor Code Policy

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.

How to Get Help

If you have a general question, please post to the mailing list at comp411-l@mailman.rice.edu. We will be monitoring it and by answering questions there, we can help the entire class. Since all students will be receiving your messages, you may also help each other, as long as you keep the Honor Code Policy outlined above in mind. Please subscribe so you can take part in the discussion.

If your question is of a personal nature or reveales part of the code of your solution, please DO NOT post to the mailing list (see Honor Code Policy). Instead, send an email to comp411@rice.edu to reach the entire teaching staff.

Please note that non-Rice email addresses will automatically be blocked from sending to both comp411-l@mailman.rice.edu and comp411@rice.edu to protect the students and the teaching staff against spam. If you would like to use a non-Rice email address nonetheless, please write your name and the email address you would like to use on a piece of paper and hand it to a member of the teaching staff. We will then unblock that address.

Accomodations for Students with Special Needs

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.

What You Should Watch Out For

Solutions in Scala are clean and concise.

Start working on the projects early. While they do not involve huge amounts of code, the concepts behind them are very deep. Make sure your approach is correct.

Code well. While we provide solutions for the first 4 assignments, you will inevitably base later projects on code written in earlier assignments. Don't make it a pain to use your code later.in the course.

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 and ask questions. You might be able to solve the projects without studying the course lectures, but the exams will get you.

Document your code and use good high-level coding style including the appropriate use of design patterns and Scaladoc documentation (Scaladoc is essentially identical to Javadoc). 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 programming pair. 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.

Back to course website