The following are guidelines used by your TAs and labbies to grade your programs.
Code Quality (explained) | (60%) | |
---|---|---|
Modularity and Class Organization | ______________ | |
Data Abstraction (data forms reflect intent) | ______________ | |
No roundabout, confusing approaches | ______________ | |
No Repeated Code or Data (magic numbers) | ______________ | |
Readability (indentation, variable names, comments) | ______________ | |
Appropriate access (public, protected etc) and
package use (not for first hw). |
______________ | |
Appropriate Control Flow constructs, idioms, etc | ______________ | |
No unnecessary casting or instanceof |
______________ | |
No unjustified gross inefficiencies | ______________ | |
Correctness | (20%) | |
Evidence of test code (all classes) | ______________ | |
Works on trivial inputs | ______________ | |
Works on some inputs | ______________ | |
Works on common inputs | ______________ | |
Works on all legal inputs | ______________ | |
Documentation | (20%) | |
README | ______________ | |
User Documentation | ______________ | |
Code Architecture Documentation | ______________ | |
Late? | ______________ | |
Total | ______________ | (100%) |
Here are some specific explanations of a few items in the guide:
enum
or char
as an int
...and if you do need to (e.g. as an array index), certainly cast it (with static_cast
.
You don't need to describe the purpose of an obvious method
(eg toString()
or a constructor), if it is straightforward. Nor do you need
to describe a method in a subclass, if it's been described in the (perhaps abstract)
superclass.
break
if there is a straightforward
alternative (there usually is), declare types as final static
when possible,
etc. Unjustified inefficiencies are using algorithms that are big-Oh worse than needed, w/o any gain in ease of code. Example: making a growable string which grows when adding every single character, rather than successivly doubling each time growth is needed. Further examples and discussion are in Comp314 Coding Style Guidelines (pdf).
'yep
and 'nope
. Later in the semester it
includes using structures as needed. Overall, this point is not a big issue in Scheme. true
, false
,
and null
. All others should be given a name. For instance, rather than just
using "120", it should be a named constant like static final int
cruiseSpeed = 120; // km per hr
main
for that class) as soon as
you write it. Note that this means toString
or paramString
is
one of the first methods you write for a class, so that you can print out debugging
versions of your object. If your function returns an incorrect answer, please note this
in your documentation (comments or README
�
file).
SomeFile.java
isn't really late i just forgot to copy it
with cp -p
". You can presume that the reader is familiar with the assignment handout, but not discussions from class. The code-architecture documentation -- which can also be in the README file -- is intended for another programmer who might be modifying your code. It has an overview of what the main classes of your program are, how they relate and interact, and the main approach taken to solve the problem. Conciseness is desired in all documentation; there is no requirement that documentation necessarily be lengthy. Clear English composition is expected.
README
, how late your assignment is, and what the published
deduction is (-2% if labbies have to re-calc this). Remember that your README should mention what features don't work, if you didn't have time to complete the assignment.
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 a TA.
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 a TA or Course Instructor(s) if you are unsatisfied with a grader's explanation.
� Why the capitalized filename README
?
So that in a UNIX listing of files, this informational file shows up near the beginning
(since capital letters are all sorted before lower-case letters in UNIX). This is also the
rationale for capitalizing directory names, so that all directories precede regular files
in a listing. (Unfortunately this is somewhat undermined by Java's insistence that .java
files share their class's name, which is capitalized.)