CIT 594 Old Announcements
Spring 2004, David Matuszek

Date Announcements
April 20, 2004 Reminder: Talk Friday, April 23, 12:00-1:30 by Lenore Blum, in Wu and Chen. Topic is women in computer science.
April 20, 2004


Final MCIT pizza party Tuesday April. 27, Levine 307, 5:00 PM

 

April 16, 2004 No more programming assignments this semester. When I said there would be another, I thought there was another week of classes. So I'm an absent-minded professor, OK?
April 15, 2004 I will not be in my office Friday (April 16) or Monday (April 19).
April 15, 2004 Saul Gorn Memorial Lecture -- Thursday, April 15, 2004 Time: 3:00pm - 4:30pm
Wu and Chen Auditorium

David Clark
Senior Research Scientist, MIT Laboratory for Computer Science
"Does computer science have fundamental design principles ?"

Students are encouraged to attend. Class today may begin slightly later than usual (but probably won't).

April 14, 2004 I've posted some minor clarifications on the Dating Service assignment.
April 6, 2004 The seventh assignment, Dating Service, has now been posted. The due date is April 15 (not April 13, as originally listed).
April 1, 2004 Talk Friday, April 23, 12:00-1:30 by Lenore Blum, in Wu and Chen. Topic is attracting women to computer science.
April 1, 2004 I've reposted the answers to the second quiz, with a correction for problem 9.
March 31, 2004 I've posted answers to the second quiz.
March 31, 2004 I've posted comments about BeeperHunt designs.
March 30, 2004 Reminder: Quiz this Thursday.
March 30, 2004 Some minor corrections have been made to the Antares, Arcturus, and Deneb designs. See Beeper Hunt, Part III for details.
March 23, 2004 BeeperHunt, Part III, is ready.
Also, I've modified the GUI code slightly. The API is the same, but I fixed a problem with resizing the Panel.
March 19, 2004 BeeperHunt, Part II is ready, and due Monday. It includes a link to GUI code that you can use.
March 19, 2004 Volunteer needed: I have an Indian student who has been admitted to MCIT for next fall, and he would like to be in email contact with a current MCIT student that he can ask about the program. Anyone? (Update: I have a volunteer. Thanks.)
March 18, 2004 Reminder: Bring three copies of your Assignment 6 rough draft to class today.
March 16, 2004 Part I of your next assignment is ready.
March 2, 2004 Here is a sample Logo program (with output).
March 1, 2004 I have posted some comments on Grading Assignment 5.
February 27, 2004 Grading error. On the first quiz, question 17, I mistyped "Collection interface" as "Collections interface." If you lost points because you answered for the Collections class (it's not an interface), please turn your quiz in to me during class next Tuesday and I'll regrade it. (If you gained points because of my error, don't worry, I won't take them away.)
February 26, 2004 I have replaced my starter code for Assignment 5 with a newer version that fixes some threading problems. Changes are in LogoInterpreter.java and Turtle.java. The only change to Turtle is that I've moved the pause(int ms) method to it; the changes to LogoInterpreter are mainly in the threading, but to apologize for the changes I've also added code for the Load button (and your Save button can be quite similar). You can use Eclipse's Compare with... if you want details on the changes.
February 25, 2004 Logo--The Big Picture. If you still don't quite understand what this assignment is all about, or how to do it, this should help.
February 24, 2004
ETA KAPPA NU PRESENTS
PIE YOUR PROFESSOR
Throw pies at your professor!
Your grade will not be affected!

12:30-1:00 Profs. Pat Palmer and Dave Matuszek
1:00-1:30 Prof. Dianna Xu
1:30-2:00 Prof. Ken Laker
2:00-2:30 Prof. Norm Badler
2:30-3:00 Prof. Dan Lee
3:00-3:30 Prof. Stephane Evoy
3:30-4:00 Prof. Martha Palmer

TOMORROW (Wednesday) 3RD FLOOR TOWNE STUDENT LOUNGE

$2 for 1 Pie/$5 for 3 Pies
All profits go to the American Cancer Society
February 23, 2004 Assignment 5 is due Tuesday, March 2, before midnight.
February 20, 2004 Corrections so far: (1) Changed name of class, (2) Corrected eol() test, (3) Incorporated keywords into this class, (4) error in unused method. New version has been posted.
February 20, 2004

I have posted a NewParserTest.java, which is to be used for grading purposes. If you see any serious flaws in this test, please respond before we do all the grading.

February 18, 2004

The second part of Assignment 5 is now posted.

Minor corrections to first part:

  • The class name is LogoInterpreter, not Interpreter.
  • DrawingCommand is an abstract class, not an interface.
  • DrawingCommand has an apply() method, not an execute() method.
February 18, 2004

I have posted the first part of Assignment 5: Interpreter, along with some starter code.

All public methods in DrawingCanvas must be public synchronized void, not just synchronized void. I have made this correction in the posted code; if you have already downloaded it, just make the correction yourself.

My apologies for being slow to get this posted; I had some annoying Exceptions that I had a lot of trouble tracking down. Macintosh users: You may have problems with this starter file, particularly in initial window size.

February 17, 2004 By popular demand...Recognizer.zip!
February 17, 2004


Next MCIT pizza bash tomorrow, Wed. Feb. 18, Levine 315, 6:15-8:15pm

(For students in the MCIT degree program. We'll try to make the next pizza party more inclusive.)

February 16, 2004

I have a page of Final Parser Corrections. While these are not as serious as I initially feared, for this and a couple of other reasons I have decided to delay the due date one more day--before midnight, Tuesday, Feb. 17.

I still intend to hand out the next assignment tomorrow.

February 13, 2004 Reminder: As announced on Feb. 8, the due date for the current assignment is Monday, February 16, before midnight.
February 13, 2004 When debugging my Parser, I found it useful to print out the binary trees that I created. While it's easy to print binary trees, printing them with neat connecting lines is tricky. Here's my code for Printing Binary Trees for anyone who would like to use it.
February 13, 2004 Yet another fix, this time in the way the move command is handled (I had my method for <move> recognizing the whole command, not just the one word.) Again, I've updated (and re-tested) DrDavesTests.java on the website.
February 12, 2004

"Today a usual technique is to make a program and then to test it. But: program testing can be a very effective way to show the presence of bugs, but it is hopelessly inadequate for showing their absence."
   -- Edsger Dijkstra, in The Humble Programmer

My test class contains the lines

  public void testBlock() {
        use("[ \n penup \n pendown \n ] \n");
        assertTrue(parser.command());

That should be assertTrue(parser.block());

Since my parser passes all the tests, you might conclude that there is a bug in my parser--that it accepts a <block> as a <command>. You would be right.

I've corrected (and re-tested) DrDavesTests.java on the website.

February 12, 2004 DrDavesTests.java is a minimal set of JUnit tests for the Parser assignment. The main purpose of these tests is to define precisely what binary trees your parser is expected to produce; it is up to you to do any additional necessary testing.
February 10, 2004 Yet another correction: The word "program" does not occur as a terminal in the BNF, and therefore should not be recognized as a keyword by the Tokenizer. Like "list" and "block", "program" is a keyword introduced by the Parser, not by the Tokenizer.
February 10, 2004 The class web page now includes a calendar, with quiz and final exam dates marked. The first quiz will be Tuesday, February 17. A brief study guide has been posted.
February 8, 2004

Now available:

February 8, 2004

In response to several people's questions:

  • Yes, Set is an interface, not a class.
  • No, you don't write your own! You use one of the existing implementations. See the Java API and just pick one. (Example: Set mySet = new TreeSet();).
February 6, 2004

(4:17 p.m.) I've just posted a corrected version (sigh) of BinaryTree.zip. Thanks, Dave!

(4:49 p.m.) I've posted corrected versions of Assignment 4 and the revised grammar. Thanks, Charlie!

February 6, 2004 I've posted a draft version of Assignment 4, along with a revised grammar. I will probably need to make a few minor corrections to it, but I think it's in pretty good shape. (Note: If you want to print it out, I suggest choosing the "Fit to page" option in your print dialog.)
February 5, 2004

I've posted my code for the BinaryTree ADT, as BinaryTree.zip.

At the request of my TA, I have extended the due date for the third assignment by one day (before midnight, Feb. 6), to give you an opportunity to look at my binary tree class, especially the test classes. Your code should pass all tests.

February 3, 2004 New age dawns at Eclipse
I've added a short page on Javadoc and HTML
February 2, 2004 I have posted a zip file containing my code for Token.java, TokenTest.java, Tokenizer.java, and TokenizerTest.java. I strongly recommend downloading and studying these files; reading someone else's code is a good way to learn programming.
February 2, 2004 The hexadecimal values for colors are irrelevant to the current assignment and should be ignored. They will be used in a later assignment.

I defined <procedure> ::= "to" <name> { <variable> } <eol> [ { <command> } ] "end" <eol>
The brackets are unnecessary; a simpler, equivalent form is:
<procedure> ::= "to" <name> { <variable> } <eol> { <command> } "end" <eol>

January 30, 2004

I've posted a new version of RecognizerTest.java. There are two changes:

  • I've made the changes to the remainder method as indicated in Notes on Recognizer Assignment, and
  • I've filled in the code for the testFactor() method, which I had overlooked before.
January 30, 2004 I've posted my first set of Notes on Recognizer Assignment. Happily, it's all just minor tweaks so far.
January 27, 2004

When you submit assignments, please follow these conventions:

  • Name your submission file as userid-n, where userid is your user id and n is the assignment number (for example, matuszek-2).
  • Put your files in a single directory
  • Do not generate javadoc

Turn in the zipped directory via Blackboard.

If you have already submitted your second assignment, you do not need to resubmit--but please follow these conventions for future assignments.

January 26, 2004 I have temporarily shut down my dave at acm org email account, because I am getting about 5 messages a minute from Mydoom worm, also called Novarg.A. Please send all email to matuszek at central cis upenn edu. Edu domains are not affected by the worm.

Story at: ComputerWorld

Serious information at: Symantec

January 25, 2004 Another correction: The constructors for ArithmeticExpression should throw an IllegalArgumentException if any argument is null.
January 23, 2004

First corrections to Assignment 2 (sigh):

  • One of the leftChild fields in the BinaryTree class should be named rightChild.
  • The setLeftChild and setRightChild methods should return void.
  • The public int evaluate() method in the ArithmeticExpression class should not take an argument.

I have made these corrections in the assignment itself.

January 23, 2004 Mars Probe Has Software Glitch
January 22, 2004 I've started work on an Eclipse FAQ. Suggestions are welcome.
January 21, 2004

Eclipse fix: If Eclipse won't open for you or isn't behaving correctly, the problem may be that it's workspace has become corrupted.

When the application says"Completing Installation" when you activate it, it's actually creating some files in your home directory under ~/workspace. If you already have the files in a good ~/workspace directory, it checks to make sure that it can use them, then it opens. You can either remove or change the name of the ~/workspace directory, then restart Eclipse. It will create a new ~/workspace and continue to function.

Caution: The workspace is where Eclipse saves your files. If you have project files in your workspace, you may wish to recover them before deleting the workspace.

(Thanks to Karl E. Morris for finding this solution.)

January 19, 2004 Minor correction: My assignment and my examples do not agree completely. Please treat underscores as symbols, not as part of a name.
January 18, 2004 I've just learned that the CIT 594 final exam is likely to be scheduled for Friday, May 7, 8:30-10:30.
January 18, 2004 Due to the holiday and the possibility that there are problems with the Eclipse installation in the Linux lab, the due date for assignment has been extended to Thursday, January 22, before midnight.
January 18, 2004 I will not be in Monday, January 19, because there will be no heat in Moore.
January 18, 2004

Several people had suggestions on how to get "soft tabs" in Eclipse. Here are the suggestions that seem to work for me:

  • To turn existing tabs into spaces,
    1. choose Preferences -> Java -> Code Formatter -> Style and uncheck Insert tabs for indentation, not spaces
    2. Select the code, right-click in it and choose Source -> Format (or hit Command-Shift-F)

  • To turn tabs into spaces as you type, choose Preferences -> Editor -> Typing -> Insert space for tabs
January 18, 2004 I've added some Tokenizer Examples to answer some questions about the first assignment.