You must setup your CSE331 account via the student-setup script before 8pm on the day of the first lecture. Failure to do so will result in you being dropped from the class.
You must be registered for CSE331 and have a UW CSE account in order to perform the setup. If you are not registered for CSE331, register and then email the course staff.
Before doing any work for CSE331, you need to run a script to set up your project repository.
To do so, SSH into attu and enter the following commands at the attu prompt:
/cse/courses/cse331/10sp/bin/student-setup
If you see the message "CSE331 setup complete!", you are all set! This script creates a SVN repository for you at /projects/instr/10sp/cse331/YourUserName/REPOS.
If you see an error message, contact the course staff for assistance (see the staff list for email information, or ask for help on the CSE331 forum.)
ssh YourUserName@attu.cs.washington.eduIf you are using the Linux machines in an Allen Center software lab, you can alternatively just enter the command:
ssh attu
This works because the username defaults to the username you are currently logged in with and the target domain defaults to the domain of the machine you are connecting from.
Double-click on the SSH attu shortcut on the Desktop and enter your CSENetID login information. This will connect to attu using the SSH client PuTTY.
If the shortcut is not on your Desktop, go to: All Programs » UNIX Connectivity » SSH » SSH attu in the start menu.
The authenticity of host 'attu.cs.washington.edu (128.208.1.139)' can't be established.
Along with the warning, the SSH client will display the RSA key fingerprint of the remote host so that you can verify the host's identity (verifying helps to prevent Man-In-The-Middle Attacks). In our case, it is safe to say 'yes' to continue connecting. When you connect, SSH will cache the host key in order to automatically verify the remote host's identity in the future.
A good article about SSH host keys can be found at http://www.symantec.com/connect/articles/ssh-host-key-protection.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 cse331-staff@cs.washington.edu.
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 at https://catalysttools.washington.edu/gopost/board/tws8/15964/.
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 cse331@cs.washington.edu. 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/10sp/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/10sp/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.