Lab 2

FTP, Honor Statement, Scheme

 

 

[Turnin: A signed version of the Honor Statement using turnin]

Objectives

  1. Learn what FTP is and how to transfer files.
  2. Learn how to use WS_FTP LE and UNIX FTP programs.
  3. Learn how to use turnin to turn in your assignments.
  4. Become familiar with the Honor Statement and turn in a signed version.
  5. 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.

 

Introduction to WS_FTP LE

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 you Transfer a File

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.

 

 

Go ahead and log on to the acme machines by typing in the following information and press "Ok":

Host Name: acme.gatech.edu
User ID: Your GT account login
Password: Your GT account login password

 

File Transfer Window

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 File Modes

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

"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!

 

Putting More Than One File

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:

  1. Selecting the files with the 'Shift' key.
  2. Selecting the files with the 'Ctrl' key.
  3. 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.

     

    Putting the files in a directory

    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 a File

    "Getting" a file means to transfer a file from the remote machine to your local computer. This works by selecting the file you want to get under the "Remote System" heading, and then clicking the "<-" button. As with putting a file, getting a file does not move the file, but rather makes a copy of it on your local machine.

     

    Getting More than One File

    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. 

     

     

    Introduction to UNIX FTP

    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.

     

    Connecting to a Remote Machine

    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

    As with WS_FTP, you need to set whether files should be transferred using binary or ASCII modes. To do this use the bin and ascii commands respectively. An example of what you would see when executing these commands is as follows:

    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

     

    Getting a File

    To get a file from the remote machine type "get" followed by the file name to get. An example of this is:

    get fileToGet.name

     

    Closing and Quitting the FTP Session

    After you have finished transferring files you will want to close and quit the FTP session. To close your connection to the remote computer type "close". To quit the FTP program type "quit".
     

    Honor Statement

    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.

    What you are going to do with the Honor Statement

    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:

    1. Edit it by substituting your name, post office box, and gt number for George P. Burdell, 9999999, and gt9999x, respectively (do not put any information on the dotted lines. You'll write on those later).
    2. Print it out.
    3. Read it.
    4. Sign it and date it on the dotted lines.
    5. Scan your signed copy of the Honor Statement into a computer.
    6. If using the OIT scanners, you'll have to ftp your file to acme and then to your home machine. Otherwise, just keep the file on your home machine for turn in via WebWorks.
    7. Use WebWorks to turn in your signed copy of the Honor Statement.

    Read on for more details about steps 5-7.

 

Scanning in the Honor Statement

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:

 

Saving your Scanned Honor Statement

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.

 

FTPing the Honor Statement

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!

WebWorks



Submitting files via Webworks is a fairly straightforward process. On the left hand side of the screen is an option to submit an assignment. Clicking on this link will bring you to another page where you can add and remove files to be submitted using the appropriate buttons.

YOU WILL NOT BE ABLE TO SUBMIT A FILE UNTIL YOU PRESS THE SUBMIT BUTTON!!

 

 

Deadlines

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.



What if Webworks isn't Working

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

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.

 

Which Scheme Implementation are we Using

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!

 

Where can I get Dr. Scheme

You can download Dr. Scheme from the following web address:

Once there, there should be specific instructions on how to install Dr. Scheme.

 

Getting Familiar with 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).

 

Definitions and Interaction Buffers

The definitions and interaction buffers are where you will be doing almost all of your work in scheme.

Executing Definitions

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.

 

Saving Definitions

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.

 

Nifty Feature

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 click the define button, you'll see that a function named foo is now in the list. Now type: There should be two functions now in your list.

Need Help?

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: