Lab 2
FTP, Honor Statement, Scheme
[Turnin: A signed version of the Honor Statement using turnin]
Learn what Scheme is and how to navigate the Dr. Scheme environment.
FTP
File Transfer Protocol (FTP) is a set of agreed upon commands used to transfer ascii and binary files between two computers.
Why is an FTP program useful?
Initially, you will be using FTP programs to transfer homework from your computer to your acme account so that it can be turned in. Other courses at Georgia Tech (such as CS1312) may require you to transfer files from a remote computer to your own so that assignments can be completed.
WS_FTP LE is a graphical FTP program for the Windows environment. It is particularly easy to use because of its graphical interface. This means that instead of typing in commands at a prompt to transfer files, you can just click on the file or files you want to transfer. It is also free for students and can be downloaded at the following web address:
http://atlsky.tucows.com/preview/041-011-003-024C.html
If you are not at your computer, WS_FTP LE is also located on most of the computer cluster machines around campus. In addition, there are similar products for the Macintosh, such as Fetch, that do basically the same thing.
Before transferring files, you need to connect to the computer you want to transfer files from or to. Open up WS_FTP LE (Start->Programs->Ws_ftp->WS_FTP LE), and you should see a window similar to the one below. If you do not see a window similar to this one, click on the "connect" button and it should appear. This window is where you specify the remote computer and your user information for that remote computer.

This is a shortcut of sorts. It saves the current Host Name, Host Type, User ID, Password, and Account information so that during future session you don't have to retype all of the above information. By clicking on the profile name, WS_FTP will automatically fill in that information for you.
This is the remote computer that you will transfer files from or to. For the purposes of 1311x, this computer is most likely going to be acme machines. The address to connect to the acme machines is 'acme.gatech.edu'.
This is the type of compute that you are connecting to. For the purposes of this class, this should be set to "Automatic detect".
This is where you type in your remote system User ID. For the acme machines, your User ID is your GT account login (gtxxxxx).
This is where you type in your remote system password. For the acme machines, your password is the one that you chose when you set up your GT account.
Go ahead and log on to the acme machines by typing in the following information and press "Ok":
You will now see a window similar to the one below. For our purposes this window will be known as the "File Transfer Window", and it is where you will transfer all of your files.

