Monday, April 30, 2007

HW2 Grading Notes

------------------
HW2 Grading Notes
by Mock Suwannatat
------------------
4/30/2007

CRITERIA:

Part A: 20 points
- Maximum 5 points if code does not compile.
- 5 test data, 4 points each
* data 1: in example, easy
* data 2: in example, hard
* data 3: not in example, medium
* data 4: 0 way
* data 5: wrong input
- Up to 2 points may be deducted for style

The actual test data can be found at
http://www.cs.ucsb.edu/~mock/cs10/hw2-test-data.zip
The files rb.# are input, robotOut.# are sample output.

Part B: 20 points
- Maximum 5 points if code does not compile.
- 5 test data, 4 points each
* data 1: in example, very easy, mod 2, 10 rows
* data 2: mod 9, 50 rows
* data 3: mod 7, 50 rows
* data 4: mod 3, 50 rows
* data 5: wrong input: 0 9 9 9
- Up to 2 points may be deducted for style
- Up to 8 points are deducted if you do not use JOptionPane


The actual test data can be found at
http://www.cs.ucsb.edu/~mock/cs10/hw2-test-data.zip
For Robot, the files rb.# are input, robotOut.# are sample output.
For Pascal, the files pc.# are input, pascalOut.# are sample output.


COMMENTS YOU SEE OFTEN:

- Lines too long: this means that your lines go over 80 character long, which makes it hard to read on my terminal. Truncating long lines nicely is a work of art, and you should learn it.
- Funny indentation: this means that you have inconsistent indentations, or you may be using tabs instead of spaces. Keep in mind that tabs may be set differently on different environment. The best way to make sure your code look good everywhere is use spaces, and avoid using tabs. Many editors support this. (It can be set that when you press Tab, spaces are inserted.)
- Lacking comments: you should put some comments
1) at the top of the file to summarize what the program does
2) at the top of each method to explain what it does, what it returns, and what each parameter is.
3) along the program to explain tricky logic

ROBOT:

Note that the small step may be bigger than the entire distance, in which case the number of ways is zero. These values are not illegal and your program should take them.

Some of you did not try to match the messages and output exactly with the sample runs. This makes grading very difficult as I cannot use my script. The worst thing is when your order of input is different. This could lead to errors in grading which negatively affect you.

PASCAL:

The assignment clearly states that 2 and 9 are valid inputs. Many of you reject the value 2 and 9.

The assignment also states that you ask for the modulo first, then the number of rows. Some of you did it in a different order. This would make your program fail all the tests.

Some of your programs produce negative numbers when number of rows is large. This could fail 3 tests.

Some programs do not work when n = 50, missing the last number of the last row. You should have spotted this error. You should always test your program on boundary cases.

No comments: