I've been asked about the exact grading breakdown for the first assignment. Essentially what I was looking for was correct operation and fulfillment of the stated requirements. Everyone taking a 400-level CMSC course ought to have enough programming experience to be able to test code to make sure it fulfills the requirements. Failing that, I gave partial credit for demonstrating that you understood how the commands worked.

For example, I took off more points for scripts that called sort with no arguments than I did for scripts that called sort with well-formed, but incorrect, arguments.

As another example, no one got lower than a 60 on adder2, as all the scripts handled correct inputs correctly; the remaining 40 points were 20 points for handling bad input and 20 for fulfilling the problem's other listed requirements.

I've addressed sorter and adder2 here, since there were very few problems with my_rename and file_report, and the problems with adder were largely the same as with adder2.


This is how the grades broke down for sorter:

100	fourteen people

90      minor cut mistake
85      didn't print username
85      sorted by gid, not turned in runnable
80      no -n
80      no -n
80      no -n
80      no -n
80      no -n
75      sort +0 -t:
60      sort +2, no field delimiter
60      sort +3, no field delimiter
60      no args to sort
60      no args to sort
60      no args to sort
60      no args to sort
60      no args to sort
45	sort wrong, pipes out of order, no results

Here is the breakdown of how many points I took off for what mistakes. You might point out that these do not add up to 100 points. The reason for this is that any error that causes incorrect results is a problem. If there were ten things a program had to do, any one of which would cause a fatal error if done incorrectly, a program which got nine of them right would still be a poor program and would not rate an A grade.

Here's how many points I took off:

sort

-40     sort with no args (5)
-40     sort by wrong field, no delimiter, no -n (2)
-25     sort by wrong field, delimiter, no -n (2)
-20     sort with no -n (i.e. didn't sort numerically) (5)
-10     sort by gid instead of uid

cut 

-15     didn't print username field (1)
-10     error in list format to -f (1)

other

-30     pipes out of order, no results (1)
-5      submitted non-runnable (comments without #) (1)


The one that there were the most problems with was adder2. Most of these problems apparently resulted from not reading the assignment carefully, as it clearly states that the script should

  1. accept more than one integer at a time,
  2. continually prompt the user, and
  3. continually print the running total.
Your grade report should mention that handling incorrect inputs is 20% of the grade. Only three people lost all of these points; one of them made no effort at all to handle incorrect inputs and also lost 10 points from Elegance (i.e. discretionary points). A lot of people attempted a lot of different ways to catch bad input, and got various credit based on how effective the methods were.

Since the possible number of bad inputs is so much greater than the number of good inputs, though, the best way to detect a bad input is to define it as something that is logically-NOT a good input. Hence, the best way to detect non-integer arguments for this assignment would be something like:

        case $number
        in
                *[!0-9]*) ;; 
                *) sum=`expr $sum + $number`;; 
        esac
Here is the grade breakdown.


100     five people

99      no final total
99      no final total
99      no final total
99      no final total
99      clears screen, hiding input
95      misses a few, salvages total
90      misses a few
90      no running total

88      catches bad, but loses total
85      misses some, blank line echoes env
85      misses some, blank line echoes env 
85      misses some
83      no running total, no prompt
80      no running total, no groups
80      no running total, no groups
80      misses a few, no running total

75      misses some, no groups
75      misses some, no groups
75      misses some, no running total
73      misses a few, no running total, no prompt
73      no running total, no groups, no prompt
73      misses a few, no running total, no prompt
70      misses a few, no groups, no running total
70      misses most, no groups

60      no effort to check input, no groups
60      misses most, no groups, no running total

This is how many points I took off for what.

input

-30     no effort to handle bad input (1)
-20     most bad input loses running total (2)
-15     some bad input loses running total (6)
-12     bad input is caught but running total is still lost (1)
-10     a certain few bad inputs (e.g. carriage return) lose running total (4)
+5      bad input not handled (resulting in one of the above penalties) 
        but running total is not lost (1)

operation

-40	doesn't actually add numbers (0)
-10     doesn't handle groups of integers (9)
-10     doesn't report running total (11)

elegance

-7      doesn't prompt user (4)
-1      doesn't repeat final total on ^D (4)
-1      clears the screen, hiding inputs (1)
-0      blank line echoes environment variables (??) (2)

I hope this gives you an idea of what you should be doing to ensure you get full credit for your assignments. Each program should give correct results, and adhere to all the requirements given in the assignment.

As far as handling errors reasonably, for this assignment, I took off points only on the adders, where the assignment said "Be sure to check for non-integer values and quietly ignore them." I did not, for example, require that file_report check that its argument really existed. In general, however, you should be on the lookout for this. Handling errors reasonably is hardly a requirement peculiar to this course, after all.

Steve Matuszek
matuszek@umbc.edu
March 17, 1999