|
Assignment 1
Chin's Assignment 1 webpage
Chin's Assignment 1 Q+A
Chin's solution: HTML version
| Perl version
My solution: HTML version
| Perl version
This assignment (as most will be) 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%)
File and I/O: 20%
- prints a usage message when given too many arguments
- takes a file argument
- reports if that file is inaccessible
- accepts content redirected through STDIN
Matching: 20%
Results: 15%
- prints only unique
- sorted
Miscellaneous: 5%
- My gestalt impression, odds and ends, little bonuses and minor omissions.
Comments
I went easy on the documentation, coding practices etc. this time, to let you warm up. For example, I didn't take off more than 0.5 for no documentation, when I should have taken off 2.0. You've been warned!
I also went easy if you asked for a filename instead of using piped content, since this was a pretty common error.
Note that not all the comments I include in your emails are related to a grade deduction (though they may have impacted the miscellenous 5% in some way). They are just things I noticed.
Usually I don't mind very much how you produce the results required by an assignment. If you want to use a different technique to achieve the same ends, go for it. Just document it! Make it obvious what you're doing and why.
|