Chin's Assignment 5 webpage
Chin's Assignment 5 Q+A
Chin's solution: HTML version
| Lisp version
My solution: HTML version
| Prolog version
This assignment is out of 10 points. The following is how the grading breaks down.
Coding Practices (40%)
- 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
- 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%)
has_variable functor: 20%
- Half each on rules and base case.
solve functor: 20%
- Half each on base case and rules.
Solutions are correct: 15%
- Returned solutions are correct.
- 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. Default value: 0.4)
Returning the correct solution once was preferred. Returning it twice was acceptable. Returning it infinitely would be a problem if you were using this as part of another program, and probably cost you a Misc. point.
Most people got 9.9 or 10 on this one. In most cases, the 0.1 difference was whether you documented clearly how to use your functor, especially solve. Simply stating "takes an equation and a variable and return the solution" isn't specific enough for this last 0.1 point. Which parameter is the Equation? What sort of Variables are acceptable--single letters, words? Is Solution the value of the variable or just the rearranged Equation? Basically, answer the sort of questions you would be asking if you were going to use this functor but didn't want to read through the code to puzzle out the details. See Chin's documenation of solve as a good example.