R. Clayton (rclayton@monmouth.edu)
(no date)
You said that your test program only allows our programs 15 seconds to run
before it kills them. Assignment 2b retrieves many resources, and can easily
take longer than 15 seconds to execute. Should I worry about the 15 second
limit?
Not really. Your assignment is limited to 15 cpu-resident seconds, not 15
wall-clock seconds. As you'll find out in operating systems, you program only
hits the cpu when it's got some work to do, and waiting for downloads from the
network is not work.
Also, my tests don't go out over the network, so 15 cpu seconds should be more
than ample. However, should I feel the need to go to the network, I'll be
talking to the machine to my immediate left, which shouldn't take all that
long.
I'm going to optimize the program as much as possible,
Premature optimization is the root of all evil (or at least a significant
portion of it.) I'm not interested in how fast your program is, as long as
it's not ridiculous (as in 23 minutes ridiculous), and I won't be too put out
if you code is slow. I am, however, deeply interested in whether or not your
code works correctly, and I'll be bitterly disappointed if your code doesn't.
My recommendation is you spend most of your time making sure you code is
correct and well written. Once you've done that, and you still feel the need
to optimize, then make a copy and optimize the copy (then throw the copy away).
My program follows the first link and output the link to the bookstore,
likewise it would read the bookstore resource, and follow any links on that
page, until there are no non-duplicate links left. Is this the correct
interpretation of the assignment, or is the program only supposed to follow
links on the initial page and finish once it has crawled one level of links?
The first interpretation is correct. Your assignment should traverse every
page reachable by any number of links starting from the document associated
with root url given on the command line, as long as those links don't leave the
root url's domain.
This archive was generated by hypermail 2.0b3 on Mon Dec 15 2003 - 19:45:06 EST