Getting Started with CS1311 Scheme

Configuring Dr. Scheme

Download Dr. Scheme from here. Install it as per the instructions.

Start Dr. Scheme. At the welcome screen, take the tour if you want, otherwise click Close.

Here, you can see the top window, known as the editor window (or the definitions window), and the bottom window, known as the interactions window. The first line in the interactions window informs you that you're using Dr. Scheme, version 103. The second line tells you what language mode you're currently in: Beginning Student. This mode may be useful for some purposes, but it'll interfere with what you'll need to do, so it'll need to be changed. If you do not change your language mode, you WILL have problems.

Click on the Language menu, then on Choose Language. Click the drop-down box, then choose Full Scheme. In the new dialog box, verify that "Graphical (MrEd)" is selected, and click OK. Back at the main Dr. Scheme window, click Execute. After a moment, the second line in the interactions window will change to "Language: Graphical Full Scheme (MrEd)." If it doesn't change, or looks different, follow the instructions again, making sure to follow them exactly. If you still can't change to full scheme, ask your TA for assistance.

Writing Homeworks

In this course, you'll use Dr. Scheme exclusively to write your homeworks. Do not use Word. Do not use Notepad. Do not use Wordpad. Do not use Netscape or Frontpage or Star Office or your favorite text editor - use Dr. Scheme.

When writing homeworks in Dr. Scheme, write them in the editor window. Do not write them in the interactions window - anything you write there will be lost.

Fixing the Homework Template

Before starting homeworks, the first thing you should do is download and save the homework template, then edit it to reflect your information. These instructions are given for Internet Explorer - if you use another browser, the steps will be very similar. Go to the homework template. Open the File Menu and choose Save As. In the dialog that appears, take note of where you're saving the file to (usually My Documents), then click the Save button. Return to Dr. Scheme. Open the File Menu, then choose Open. In the Select file dialog box, go to the directory where you saved the homework template (probably My Documents) by clicking its name, then clicking Open. Now, find the template, click it, and click Open. You should have something looking like this.

Now, edit the template, inserting your information. Fix gt?XXXx at the top and the bottom of the file, then put your name and GT number after the prompts near the top of the file. When you're finished, you'll have something looking like this. In the upper-lefthand corner is the save button. Click it to save your changes.

Starting a new homework

If you don't have the homework template open, open it now. Clearly, we don't want to write our homework in the original template, so we'll need to put it into another file. Open the File Menu and choose Save Definitions As (not Save Definitions). In the Select File dialog, change the filename. Try to make it meaningful - for instance, homework1. Finally, click Save. You can now see that you're editing homework1.scm. The last step before beginning to write your homework is to fix the remaining information at the top.

Formatting your Answers

The format for both short answer/essay questions and coding questions is very similar. Each answer should start off with
;;; px.
where x is a number. For instance, the answer to problem 5 would begin with
;;; p5.
Your answer will begin on the line following this header. When answering a short answer/essay question, every line in the answer must start with a semicolon. Aditionally, the lines should be no longer than 80 characters long. Near the bottom of Dr. Scheme is a display showing your current position in the file in the format line:column. Somewhere around column 80, press Enter to move to the next line, then start your new line with a semicolon.

For instance, if the previous paragraph was the answer to problem #3, your entry in Dr. Scheme would look like:

;;; p3.

; Your answer will begin on the line following this header. When 
; answering a short answer/essay question, every line in the answer must
; start with a semicolon. Aditionally, the lines should be no longer 
; than 80 characters long. Near the bottom of Dr. Scheme is a display
; showing your current position in the file in the format
; line:column. Somewhere around column 80, press Enter to move to the
; next line, then start your new line with a semicolon.


;;; p4.
(etc)
Please note: use only a single semicolon to start your lines.

When answering coding questions, the general format is to use the problem header (;;; px.), followed by a comment explaining the function (in the same form as a short answer), then the actual code. For instance, if problem #5 were to code multiply, your entry in Dr. Scheme would look like

;;; p5.
; This function multiplies two numbers together without using the 
; multiplication operator. This version only works when the multiplier
; is greater than or equal to zero.

(define (multiply num multiplier)
    (if (= 0 multiplier)
        0
        (+ num (multiply num (- multiplier 1)))))
Please note that good variable names, good indention, good comments, and plenty of white space are all very important. If any of these elements is missing, points will be lost.

Testing your Homework

Once you've finished writing your homework, you'll need to test it. Press the execute button. Your computer will think for a few seconds. If the text in the bottom window looks like this, then you don't have any errors major enough to stop the autograder. If you see anything like this or this, you'll need to fix it before you turn in your homework. If you don't, you won't recieve any points for any coding beneath the error. Assuming that you don't have any major errors in your code, you'll want to test your individual functions by running them in the interactions window. Run them with different test cases, especially unusual cases (for instance, the factorial of 0 is 1).

Using WebWork

To turn in your homework, you'll need to use the WebWork system, located at 199.77.128.120:8886. When you follow this link, you'll get to a logon page (If you recieve a security error, choose to continue). Type in your Acme username (gteXXXx) and password, and use cs1311x for the domain. Click Login. You should get to the Message of the Day (MOTD). From here, click on Submit Assignment.

Click the drop-down box, then click on the name of the name of the assignment you wish to turn in. Next, click browse. In the box that appears, navigate to the directory containing your homework. If you've stored your files in My Documents (as above), then you'll click the directory, then click Open. Now, find your homework file (which you named above, and which probably isn't named "homework 1"), click it, and click Open again. The file will now appear in the text box near the bottom of the page. Click Add. The file will now appear in a box near the center of the screen. If you have been instructed to turn in multiple files, follow the same procedure as above to add them. Once you have added all the files you have been instructed to submit, click the Submit button. The system will ask you for a confirmation. Assuming that the information displayed is correct, click Yes - Continue. Otherwise, go back and fix the problem. The system should now tell you that your assignment has been accepted.

Checking the submission

At this point, the system should have your submission, ready to be checked. However, as with any computer software, errors happen. To make sure that the system really does have your assignment, your next step will be to retreive it from the system and execute it again.

To retrieve your submission, click Retrieve Submission. Select the assignment you want to retrieve by clicking on the drop box and clicking the assignment name, then click Continue. Finally, click Begin Download. Save it to a location on your disk, perhaps in My Documents. Once it's finished downloading, open it in a program that handles Zip files, such as Win Zip. Extract the file(s), open your homework in Dr. Scheme, and execute it. If it executes, all is well.