CMSC 10100 HOMEWORK 0:  
Due NEXT Tuesday of "first" week:  Get a classes Account and set up
your directories for homeworks.

First, Request a CS account at: 
https://www.cs.uchicago.edu/info/services/account_request.  
(Other information can be found at:   http://www.cs.uchicago.edu/info/services. )

Second, once you have your account confirmed, then you need to Activate your 
CGI Service account.  You do this at:  
https://www.cs.uchicago.edu/info/services/account_request.

Third, you need to register with the TA's for grading at: UNDER CONSTRUCTION

Note: We are making changes for how web programming is done this year so 
there may be further steps in addition to those given below.



----
There will be 6 homework assignments during the course of the class.  
For delivery, each assignment must be placed in its own directory 
within the html directory of your CS account. The graders will look 
for assignments in specific directories. Hence, the assignment 
directories must have prescribed names, namely,
 
hw1, hw2 ... hw6.  

If they are not where they are supposed to be, they 
CANNOT be graded.

Naming conventions are important.  If you are asked to name a directory 
or homework file a certain way, it is your responsibility to follow the 
instructions exactly.  Do not count on the graders browsing through 
your directories and files to locate your assignment. Also, your grader 
may not look at your homework by typing a URL. Instead the grader will
use a program.  Chances are the program will not be smart enough to check 
for typos.

Note that there will be introductions to unix I and 2 offered at the MacLab 
the second week of the quarter.  Go and find out what all the 
cryptic commands in unix mean!  Check 
http://www.maclab.cs.uchicago.edu/index.php?swap=minicourses 
for times and days.


General Submission Instructions:

Homework will be turned in by placing all your files on the Computer Science server 
in the proper location by the deadline. Each homework should be in a directory:

    /stage/cgi-cmsc/yourAcct/public_html/cs101/hwx

where  x is the number of the assignment.  (Note this is in the special 
CGI Service directory you requested, not in your "/home/" directory.) 

The final project will be placed in:  

    /stage/cgi-cmsc/yourAcct/public_html/cs101/final. 

Make sure that the permissions are properly set so that we can enter the 
directories, view the files, and execute any scripts that we need to.  (See below.)

The following is the detailed description of how to create the above directories:

    0.  Login to your /home/directory.  If you check your current "path" by issuing the 
"pwd" (pATH TO wORKING dIRECTORY) command, it will respond with this information:
    
    /home/yourAccount

You will need to "cd" (cHANGE dIRECTORY) to your CGI directory by issuing

    cd /stage/cgi-cmsc/yourAccount/public_html/

with your personal account name.
    
    

	1.  	Create a directory named cs101 in your CGI directory, which would
look like: 
    cd /stage/cgi-cmsc/yourAccount/public_html/cs101
    
(You can always check your current directory with the pwd command.)

 Use the "mkdir" (mAKE dIRECTORY) Command to actually create the directory:
    mkdir cs101

	2.  	Make sure cs101 directory has 755 permissions That is,  drwxr-xr-x, 
which gives you the ability to edit, and the world the ability to see and execute.  
This the information you see when you "ls" (lIsT your files). (They are abbreviations 
for:  d = directory; r = read; w = write; x = execute; - = none. They occur in
groups of 3 after "d" for: owner/subgroup/world.)

 Commands to use: 
	ls -ld cs101   to list the permissions of the directory you just created. 
	chmod 755 html  to change the permission to 755 if the permissions are 
not correct. (chANGE modE.)

	3.  	Change directory into the cs101 directory.  
	
 Command: 
    cd cs101
   

	4.  	 While in the cs101 directory, for each assignment, create a 
corresponding directory (for example, hw1 for assignment 1.  See below on 
how to generate directories for the other assignments.)

 Command: 
    mkdir hw1

	5.  	Make sure hw1 directory has 755 permissions.

 Command: 
    ls -ld hw1 to list the current permission.
    Use chmod 755 hw1 to change the permission to 755 if not correct.

	 6  Using a text editor (e.g., emacs, vi, or upload from your local machine's 
wordprocessor such as SubEthaEdit), create file for an HTML page called 'index.html' 
in the hw1 directory.  For now, this page will just serve as a dummy template. 
It should not contain any content but only the basic structural tags of an HTML page. 
(See Pence, page 8.)

	7.  Move back up into the cs101 directory by issuing
	
	cd ..  
	
Now make five copies of the hw1 directory (and its subfile), named hw2, through hw6 
respectively. Directories cannot be copied like simple files with the 'cp' (cOpY) 
command.  They also need the '-r' flag (rECURSIVE) to copy the content of the 
directory as well. For example, to create the directory for the second assignment, 
enter the following on the command line:
   
    cp -r hw1 hw2

This will copy both the hw1 directory, renaming it to be hw2, and the file inside hw1 
into hw2.  Eventually you should now have six subdirectories in your cs101 directory, hw1 
through hw6,  and each of these directories should contain a file for a blank HTML page, 
called 'index.html'. Go ahead and do this one more time with "final" as the 
last new directory name.

8.  	 You will put all your solutions into the corresponding homework directory 
(if you are submitting an HTML document, make sure index.html file is present 
in the directory). 

	9.  	Make sure ALL the HTML documents you submitted have permissions 744 
(-rwxr--r--) or 644 (i.e., -rw-r--r--)  .  This allows you to edit, and everyone 
else to read it without editing).

The figure below shows the final directory hierarchy. (Make sure there is an 
index.html file in each homework directory). Also, path names are case sensitive. 
Please keep all names of your directories in lowercase letters 
(hw1 not HW1, etc.)

                                      /  <-- server's root 
                                      stage
                                      /
                                     cgi-cmsc
                                      /
                                    <your cs account>
                                      /
                                     public_html
                                      /
                                     cs101
                                     _/_________...___
                                    /     /          /
                                   hw1   hw2  ...  final
 
So the full path to hw2 would be: /stage/cgi-cmsc/yourAccount/public_html/cs101/hw2, etc.
       
    

Valid XHTML 1.0 Strict