Grading Guidelines for Racket Programming Assignments
Here are the guidelines that the graders will use in grading your Racket
assignments. Each will be out of 10 points. 8 of those points will be for
functionality; they will be based on tests to see if the code that you write
does what it should. The breakdown of those points for each problem will vary
depending on the problem. For all of them, 2 of those points will be for
style. There is a fantastic style guide linked from the Moodle course page. That
said, here are some specific items graders will look for:
- Don't write Python or Java style in Racket; write Racket style in
Racket. Look at the examples I've done in class, as well as in the Racket guide,
to get a sense of what Racket should look like.
- Indent well and use good style with parentheses. Again, look at examples.
- Provide a comment at the top of each file indicating who the author(s)
was/were.
- Provide a comment at the top of each function describing briefly what it
does.
- Your code should be direct and minimal to get the job done. For example, the
following two expressions produce the same result, but the first one is
better.
(cons 'a '(c d e))
(append (list 'a) '(c d e))
Similarly, here is another example of two expressions that produce the same result, where the first one is better:
(append '(a b c) (list 'd))
(reverse (cons 'd (reverse '(a b c))))
- In general, defining "helper" functions is fine if it contributes to making
the code more readable.
To grade style, we will use the following scale. Note that this has nothing to do with whether or not the program is actually correct.
- 2 points: The program has good style, follows the above guidelines, and is something close to what I would expect to see in a reference source. There might be an occasional style glitch that we disagree with, but it doesn't stand out.
- 1 point: The program contains at least one considerable style error, or alternatively it contains a number of frequent style errors. Some elements of good style were nonetheless taken into account.
- 0 points: The program has considerable style errors. It may or may not work, but significant portions of it violate style conventions.