iMacs and the Habermann Computing Cluster: Frequently Asked Questions
Gregory Kesden - gkesden@gigo.sp.cs.cmu.edu

When is the Habermann lab available for me to work on my program?
How do I log on/off the machines?
I'm completely lost on these Macs... how do I use the Mac OS?
How do I rename files?
How do I put Codewarrior on the dock?
How do I create a project in Codewarrior?
How do I run my project?
How do I save my project?
How do I rename my Codewarrior project/files?
How do I add files to my Codewarrior project?
Where do I get TextInput.java?
How do I zip/unzip files?
How do I access my andrew space to save/retrieve files?
How do I submit my files?

When is the Habermann lab available for me to work on my program?
The lab is typically available on evenings and weekends and should be staffed at all times by at least one of our course CAs from 7:30PM through 10:30PM (except for Friday and Saturday... the lab will be open but we won't necessarily be there!). For a complete lab schedule, click here.

How do I log on/off the machines?
Logging on: Move the mouse to bring the computer out of standby (if necessary). Ensure that you see the "Carnegie Mellon Computing Services / Mac OS X" dialog box. Enter your andrew ID and password into the corresponding boxes and then click the log-in button. Repeat if necessary.
Loggin off: Click on the blue apple icon on the top left of the toobar and select Log Off. Hit Yes to any dialog boxes that show up (make sure you saved your work and transferred it to your andrew space if you needed to!) and wait for the log-on box to reappear before leaving the cluster. Make sure you are logged out before leaving the cluster!

I'm completely lost on these Macs... how do I use the Mac OS?
First of all, don't panic. You will soon become familiar with the Macintosh Operating System (which you'll need to complete any in-class online exams!). The sequence of icons that appears on the bottom of the screen is known as the dock (your dock might look a little different, but its functionality is still the same):

The dock acts a lot like the quick launch toolbar in Windows; each large, oversized icon can be single-clicked to launch the corresponding application. Any applications that you minimize will appear between the two icons on the right-hand side (the icons separated by a white line from the others), and you can single-click to maximize them again. Currently open applications that exist on the dock will have a single black arrow underneath them, like so:

This application is called the Finder, and it behaves much like your desktop would in Windows; the finder is also your link to access files and folders. The trash can on the right hand side is similar to the recycle bin: drag files and folders there to delete them. To empty the trash, click on the Finder in the toolbar and select Empty Trash.

In addition, you will see a horizontal toolbar running across the top of your screen:

