
Computer Science Department
College of Arts and Sciences
Give short answers (on paper) for the following questions on materials
covered in the lectures. Note: The answers to some of the
questions below were exclusively covered in the class (i.e. not in the
textbook).
- a. What is the difference between ``local'' and ``remote''
management of Email?
- b.
What is the function of SMTP in the mail delivery process?
- c.
What are the main parts in a Univeral Resource Locator?
- d.
Explain the function of DNS (the Domain Name Service on the
Internet)?
- e.
How many DNS requests are necessary to figure out the IP
address of www.cs.uri.edu?
- f.
Can you explain what it means for a data delivery mechanism
to be ``store-and-forward''?
- g.
Explain the difference between an ``absolute'' and a ``relative''
filename.
- h.
If your current directory is /cs/www/html
then what would be the relative filename for
/cs/www/html/temp/cs101b1/smith/Home.html?
- i.
Describe five possible reasons that may result in an email
message to ``bounce back'' to its sender.
- j.
Describe five possible errors that may occur upon trying to
fetch the contents of a URL using a Web browser (e.g. Netscape).
- k.
Why is it necessary to assign servers to specific
``standard'' port numbers (e.g. the HTTP server is at port 80)?
In this problem you will get a taste of the basic editing capabilities
of Emacs.(1) By the end of it, I hope that you will feel comfortable
using Emacs as an editor. Your familiarity with Emacs is extremely
important for you to be able to keep up with upcoming
homeworks. Actually, your ability to create and edit files is crucial
for the completion of other problems in this homework (namely, the
creation of your home page). There is much more to emacs than
what is described here. Some of these features will be discussed in
the discussion sections.
Before we delve into the details of Emacs, it is important to note
that Emacs allows two methods for invoking its commands. The first
is a ``point-and-click'' interface based on the X Windows GUI,
whereby the user could select various commands by selecting options
using various menus, etc. The second is a ``character'' interface,
whereby the user could select various commands simply by typing on the
keyboard (i.e. without having to use the mouse). In this problem, we
will use the ``character-based'' interface. If you would like to try
the ``point-and-click'' interface, you are welcome to try it out!
Using Emacs' ``character-based'' interface for invoking commands
requires frequent uses of the ``control'' and the ``escape'' keys on
the keyboard. The symbol CTRL- is used to indicate the use of the
``control'' key. For example, CTRL-A means press the ``control''
key and then (while still pressing it), press the character ``A''.
Also, CTRL-X1 means press the ``control'' key and then (while
still pressing it), press the character ``X'' and then (after
releasing the ``control'' key) press the character ``1''. The
sequence ESC- means pressing and releasing the ``Escape'' key. For
example ESC-v means press the ``Escape'' key, release it and
then press the character ``v''.
- a.
Start an Emacs session by typing emacs at the UNIX prompt.
- b.
From within Emacs, create a file called foo using the
CTRL-X CTRL-F command. In this file start typing a short essay (say)
10 lines about anything you want. Make sure you practice saving your
essay every now and then using the CTRL-X CTRL-S command. Also, if you
want to check the spelling of a particular word from within emacs,
position the cursor on that word and then type ESC-xspell-word
followed by the ``return'' key. Get out of Emacs using the CTRL-X
CTRL-C command. Remember to save the files you are editing before
getting out. If you don't, Emacs will ask you if you want to
save your files before getting out.. Remember, if you don't save it,
you loose it!
- c.
Start another session on Emacs (same as step a.) and
retrieve the contents of the file foo using the
CTRL-X CTRL-F command. Did you find your essay intact? (It'd
better be!) If you need to make changes go ahead...
- d.
Without leaving Emacs, create a new file using the
CTRL-X CTRL-F command. Call the new file foobar. In
this file describe in few words what each of the following commands
does: CTRL-X CTRL-F, CTRL-P,
CTRL-N, CTRL-B,
CTRL-F, CTRL-V,
ESC-V, CTRL-L, CTRL-D,
CTRL-K, CTRL-Y,
CTRL-T CTRL-X CTRL-C, ESC->, and
ESC-<.
- e.
Without leaving Emacs, type CTRL-Xb.(2) Emacs will ask you
whether you want to switch buffers. If you press the ``return'' key,
Emacs will go back to editing the foo file. So, go ahead and
press the ``return'' key to switch buffers.
- f.
Repeat step e. to go back to editing foobar. Now,
add to foobar a description of what you think
CTRL-Xb is doing.
- g.
Get out of Emacs using the CTRL-X CTRL-C
command.
- h.
From the Unix prompt make sure that the files you created
above (namely ``foo'' and ``foobar'') are present in your home
directory. To do so, type ls -la from the Unix prompt.
Hand-in a printout of both of these files as a solution to this
problem. Recall that the lpr command we introduced in homework
2 could be used to print these files.
In this exercise you are asked to create your own Home Page on
the World-Wide-Web. In order to so, you need to create a file called
Home.html in your own directory under the WWW directory
subtree. As explained in the lecture on of 9/23/97, your ``public''
subdirectory is /cs/www/html/temp/cs101b1/login, where
login is your UNIX username. For example, if your login is
``jsmith'', then your directory should be
/cs/www/html/temp/cs101b1/jsmith/.
The grade for this problem
will depend on how much work you put in making your home page elegant
and interesting to others. You will need to go through the following
steps:
- Start emacs and create a new file
/cs/www/html/temp/cs101b1/login/Home.html.
- In that file you may write whatever information you want others
to know about you. For example, your name, address, phone numbers,
where you come from, your hobbies, your major, ... etc. A good idea to
make your document elegant is to use the HTML formatting instructions
that we talked about in class. These are described in a document that
you can view on the web (check the supplemental readings page from the
course home page).
- In that file you are also required to include few pointers to
WWW resources that you have discovered and that you liked (the more
the better!). You can do that using the href HTML command
described in class.
- Once you finish editing your home page, get out of
Emacs. Now, you need to change the permissions on your Home Page so as
to make it readable to everybody in the CS cluster. To do so, issue
the chmod a+r /cs/www/html/temp/cs101b1/login/Home.html
from the UNIX prompt.
- Take a look at your home page using Netscape. To do so, you need
to access the class home page, and from there access the ``Student
Home Pages'', which is part of the course archives. From there, find
your own entry and click on it to get to your page.
- If you find that your Home Page does not look the way you wanted
it to be (for example because you mistyped an HTML command), you may
want to go back and edit your Home Page by starting Emacs and changing
it as you wish.
TOMUS is an on-line database of all the libraries of Boston
University, which contains over one and a half million volumes and
over two and a half million microforms. In this exercise you will
learn how to use this facility, which, undoubtedly, will be very
useful to you in the future. Using TOMUS you can ask questions like
``Give me a list of all the books about Jazz'', or ``Give me a list of
any work by or about Beethoven''. In order to start a session on
TOMUS, type telnet tomus at the Unix prompt and then at the
login prompt type library. You do not need a password here. You
will be asked about the kind of terminal you are using. You should
choose V and confirm it when it asks for a confirmation by
typing y. You will be presented with a Menu of commands
that you can give to the library program. This the Main Menu. You can
pick any command by typing the letter next to the command. From here
on follow directions given by the program.
At any point you can get to the main menu by starting a new search
which can be done by typing n or by pressing the Esc key.
You can end your interaction with TOMUS by typing d at the main
menu. This will put you back at the Unix prompt.
- --
Start a session on TOMUS and answer the following questions:
- 1.
How many library items have the word ``Greco-Roman'' in the
title?
- 2.
How many ``computer'' subjects exist under the Library of
Congress cataloguing system?
- 3.
Find the titles of all books that have Computer as a
subject AND Knuth as an author.
- 4.
Can you locate the textbook of this course? Can you locate the
textbook you are using for any other course of yours? Give the name of
the library and the call number for any such textbooks.
Note: The solution to this problem is simply a short
writeup (i.e. on a piece of paper) with answers to the above 4
questions. For more information about Tomus, check the course
supplementary readings.
Created on: 1997.08.01
Updated on: 1997.09.02
Maintainer: Azer Bestavros
best@cs.bu.edu