CS21 Spring 2006
Homework 0
Due Thursday, Jan 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 (the % character is the Unix shell prompt):
    % firefox
    
    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 vim tutorial (or the emacs tutorial) to learn how to edit files in Unix. You are welcome to use either vim or emacs (you do not need to learn both). I recommend that you use vim.
    % 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 vim (or vi), or emacs 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.
    % vim bio.txt
    
    OR
    
    % emacs bio.txt
    

    After you are done editing the file, save your changes, exit vim (:wq in escape mode), and enter the ls command to list the the file bio.txt. You can also run the cat command on the file to list its contents to the terminal window:

    % cat 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. See the On-line References section of the CS21 homepage for more information about 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 mutt telling me that you have submitted your bio.txt file. To send me email using mutt, just type mutt and choose the m option. Enter my user name and a subject and then mutt will put you in vim where you can type your message in there. After ":wq:, you will get back into the mutt window and you can chose option (try c to cc to your user name, and then y to send). To read email using mutt, just type mutt. This will open your mailbox. You can use the arrow keys to pick a message to read,

    For more information on using vim, emacs, and mutt, see the "Unix Help Pages" off the CS department's main Help Page.

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

    Using Unix II will be held:
      Tuesday, Jan 24, 4-5pm
      Wednesday, Jan 25, 8-9pm