Game Development:
Intro to Computer Science

CSC 105
Union College
Fall 2009

Exercises about dictionaries and to practice for the final are on Codelab.

Helpdesk in Olin 102, Sun-Thu 7-9pm.

These are the criteria that I am going to use to judge the algorithm descriptions and programs that you write for homework assignments and exams. Good descriptions and programs should have the following characteristics.

Grading Algorithm Descriptions

The algorithm description is concise. It is not unnecessarily wordy and does not include unnecessary details.

The algorithm description is precise. Ever necessary step is described. There is no place where "miracles" need to happen. If your algorithm contains steps which themselves seem to be complex and consist of many sub-parts, then your description is probably not precise enough. (An exception is if Python provides a built-in function for carrying out this step.)

Furthermore, the algorithm description should not contain any vagueness or ambiguity. For example, "spread peanut butter and jelly between two slices of bread" is too vague because there are many different ways of how that could be done leading to different results and/or different algorithms.

The algorithm description is understandable without extra knowledge. A reasonably logical person could understand your algorithm without having any additional knowledge about our class or programming.

Grading Code

The code is readable. Functions are documented with a brief description of what they do, what parameters they take and what they return. For longer functions (or very complex functions), sub-parts of the function are annotated with comments briefly describing what's the purpose of that sub-part.

Variable and function names are meaningful and help the reader understand what the variable's/function's purpose is. Indentation and spacing is used in a consistent way to structure the code for easier readability.

The code is structured such that things that belong together are together in the file. Having to jump around in the file when reading it is kept to a minimum.

The code has been tested. Test cases are provided. The test cases cover the different kinds/classes of possible inputs.

Important note: Your code has to run the test cases without producing error messages. I will not grade code that produces error messages. So please make sure that there are no errors before you submit it. If there is an error message and you just can't figure out what is causing this error, come to see me.

The code is correct. The code does what it is supposed to do. If your code does not behave in the way that it is supposed to and you cannot figure out how to fix it and there is no time to come to see me, hand in a description of what is going wrong and under which circumstances it is going wrong.

The code is logically correct. It does not only produce the right behavior by accident, but the steps used to do so are logical and will generalize to other cases.

The code does not contain any unnecessary steps; even if those steps have no effect on the correctness of the result.

The code is efficient. The code is concise. Not so concise that it becomes cryptic and hard to read, but it does not contain unnecessary code that makes unclear what is going on.

The code does not do any unnecessary work; the computer will have to carry out as few steps as possible to solve the problem.