This bar will always have the name of the currently active application in bold in addition to drop down menus for the current application. Clicking on the bold name and selecting Quit... will let you quit that application. Note that Macs only have one toolbar; clicking on any inactive window will put information for that application into the toolbar (this is how you know what application you're in!) Also of note is the blue apple icon in the top left. This is your direct to the system menu (and most importantly, the log-out button!)

Windows can be minimized, maximized, and resized. On the top of every window are the following buttons:

The Red (x) button will close a window, the Yellow (-) button will minimize a window to the dock, and the Green (+) button will go back to the last remember size of the window (or fills the screen with the current window). Note that closing a window will not necessarily close the application; if you still see the application's name in boldface type on your toolbar, you'll have to go to its menu and quit it manually!

How do I rename files?
Click on the icon of the file or folder, then click the name underneath the icon and wait for a second or two. When you see the blinking cursor, type in the new name of the file and press enter.

How do I put Codewarrior on the dock?
Click the Finder icon on the dock. Navigate to Applications->Metrowerks Codewarrior 8.0->Metrowerks Codewarrior 8.0.

Click on "Codewarrior IDE" and drag the icon in-between two other icons on your dock.

How do I create a project in Codewarrior?
Make sure that Codewarrior is the current application. Click on File and select New. The following window will ask for information about the type of project you want to create:

Making sure that you are on the Project Tab, select Java Application Wizard. Type in a name for your project in the Project Name textbox and pick a location (usually Desktop) in the Location textbox. Note that Codewarrior will automatically create a subfolder for your project in the location you specified (thus, if you are working in the cluster, you will see a folder created on the desktop). Click OK and another box should appear:

Type a class name into the Class Name box and delete everything from the Package Name box. **UNCHECK THE CREATE AN INITIAL FORM BOX**. Verify that the Location box contains the path to the folder on your desktop that you specified earlier and click Finish.

Now that we've created our project, we have to remove extraneous junk that Codewarrior has inserted into the file. You should see a project window with nameofyourproject.mcp in its titlebar:

You should see your main .java file in this project window (it will have the same name as your class name). Double-click on that file to open it up. In the project window, if you double click on a *.java file, you will open an editor window for that file. In that editor window, you can add code for your class file. You should see a window similar to this:

You should delete the following lines of code:
1. public yourclassname(){}
2. new yourclassname();
so that the window now looks like this:

You are now ready to start coding!

How do I run my project?
You can either click on the toolbar and select Project->Run, or you can click on the little green arrow:

in the project window (note that the arrow with the bug next to it is the debugger; you don't want to click that one!).

How do I save my project?
You can click on the toolbar and select File->Save. Note that Codewarrior supposedly saves your project everytime you run it; we have yet to find a definitive reason to trust Codewarrior, however.

How do I rename my Codewarrior project/files?
Each Java file should have its own unique name. The Java file's name is supposed to match the internal "class" name of the Java file. Neither is hard to do in a low-level (basic) Java environment but it is more complicated when using CodeWarrior. For our example, let's suppose we want to change the name of the program "TrivialApplication" to "MyProgram".

You first need to change the name of the class TrivialApplication within the source file to MyProgram. All that this step requires is to change the phrase "TrivialApplication" that follows the word "class" to "MyProgram" in the editor window . Next, the name of the program file must be the same as the name of the class that it holds. You must change the file's name from "TrivialApplication.java" to "MyProgram.java". The simplest way to do this is as follows:
Open the TrivialApplication.java file. Next, go to the File menu from the task bar and click on Save As... Type MyProgram.java in the Filename textbox. This not only changes the file name (note the change on the title bar of the editing window) but it also automatically replaces TrivialApplication by MyProgram in the MCP window.

Finally, you need to "tell" Codewarrior that there is a new main program:

Select Edit from the taskbar and select yourprojectname Debug Settings. Click on Java Target (within the subgroup Target of the Target Settings Panels on the left-hand side). Change the Main Class textbox from TrivialApplication to MyProgram and then click the Save button.

How do I add files to my Codewarrior project?
Click on the project window. Go to Project on the toolbar and select Add Files...:

Browse to the file you want to add, select it, and hit Choose. It should appear in the project window.

Where do I get TextInput.java?
The file can be found at /afs/andrew/course/15/100-kesden/handout/TextInput.java. Go to your desktop, double-click afs and browse to the handout folder above; then, drag-and-drop TextInput.java into your project window. You can also find the file online here.
It may make it easier to do this if you copy the file into your own AFS. To do so, open a Terminal window on one of the Macs in the classroom. Type the following series of commands at the command prompt (">" represents the prompt, not part of the command):
> cd MyAFS
> cp /afs/andrew/course/15/100-kesden/handout/TextInput.java .
Now, whenever you need to add that file to a CodeWarrior project, you can do so by looking for it in "MyAFS". See the lecture notes for information on how to use TextInput.

How do I zip/unzip files?
To zip files, we will use an application called DropZip. Note that all programs that you submit will have to be zipped. To zip a file, click on the Finder and select Applications->Stuff-It Standar 8.0.2. Double-click DropZip to launch it and click "Not Yet" to the registration prompt. Now, drag and drop your folder that you want to zip into the DropZip window. You should see a zipped file in the same location as the folder you dragged and dropped after a short while.

Zip files are automatically unzipped on the iMacs. If for some reason it is not unzipped, double-click the zip file and it should unzip.

How do I access my andrew space to retrieve/store files?
You should save all of your work that you do in your cluster to your andrew space, as the cluster machines will wipe their desktops every night at 2AM. To access your andrew space, click on the Finder, click on the little home icon with your username next to it, and click on the folder labeled MyAFS.

You can then drag and drop files in and out of this space. To retrieve your files back at your dorm's Windows machine, check out KerbFTP or WS_FTP. You can also access your andrew space through Internet Explorer: type in "ftp://linux.andrew.cmu.edu", enter your username and password, and you should see your andrew space.

How do I submit my files?
First, ensure that you have zipped up the folder containing the project you want to submit. Next, go to the IPG homepage and click Dropoff Assignments. Login to WebISO and wait to be redirected to the basic submissions page. You should see a table containing all of the assignments in this class:

The Title Bar should contain the name of your section. The Name should contain the names of the assignments (clicking on one will allow you to check your prior submissions). The Description column contains a short description of the assignment. The Due Time column contains the due date of the assignment (very important!). If the Status is shown as open, you can still submit your program. The Weight column shows the value of the assignment (but is not accurate... the system doesn't know you can drop exercises). The Score column shows either no sumission, ungraded, or your grade on that assignment. Finally, the last column will let you Submit your assignment. Click on the submit button next to the program you want to submit and you should see the following window:

Click on the browse button and select the zip file that you created. Click Submit Laband wait a few moments. You should see a page listing the contents of the zipfile that you submitted if the submission was successful:

If you want to verify your submission, you can click on View/Submit Labs in the top right corner and then on the name corresponding to the assignment you want to check on. You'll see a window like this:

You will see all of your submissions and the grade/submission time/grader/comments on the latest submission (if it has been graded). For each submission, you can Download it (which will give you your zip file) to check if everything was sent correctly or just View yor submission to see a list of links to files that were submitted. If you're feeling paranoid, download your zip files and attempt to open it again in Codewarrior to check that it works how you remembered it did.

For further assistance, e-mail the course staff at 15100-help@cs.cmu.edu

Compiled by Kenneth Yu. Last edited on September 3rd @ 3:36pm.