If appropriate, give | ||
- data defn | -25% | |
- examples of data | -25% | |
- template | -30% | |
Use helper functions (see below) | -50% | |
Every function needs | ||
- contract | -10% | |
- appropriate use of types (see below) | -10% | |
- to follow template for type | -30% | |
- ... or document choice of recipe | -30% | |
- test cases | -25% | |
- consistency of code and tests | -100% | |
- good formatting | -100% | |
- no magic numbers | -10% | |
Papers must be stapled | -10% |
'yep
and 'nope
.
Later in the semester it includes using structures as needed. Overall,
this point is not a big issue in Scheme.
empty
.
All others should be given a name. For instance, using "80 (mph)" should
be given a name like CRUISING-SPEED
.
BAD: (define (foo a b) (cond[(zero? a) (extremely-long-function-name a b)] [(positive? a) (even-longer-than-the-extremely-long-function-name a b)]))(note three things are wrong with this one. Give some space after the word "cond",
GOOD: (define (foo a b) (cond [(zero? a) (extremely-long-function-name a b)] [(positive? a) (even-longer-than-the-extremely-long-function-name a b)])) BAD: (local [(define (glurble stff) (first (first stff))] ...) (If expression B "(first...)"is inside expression A "(define ...)", your indentation had better reflect that.) GOOD: (local [(define (glurble stff) (first (first stff))] ...) BAD: (map (lambda (x) (cond [(ufo? x) 'area-51] [else 'area-27])) (list 23 'b)) (very hard to find map's second argument, because it's indented as if it's part of map's first argument) GOOD: (map (lambda (x) (cond [(ufo? x) 'area-51] [else 'area-27])) (list 23 'b))In general, either put a function's arguments all on one line (that's fine), or indent so that they're all on separate lines. If you are ever in doubt or want more examples look at the book, class notes, or even write it out in drscheme to see how general formatting should be done.
Keep in mind that your labbies are grading a large number of papers, and sometimes mistakes are made. If you feel something was marked off even though it was correct, by all means check with the grader. However, if you feel that the grader was correct in taking off some points, but you feel they took off too many, try to defer to their judgement. If you feel that you've been graded overly-harshly consistently over several homeworks, first see the grader(s), If they don't agree, see the Lab Coordinator.
Disclaimer:
This guideline is not binding;
we reserve the right to give whatever score we feel is fair.
Guarantee:
You have the right to question any score, and get an explanation
of why we feel it is fair.
See one of the Course Instructors if you are unsatisfied
with a grader's explanation.