Quick Links to Other Tools Handouts:

Contents:

UW CSE Instructional Computing

Students may use both the Windows and Linux machines in the UW software labs. However, in certain cases, you will need a Linux prompt to perform an action. Windows users should SSH into the the Unix host attu to perform command line actions. For some actions, Linux users will also be required to SSH into attu in order to ensure consistent results.

Using Unix

In order to perform some CSE331 tasks, you will need a basic knowledge of Unix/Linux commands. If you are unfamiliar with working with the Unix command-line interface, go through the Unix tutorials provided by the student ACM chapter.

Initial Setup

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.)

Accessing attu with SSH

SSH on Linux

At the command prompt, enter the following command:
  ssh YourUserName@attu.cs.washington.edu
If 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.

SSH on Windows

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.

Server Authentication Warning

If this is your first time connecting to attu, you will receive a server authenticity warning like this:
  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.

Java

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.

Editing, Compiling, Running, and Testing Java Programs

Please see the document Tools Handout: Editing, Compiling, Running, and Testing Java Programs for detailed instructions.

Useful Java Websites

Using javadoc to generate specs

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.

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:

  1. Right-click on build.xml in Package Explorer
  2. Select Run Ant...
  3. Toggle the checkboxes so that doc is the only box selected
  4. Click Run
  5. After you see a BUILD SUCCESSFUL message in the console at the bottom of the screen, right-click on doc in Package Explorer
  6. Select Refresh
  7. Open the doc folder and double-click index.html.

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

Eclipse is an integrated development environment (IDE) at UW CSE that you can use to develop your Java code. Please consult the following documentation:

Daikon invariant detector

See the separate Daikon handout.

SVN

Please consult the Tools Handout: Version Control Reference for details on using SVN to manage your source code.

Forums, email, etc.

CSE331 Forums

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.

CSE331 Mailing List

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.

Setting Project Directory Permissions

Your project directories were created by support@cs with full read and execute permissions. As a result, anyone can check out of your SVN repository. To prevent other students from viewing your work, modify the directory by connecting to attu and executing the command:
  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.

Errors When Setting Project Directory Permissions

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.

Drawing diagrams

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.

Visio

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

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

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

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.

Working at home

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.