CS21 Spring 2005
Homework 1
Due Thursday, January 19, before class

Start by reading through all of the CS21 homepage. Pay special attention to the "Homework", "Academic Integrity" and "How to succeed in CS21" parts. You should get into the habit of checking this page weekly; the class schedule, homework assignments, weekly readings, and announcements will be posted to the class Schedule weekly. In addition, you should check your CS email account (this is different from your Swarthmore email account) several times per week. I'll send class announcements to your CS email address.

Complete the following:

  1. Run the firefox browser:
    % firebird
    Go to the CS homepage (http://www.cs.swarthmore.edu/). From here click on the "Help" button then "swat cs account info" and read the "Welcome Message", "The User Agreement", and "The CS Lab Rules" pages.

  2. Create a cs21 subdirectory in your home directory and set the permissions so that only you can access it. Here is an example of commands to enter to do this and to verify that it worked ('%' is the shell prompt and text after '#' are comments explaining the commands):
      %  cd			# change current working directory (cwd) to your home directory 
      %  pwd		# print current working directory
      %  mkdir cs21		# create a new subdirectory named cs21
      %  ls			# list contents of current working directory
      %  chmod 700 cs21	# set permissions on directory cs21 so that only you can cd to it
      %  ls -l		# check permissions on files in your home directory
      %  cd cs21		# change cwd to cs21
      %  pwd		# print current working directory 
    Here is some information about the Unix directory structure.

  3. In your cs21 directory run the emacs (or vim) tutorial to learn how to edit files in Unix. You do not need to learn both the emacs and vim editors.
    % vimtutor              # starts the vim tutorial
    % emacs			# Select the Help->Emacs Tutorial menu option to start the tutorial
    			# or type CNTRL-h t  (hold down the ctrl and h keys then type t)

  4. Once you have learned how to use a Unix editor program, start up emacs or vim (or vi) and open a new file named bio.txt and write a paragraph about why you are taking cs21. Also describe any programming experience you have had.
    % emacs bio.txt
    % vim bio.txt

    After you are done editing the file, save your changes, exit emacs (or vim), and enter the ls command to list the the file bio.txt.

  5. Submit your bio.txt file using cs21handin. You will use cs21handin to submit all homework solutions for this class. You may run cs21handin as many times as you like, but only the most recent submission will be recorded for each file you submit. This is useful if you realize after handing in a program that you need to make a few more changes to it. Here is some more information on how to run cs21handin. Note: cs21handin will not be ready to run until noon on Wednesday when we have all your user names

  6. Finally, send me an email message using pine telling me that you have submitted your bio.txt file. To run pine, just type pine at the Unix shell prompt, and then choose the Compose option using the arrow keys or by typing C. Enter your professor's email address (newhall or kuperman) after To: and your email address after Cc:. Use the arrow keys to move around. After typing in your email message, hold down the Cntrl and the X keys to send me the message. You can read incoming messages by running pine and choosing the FOLDER LIST and then INBOX folders.

    For more information on using emacs, and pine, see our Unix Help pages.

  7. In Addition, you should attend the Using Unix sessions that are held the first few weeks of the semester. Using Unix I, will be held twice this week, you can attend either session:
      Tuesday, Jan 18, 4-5pm in CS Lab (room 240 Sci. Center)
      Tuesday, Jan 18, 7:30-8:30pm

    Using Unix II will be offered twice next week. It covers more advanced Unix that will be useful for this course:
      Tuesday, Jan 25, 4-5pm in CS Lab (room 240 Sci. Center)
      Tuesday, Jan 25, 7:30-8:30pm