attu is the name of an Instructional Workstation (IWS) machine. You will occasionally need to log into this machine. See the Working at Home docucent for instructions on logging in to attu, whether from home or from another CSE computer.
Sun Microsystems' Java Development Kit (JDK) is available on the UW CSE instructional machines, and may be used for coding CSE331 problem set solutions. This quarter, CSE331 will use version 1.6.0 of the JDK.
Please see the document Tools Handout: Editing, Compiling, Running, and Testing Java Programs for detailed instructions.
Sun's Java Development Kit includes javadoc, a tool that produces specifications from source code annotated with special comments. The comments may include "tags", which are introduced by an at-sign (@).
We have extended the javadoc program to recognize additional CSE331 tags, as well as all the tags accepted by the Sun Standard Doclet. These additional tags declare specification fields for classes and requires, modifies, and effects clauses for methods. Note that these tags must appear after all non-tag comments for classes and methods.
|@specfield name : T // text||Indicates that name is a abstract specification field of type T for the class, adding text as a comment if present|
|@derivedfield name : T // text||Same as specfield, except that this also adds the property "derived" to the output information|
Derived fields can be viewed as functions on preexisting state; thus if a class had a specfield @specfield n : integer we could define a derived field:
@derivedfield pos : boolean // pos = true iff n > 0
Derived fields are not allowed to hold any information that could not be already calculated from the already existing state in the object. Thus, you use specfields to introduce new state variables and derived fields to introduce functions on those state variables.
Derived fields are not strictly needed in specifications, but they may reduce complexity and redundancy.
|@requires X||Declares X to be a precondition for the method|
|@modifies Y||Declares that nothing besides Y will be modified by the method (as long as X holds when it is invoked)|
|@effects Z||Declares that Z will hold at exit from the method (as long as X holds when it is invoked)|
The preferred way to generate api documentation with the CSE 331-extended javadoc is to use the ant doc target for your problem set. See running automated tasks with ant in the "editing, compiling, running and testing" handout. The instructions for eclipse, briefly:
After running the ant doc target, you should check the output. You may find that you need to add line breaks (<br>) or paragraph breaks (<p>) to your javadoc comments for readability. Also, if you omit certain tags, subsequent text may fail to appear in the output. Finally, since much of the text of javadoc comments is inserted in a HTML document, you must be careful with text that can be interpreted as HTML markup, such as the less-than (<) and greater-than (>) characters. For instance, if you write:
@effects Adds <x> and <y>
then <x> and <y> will be interpreted as HTML tags in the output (and won't be displayed by a browser).
Report any weird behavior or complaints about javadoc to firstname.lastname@example.org.
Eclipse is an integrated development environment (IDE) at UW CSE that you can use to develop your Java code. Please consult the following documentation:
See the separate Daikon handout.
Please consult the Tools Handout: Version Control Reference for details on using SVN to manage your source code.
The CSE331 forums are a great place to post technical questions about the problem sets, Java, and the course in general. The TAs, professor, and other students monitor the forums, so responses can arrive relatively quickly and be shared with all members of the class.
Your forum account is associated with your UW NetID. You can access the forum here.
When you are posting to the forums, please provide as much detail as required so that others can reproduce your problem. Strive to post the most succinct message that gets your point across. Extraneous details such as pages of obscure compiler warnings can distract from your question and make it less likely for others to look at it carefully on first glance.
Keep in mind that TA office hours may be more appropriate for getting help with coding bugs and environment problems.
The class mailing list is email@example.com. List emails will be sent to your UW CSE account (YourUserName@cs.washington.edu).
The course staff will use the mailing list to send important course announcements. Do not attempt to send questions to the mailing list, instead either email the course staff or use the forum.
chmod -R o-rwx /projects/instr/10au/cse331/YourUserName
Do not modify the cse331 group permissions. The cse331 group is for course staff and full permissions are required to deliver problem sets to your repository.
If the course staff has recently imported files into your repository, you will receive errors of the following form:
chmod: changing permissions of `/projects/instr/10au/cse331/YourUserName/REPOS/db/...': Operation not permitted
These errors are expected and occur because SVN creates some files owned by the course staff whenever we commit to your repository. You do not need to rerun the command.
You may occasionally wish to draw diagrams, such as object models and module dependency diagrams. One fast and effective way to do this is to draw in longhand, then scan your results in order to submit them electronically. Alternately, you may wish to use a drawing program. Here are some suggestions. Many others exist; you are welcome to use any one that you feel comfortable with.
Microsoft Visio is a diagramming and drawing application for Microsoft Windows.
Visio templates and stencils for CSE331 are available as zip files. See the README file in the zip archive for instructions; essentially, the files should be placed in the Solutions subdirectory of your Visio installation.
OmniGraffle is a diagramming and drawing application for Mac OS X.
Here are some OmniGraffle templates and stencils you might find helpful when drawing diagrams for CSE331: OmniGraffle stencils
Dia is a cross-platform (Unix, Mac, Windows) diagramming and drawing application.
You can download Dia from its homepage at http://www.gnome.org/projects/dia/.
Dia can export its diagrams as Encapsulated PostScript files, which you can then convert to PDF. Or, you can print the diagrams from Dia itself.
If you have problems using Dia, see the below links:
xwrits is a Unix/X-window program that reminds you to take typing breaks, which are important for your health. There are lots of ways to customize and use xwrits; here is one way which is strict about preventing you from typing:
xwrits typetime=5 breaktime=0.50 +beep +clock +idle +mouse maxhands=5 +multiply +noiconify +lock &
You can also put the xwrits command in your .startup.X file.
If you choose to do some or all of your work on your own computer, instead of in the Allen Center software labs, then see the document on working at home.