Ok, you are almost ready to transfer a file, but before you do so, you need to know whether the file mode should be set to Binary or ASCII.
Binary and ASCII are the two types of file modes. One or the other needs to be set before transferring a file. In general, ASCII mode should be set for transferring plain text files (a file that can be read and edited by a text editor). Binary mode should be set for transferring all other non-ASCII mode files. If you look at the bottom of the File Transfer Window, you will see two round buttons where you can set the Binary or ASCII file modes. In addition, there is a square checkbox marked "Auto". By selecting "Auto" WS_FTP LE will automatically select the correct the file transfer mode for you. This is particularly useful for transferring many files at one time that may not all be binary or all ASCII. At times, the "Auto" checkbox does not select the correct file mode. When this happens, your files will not transfer correctly. More importantly, your homework will not run! For this reason it is recommended you select the file mode, and leave the "Auto" box unselected. In addition, you may want actually look at the files after they have been transferred to make sure they did indeed transfer correctly. This is a particularly smart thing after you FTP your files to acme to be turned in!
"Putting" a file means to transfer a file from your computer to a remote computer. So if you were connected to acme, putting a file would transfer a file from your computer to your acme account. Note that when you put a file it does not actually move the file, but rather makes a copy of it.
Putting a file in WS_FTP LE is extremely easy. On the left hand side of the File Transfer Window, under the "Local System" heading, are the files on your machine. To put a file on the remote machine, click on the file that is on your machine and click the "->" button. That's it!
You now know how to transfer one file, but what if you wanted to transfer 10 or 100 files? It wouldn't be much fun to transfer each one individually. Luckily, there is an easy way to transfer all your files at once. Actually there are three ways of doing this:
Putting all the files in a separate directory.
Using the Shift Key
Holding down the Shift key, select the first file you want to transfer. Now, with the Shift key still held down, click the last file you want to transfer. You will notice that all files between the first and last files are selected. Now, click the "->" button to transfer all of those files. It is a good idea to make sure that the file transfer mode is set to "Auto" as you are probably sending a mix of binary and ASCII files.
Using the Ctrl Key
By holding down the Ctrl key, you can select individual files you want to transfer. After you are finished selecting the files you want to transfer, click the "->" button. You will notice that all of the files you selected were transferred.
WS_FTP will allow you to transfer a directory. So, by putting all of the files you want to transfer in a separate directory, you can transfer the entire directory and the files inside it by clicking the "->" button.
Getting more than one file at a time works exactly like it does for putting more than one file at a time. The only difference between these two transfers is the use of the "<-" to get the files.
Unix FTP is a text based FTP program for the UNIX environment. It works much the same was as WS_FTP LE, except that there are no pretty graphical menus used to transfer files. To start a UNIX FTP session you need to first be logged into a UNIX machine, either by sitting at a local UNIX machine or by telnetting into one. After you have logged in to a UNIX machine, type:
ftp
to start the FTP program.
After you have started the FTP program, you need to connect to a remote machine (the machine from where you started the program is always the local machine). To do this, use the open command, followed by the address of the machine you want to connect to. For instance, if you wanted to connect to a acme, you would type:
open acme.gatech.edu
and then press "Enter".
After connecting, you will be asked to provide your login name (gtxxxxx) at the "Name" prompt, and your password at the "Password" prompt.
If you successfully logged in, you should see a prompt similar to the following:
ftp>
Binary and ASCII File Modes
ftp> bin
200 Type set to I.
ftp> ascii
200 Type set to A.
Putting a File
To put a file on the remote machine type "put" followed by the file name to put. An example of this is:
put fileToPut.name
get fileToGet.name
The Honor Statement is a list of rules, and regulations that all Georgia Tech students must adhere to. It was created by the Student Government Association (SGA) to promote honesty, academic integrity, and fairness among students.
You are going to ftp a copy of the honor statement from acme to your machine.
Retrieve the statement by logging into acme and typing
"cp ~bk62/pub/honor_statement ."
and do the following:
Use WebWorks to turn in your signed copy of the Honor Statement.
Read on for more details about steps 5-7.
Scanning is process for storing a piece of paper onto the computer in graphical format. It is very similar to making a photocopy except that the scanning software will usually allow you to do much more to a scanned document than you could do with a photocopy machine.
There are two public flatbed scanners located on campus. These are in the Macintosh cluster below the library, and in the Rich NT lab in the downstairs of the Rich building. Instructions on how to use the scanner, and the scanning software are available next to the scanners, or with the Lab UA. These should provide plenty of instructions on how to scan in your Honor Statement. If, however, you need further help, ask the UA or a friend.
Here are the settings you should use to keep your file size down:
After you have scanned in your Honor Statement, you will need to save it so that it can be turned in. Save your file in JPEG format (these have a file extention .jpg). Using the settings we mentioned above, you should not go over quota when you transfer the file to your acme account.
NOTE: Scanning software may be different for the different clusters. For most Hewlett-Packard scanners, all the specified options should be under the "Settings" menu at the top of the screen.
After you have scanned in your signed copy of the Honor Statement, you need to FTP it to your acme account so that you can turn it in.
Note!
A warning:
TURN YOUR ASSIGNMENTS IN FREQUENTLY!
WebWorks will automatically stop accepting assignments after the deadline for that assignment has passed. If you have not turned in your program before the set due date, 99.9% of the time it will not be accepted late! It is therefore recommended that you turn in your work often. This way we will at least have a partially completed copy of your assignment that can be graded. Note that you can turn in an assignment as many times as you like, but remember that the previously turned in copy will be overwritten.
At times, WebWorks may not be working for you to turn in your assignment. In cases such as these you should first read the newsgroup to see if anything has been posted about when it is going to be fixed. Do not post "hey, WebWorks is broke!" if someone else has already done so! If, however, it is nearing the deadline and turnin decides to die for some reason, you can email your work to us at:
To get credit, put your GT number and the assignment on the subject line of the email.
Scheme is one of the programming languages that cs1311x uses to teach various concepts in Computer Science. It is a simplified version of the programming language LISP, but still retains much LISP's power. In addition, it has the added advantage of a quicker learning curve. This quick learning curve is desirable as it allows new programmers to generate programs in a relatively short period of time (as compared to a language such as C). As a result, programmers can "see" the results of the concepts that they are learning now instead of having to wait 3 weeks to learn a more complex language.
For this class, we will be using Dr. Scheme version 103. This is a graphical implementation of scheme that was developed at Rice University. If you really want to, you can use another Scheme program for your assignments, but we will be using Dr. Scheme for testing purposes. If your program runs on your version of scheme, but not Dr. Scheme, you will not get credit!
You can download Dr. Scheme from the following web address:
Once there, there should be specific instructions on how to install Dr. Scheme.
After you have installed Dr. Scheme, run the program by going to (Start -> Programs -> Plt -> Dr. Scheme). You will see a window similar to the one below.

BEFORE YOU DO ANYTHING!
Before you do any type of work in Dr. Scheme, you must complete the following steps. If you do not do this, you will not be able to complete your homeworks.
1. Select Language -> Choose Language
2. Change the language drop-down box to "Full Scheme"
3. Select Textual (MzScheme) (Graphical (Mr. Ed) will also work)
4. Click "Show Details"
5. Change the Output Style to "write"
6. Click "Ok"
7. Click the "Execute" button at the top of the Dr. Scheme window (the one with the green arrow).
The definitions and interaction buffers are where you will be doing almost all of your work in scheme.
Definitions Buffer
This buffer is where you will type in your scheme code. It is called the definitions buffer because this is where you will actually define the function that will later be evaluated.
Interaction Buffer
This buffer is where you will evaluate the functions you defined in the definitions buffer. The output of the evaluated functions is also shown.
Before you can use the functions you coded in the definitions buffer, you must execute them. This effectively lets the interaction buffer know that those functions exist. To do this, press the "Execute" button located just below the menu bar.
To save the functions that you coded in the definitions buffer, go to (File->Save Definitions). This will allow you to reload your work for future use. This is also how you save your homework for turning in. After you turn it in, we will load it into Dr. Scheme for grading.
One new feature in DrScheme v102 is the (define...) button
underneath the
file menu. As you work, DrScheme will keep track of all the functions
you are writing in the Definitions Buffer. Let's try it. In the definitions
buffer write the following:
If you would like additional help on how to use Dr. Scheme, check the online help that is part of the program. It is called the HelpDesk and can be found in the Help menu. More help can be found at: