COS 371: Programming Languages

Spring 2022

Grading Guidelines for Scheme Programming Assignments

Here are the guidelines that the graders will use in grading your Scheme 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 style guide linked from the course page. That said, here are some specific items graders will look for:

  1. Don't write Python or Java style in Scheme; write Scheme style in Scheme. Look at the examples from readings and class to get a sense of what Scheme should look like.
  2. Indent well and use good style with parentheses. Again, look at examples.
  3. Provide a comment at the top of each file indicating who the author(s) was/were.
  4. Provide a comment at the top of each function describing briefly what it does.
  5. 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))))
    
  6. In general, defining "helper" functions is good if it contributes to making the code more readable.
  7. Test your code. If you use rackunit (recommended), leave (successful) tests in your code. Comment out the tests that are intended to fail (and indicate so).

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.