Back to TA Page

Mobius strip

Assignment 2

Chin's Assignment 2 webpage
Chin's Assignment 2 Q+A

Chin's solution: HTML version | Perl version
My solution: HTML version | Perl version

This assignment is out of 10 points. The following is how the grading breaks down.

Coding Practices (40%)

Documentation: 20%

  • author and (date or version or class+assignment)
  • description of program as a whole
  • description of each function/subroutine, including possible/required parameters and result returned (and any side effects)
  • brief comments on complicated lines/blocks code
  • in short, help others quickly find their way through your code

Formatting and good practices: 15%

  • use obvious/relevant names for variables
  • consistently indent blocks of code
  • keep lines short (less than 80 characters/screen width)
  • break up long chunks of code within a single subprogram into related sections by adding an extra line of white space between them (just like how you break up long passages of text into paragraphs)
  • break up your program into smaller, modular subroutines or functions when it makes sense to do so
  • in short, make your code itself easy to read

Usability: 5%

  • check spelling and formating of messages to the screen
  • make error messages informative
  • include adequate feedback to users of your program
  • catch errors whenever possible and fail gracefully
  • in short, make your program easy to use (as long as it doesn't conflict with assignment specifications)

Assignment Requirements (60%)

Input: 15%

  • Accepts more than one filename
  • Recursively descends directories
  • Checks that files are readable by all

Checking links with geturls, Lynx, and wc: 25%

  • Catches at least one protocol (mailto:, ftp:, etc) that is neither http: nor a local files.
  • Calls geturls on each local file and deals with the links found there
  • Recognizes an "Unable to contact server"
  • Recognizes an error page
  • Proper calls to external programs (with their output supressed)

Output: 15%

  • Correct output.
    Inaccessible files:

  • Files and inaccessible urls are both sorted.

Miscellaneous: 5%

  • My gestalt impression: odds and ends, little bonuses and minor omissions, rewards for good clear code, minor penalties for major convolutions, other things that don't clearly fit in the above but still make a difference. (If you're missing a few, undocumented .1's, they probably came from here.)


Documenatation and good practices counted more on this one, since you were warned about it in class. But since I didn't get this site address out to you before this assignment was due, it's still not 40%.

An example that earned bonus "Misc 5%" points on this assignment is deleting your Lynx dump files when you were done with them.

See Assignment 1 for more general comments.