HOMEWORK
PIC 40A, Winter 2004
PROGRAMMING PROJECTS:
-
1. Due date: 01/16/2004, by 12:30 pm.
- Required File Names:
index.html
.
- The exercise is designed to get you started with Web programming.
Your task is to create your first Web page and to publish it on
the Web. There are no specific requirements regarding layout and
content of your first experiment - let your imagination and skill
guide you. However, the page created by you should be written in
valid
HTML
code conforming to W3C standard.
- Make sure that you submit your header
in the required format, and that you follow all the instructions
listed below on this page.
-
2. Due date: 01/23/2004, by 12:30 pm.
- Required File Names:
hw2.html
.
- The exercise is designed to give you a chance to practice with
various block-level and text-level elements of HTML 4.0.
Your task is to create a Web page which will feature at least two
different heading levels, one table with no less then 3 columns and
3 rows, two unordered lists inside an ordered list, and a
definition list element (these are block-level elements). In
addition you are asked to use at least 4 different text-level
elements (bold, underline, italic...) for formatting your text.
The page should refresh automatically every 12 seconds. Still,
the main thing in every Web page - the content of the text -
is entirely up to you. However, the page created by you should be
written in valid
HTML
code conforming to W3C standard.
- Make sure that you submit your header
in the required format, and that you follow all the instructions
listed below on this page.
-
3. Due date: 02/09/2004, by 1:00 pm.
- Required File Names:
hw3.html
.
- The exercise is designed to give you a chance to practice with
JavaScript and various JavaScript attributes defined for HTML
elements. Your task is to create a Web page which would display
dynamic information about current HTML document (URL, modification
date, title, referring page, ...), and about Browser (name, version).
Your page should also feature several JavaScript functions attached
as event-handlers to various visible HTML elements (by means of
appropriate attributes, like
onClick
for example.
These functions may produce alerts, or change status line, or ...
Once again, the creative part (actual content of the page)
is up to your imagination and level of skill.
Please try to use as many different HTML block-level and text-level
elements as you see fit (the more - the better, but do not
compromise your artistic taste). In other words practice,
practice, practice... Finally, the page created by you should be
written in valid HTML
code conforming to W3C standard.
- Make sure that you submit your header
in the required format, and that you follow all the instructions
listed below on this page.
-
4. Due date: 02/27/2004, by 1:00 pm.
- Required File Names:
hw4.html, hw4.cgi
.
- The exercise is designed to give you a chance to practice with
HTML Forms and CGI scripts.
Your task is to create a CGI application (using Perl) which would
ask user for his/her first and last name, and then output a
personalized greeting. The personalized greeting itself is up
to your imagination and level of skill, but the dynamically
generated page should be written in valid
HTML
code conforming to the W3C standard.
- Make sure that you submit your header
in the required format, and that you follow all the instructions
listed below on this page.
-
5. Due date: 03/15/2004, by 1:00 pm.
- Required File Names:
hw5.html, hw5.cgi
.
- This exercise is designed to give you a chance to practice with
CGI.pm
module. Using
example 9 (discussed in details in the textbook [1], page 99),
build a simple Photo Album application with CGI and Perl.
Your main page should display user photos uploaded so far, as well
as a form prompting to upload more images. Image upload should
be password-protected, and should be allowed only from "pic.ucla.edu"
domain. Please limit the image type to JPEG
and image
size to 100Kb
. Please also limit total size of images
for your album to 1Mb
. The layout of the album is up
to you. But you are responsible for handling (trapping) all
reasonably possible errors.
- Make sure that you submit your header
in the required format, and that you follow all the instructions
listed below on this page.
READING ASSIGNMENTS:
- [1]
S.Guelich, S.Gundavaram, G.Birznieks "CGI Programming with Perl"
2nd ed. O'Reilly 2000. ISBN 1-56592-419-3.
Courtesy of the authors, a
complete set of code examples from this book is available free
of charge.
- [2]
R.Schwartz, T.Phoenix "Learning Perl" 3rd ed.
O'Reilly 2001. ISBN 0-59600-132-0.
- [3]
M.Hall, L.Brown "Core Web Programming" 2nd ed.
Prentice Hall 2001. ISBN 0-13-089793-0. Courtesy of the
authors, a complete set of
Course Notes
from this book is available free of charge.
- [4]
S.Spainhour, R.Eckstein "Webmaster in a Nutshell" 2nd ed.
O'Reilly 1999. ISBN 1-56592-325-1.
- 01/08/2004
- [3], Chapter 1, Chapter 2, Chapter 3:
"Designing Web Pages With HTML 4.0".
- 01/19/2004
- [3], Chapter 4:
"HTML Frames".
- 01/23/2004
- [3], Chapter 5:
"Cascading Style Sheets".
- 01/26/2004
- [3], Chapter 24, 25:
"JavaScript".
- 02/02/2004
- [3], Chapter 18:
"HTML Forms".
- 02/16/2004
- [1], Chapter 1:
"Getting Started".
- 02/20/2004
- [1], Chapter 2:
"HTTP".
- 03/01/2004
- [1], Chapter 3:
"CGI".
- 03/07/2004
- [1], Chapter 5:
"CGI.pm".
GENERAL PRACTICES AND PROCEDURES:
- Assignments will be distributed in class and posted on the class web page.
Current homework assignments are listed above on this page. Read the text
and stay a bit ahead of the lecture. Material from the reading part of an
assignment may appear on midterms and finals. Approximately eight
programming projects will be assigned over the course of the quarter.
Each project will require you to write a program to solve a specific
problem.
- All programming projects must be submitted electronically, by placing
your files in TWO DIFFERENT PLACES:
- The
SUBMIT
folder in your Windows account;
- The
public_html
folder in your UNIX account.
Be sure to give your files the EXACT name required (remember that case
counts). Computer programs must be submitted by the specified time on
the due date. No homework will be accepted by e-mail to the TA or to
the instructor. No late projects will be accepted.
Leave the homework files in your Windows SUBMIT
folder
and in your UNIX public_html
folder for the rest
of the course, even after they have been collected and graded.
You may be able to submit files remotely with ftp or ssh,
but it is best to make sure your submission works in the Lab before
you submit. If you wish, you may overwrite a previous submission
with a new version at any time before the due time on the due
date. Please do not store any files in your submit directory
other than those that are to be or have been collected. To
confirm that you have submitted correctly, run the checksubmit
program. This check generally requires a trip to the PIC Lab.
Your homework scores will be posted in your gradebook on
"my.ucla" web site along with
any other feedback from the Reader.
Please, check your gradebook on
"my.ucla" web site each week to verify your grades. This is
very important, it is the only way to know for sure that you actually
received credit for your assignment.
- Each program you submit MUST have the following
header inside the
<HTML>...</HTML>
element (at the top):
<!--
Your name
Your Student ID
Your e-mail address
I certify that the following represents my own independent work and
conforms with the guidelines of academic honesty described in the
course syllabus.
-->
Any homework submitted without this header will not be graded,
and you will receive zero credit for it.
- Your code should be as easy to read as possible. Use indentation
carefully and consistently to delineate levels of nesting.
Disjoint blocks should be well separated by concise and
informative comments. This will be worth at least 1 point of
every assignment. Although you are allowed a fair amount of
choice in style, please try to conform to the conventions used
in lecture and in the text.
- You are welcome to use the
PIC Computer Laboratory in Boelter Hall 2817 to work on your
programming assignments.
However, you must still submit your program to your UCLA class account.
In order to do this, you need to transfer files between your home computer
and your account on the PIC Lab network. Please refer to the
instructions on remote access to the PIC Lab.
Always compile and test your programs on the lab machines before
submission.
- Start working on programming assignments early. Do not wait until the
last minute to submit your work, as the lab may be full near critical
time. Deadlines for homework are strictly enforced.
- You are encouraged to discuss aspects of the course with other students,
and you may discuss the homework assignments in general terms with others.
You may also get help from the TA or the instructor in writing your
programs. However, the general rules of academic honesty apply to all
homework: each homework assignment must represent your own, independent
work. In particular, you may not copy any part of a program written by
someone else without citing the reference carefully.
- If you have a question on the way a homework was graded, you must contact
the instructor within one week of its return. No e-mail request for
regrades will be accepted, you must contact the instructor in person.
- Your programming will improve with practice. After finishing an
assignment, do not be afraid to experiment with your own programs.
Last modified on
by fedandr@math.ucla.edu.