|
|
|
CS 420/520 Object-Oriented ProgrammingCRN 44677 (for CS 420) and 44676 (for CS 520) |
|||||
|
|
|||||||
|
Academic Integrity Policy |
|
Winter Quarter 2012
PrerequisitesNo familiarity with object-oriented programming is
assumed; students who have expereince with Java or C++
should be prepared to unlearn some of what they think
they know. Prior experience with Smalltalk is not
required. The class assumes a working knowledge of
discrete mathematics and machine organization — the
fundamentals of instruction coding and data
representation in the computer's memory. (Students who
have completed PSU CS 310 and CS 340 will be well
prepared) TextbooksCourse DescriptionThe objective of this course is to teach students to program well in an object-oriented style. The focus is more on object-oriented design and programming than on a particular language and its niceties. The course will use the Pharo dialect of the Smalltalk language because Smalltalk is very simple and allows the programmer to manipulate objects directly. Using Smalltalk permits the course to be focussed on concepts rather than on navigating the intricacies of a language definition. Samples of other languages, such as Ruby and Java, may be included.Topics covered will include responsibility-driven design, test-driven development, refactoring, code reading, reuse, parameterization, inheritance and programming patterns. Specific Learning ObjectivesOn completion of this course, students should be able to
Policies
Academic IntegrityStudents are at university for two reasons: to learn stuff, and to gain a credential. Because the credential is important to many of our students, part of my role as a professor is to make sure that it has value. This means ensuring that the degree is awarded only to those students who have mastered the material in my course. I have every sympathy for those who have difficulty with the material and seek the assistance of the instructor, the TA or their fellow students. I have no sympathy at all for those who decide that the fastest way to a degree is to cheat. I have been responsible for having cheating students dismissed from the university in the past, and I will not hesitate to seek to have cheaters dismissed in the future. The most common form of academic dishonesty — cheating — is representing the work of others as your own. In all written material, it is expected that you will use others' work, but when you do so it must be in a way that makes it absolutely clear that someone else's work is being cited, and who is the original author. If you reproduce someone else's work in a way that makes it appear to be yours, you are guilty of plagiarism, in other words, of cheating. Cheating on an assignment or exam will result in an automatic zero grade for that piece of work, and the initiation of disciplinary action at the University level. Cheating and collaborationI encourage collaboration on certain assignments; I will not tolerate cheating. Where is the line between these activities? First, if an assignment is explicitly set up as a team assignment, you are of course allowed — indeed, required — to collaborate with the members of your team. In this case I will generally require only one completed piece of work to be turned in from the team as a whole. For individual assignments, I encourage you to talk about the problem with your fellow students. During such discussion, you may even write something, perhaps the code of a critical method, as a group. If you do this, there is a danger that you might reproduce that group work as if it were your own. To guard against this danger, do the following: after the group session, destroy all the notes and code fragments that you may have brought away with you. Then go and do something else for an hour or two: go for a walk or a bike ride, play your favorite sport, go to the gym: do something to flush your short-term memory. Then sit down with a blank sheet of paper or a blank workspace and start work on your own solution. If you have a photographic memory or otherwise won't be able to forget what you have seen someone else write, then don't participate in collaborative problem-solving sessions. If I see the same code or writing assignment from two or more students I will take this as evidence that these guidelines have been ignored, and will assign a grade of zero to all of the students involved. |
|||||
Grade Distribution: 55% on homework assignments, 35% on the class project, and 10% on attendance and class participation. Your participation will be used to judge whether you are keeping up with the reading assignments.
Course slides will be available as Adobe Acrobat files as the
course proceeds, but probably not until the day of class.
If you look ahead, you will find slides or notes from the previous
offering, which are certainly out of date, but which may
nevertheless be useful.
Weekly Schedule (subject to change, as the quarter progresses)
|
Date |
Reading |
Lecture material |
Homework Assignments (due at 16:30 on date) |
||
|---|---|---|---|---|---|
| 1 | Monday 9th Jan | Chapters 1 and 2 of Pharo by Example (PBE) | Introduction to the Course, and Introduction to Objects | Fun with Smalltalk Syntax | Read chapters 1 and 2 of Pharo By Example. Download Pharo and work through
the process of creating the "Lights Out" game as described
in Chapter 2.
Also, sign up for the class mailing list using mailman. |
|
Wed. 11th Jan. |
|
More on Smalltalk Syntax. |
|||
| 2 | Monday 16th
Jan. |
MLK Holiday — no class |
|
|
|
|
Wed. 18th Jan |
Read PBE Chapters 3–4, 11 |
Good code, and in-class demo. |
Good Smalltalk, Part I |
|
|
| 3 | Monday 23rd Jan | PBE Chapters 5–10 | Collections, Blocks.
Enumerating over collections.
Testing. |
|
(Assignment 1 due) |
| Wed. 25th Jan |
Design Patterns — what are they? | Prof Sergio Antoy guest lecture on Patterns | Singleton, Proxy and Iterator in Smalltalk | ||
| 4 | Mon. 30th Jan |
Tries |
Simple Smalltalk testing: with Patterns. Testing slides (pdf) Trie slides (pdf) |
(Assignment 2 due) | |
| Wed. 1st Feb |
Beck pages 1–42 |
Coding Patterns for Messages | Best Practice Patterns I (slides) Lessons from the Homework (pdf) |
||
| 5 | Mon. 6th Feb. | Read: Chapter 26 of Goldberg and Robson, "Smalltalk-80: The Language and Its Implementation" ("the blue book") and Deutsch and Schiffman, "Efficient Implementation of the Smalltalk-80 System," POPL 1983. (Can't read it? Zoom your browser, or print it.) | Prof Andrew Tolmach guest lecture on modern virtual machines | ||
| Wed 8th Feb |
Reading on the State Pattern |
Deploying the State Pattern by Refactoring |
Movie Code on SqueakSource in packages Morphic-ReflexGame ("before") and Morphic-ReflexGameUsingStatePattern ("after") |
Assignment 3 due | |
| 6 | Mon. 13th Feb |
Beck pp 43–78 |
Coding patterns for Methods |
Best Practice Patterns II (slides) |
Project Proposals assigned |
|
Wed 15th Feb |
Elements of Design |
Composition and Law of Demeter | |||
| 7 | Mon. 20th Feb | Mark Guzdial's chapter
on Morphic. Worksheet on Morphic |
Project Process
Programming GUIs |
Slides
MorphicDemo-Dice is on SqueakSource |
Project Proposals due today |
| Wed. 22nd Feb | Cook's Essay |
Understanding Data Abstraction. |
Data Abstraction Slides
|
|
|
| 8 | Mon 27th Feb |
Designing a User-Interface The Observer and Explicit Interest patterns |
Slides (User Interface,
Observer
& Explicit Interest Patterns) Alpert extract on Observer Aza Raskin Video |
Assignment 5 due |
|
| Wed 29th Feb |
Checks Pattern
Language
Pratt's Null Object
Pattern, |
Parser Combinators in Smalltalk |
Slides |
||
| 9 | Mon. 5th March |
Improving the Poker Dice code Parser Combinators II
|
Slides |
||
| Wed 7th March |
Reuse: context & component. Patterns that aid in reuse. Delegation | Reuse slides | |||
| 10 | Mon. 12th March |
Traits
paper Black: A use for inheritance |
Traits and the Smalltalk Collections Hierarchy | Traits Slides (1-up) | |
| Wed 14th March |
Martin McClure guest lecture "GemStone for Dummies" |
Subtyping, conformity and Polymorphism | Subtyping slides
Trampoline code in SqueakSource in package Collections-EnumerationEnhancements |
||
| Exam Week |
Mon. 19th
March 17:30–20:30 Neuberger Hall (NH) room 204 |
Project Demonstrations | Demo Schedule | Projects due |
Most recently modified on