University of Toronto - Winter
2007
Department of Computer Science
CSC 324:
Principles of Programming Languages
Assignment Code Requirements
and Marking Information
CDF:
All code must run on CDF.
If you develop your code at home and then print your code on
CDF for submission, it is your responsibility to make
sure the code looks as you intended; for example, if tabs
expand to 2cm and this ruins your indentation, you must correct
it before submission to ensure appropriate principles of style.
Error Checking:
Use programming-by-contract (E.g.,
text1,
text2). You have to mention the
pre-conditions and post-conditions for each function in your solution.
Here is an
example of documented code.
Test Cases:
You must provide few, well-chosen test cases for each problem. Read Diane Horton's document on testing for further guidance.
Discrepancies:
In the case of a discrepancy between material handed in on paper, and
material submitted electronically, electronically submitted material
will be used. (E.g., if you electronically submit code, but what you
hand in refers to different code, the code that was electronically
submitted will be used for marking purposes.)
Marking:
Your code will be marked for correctness, programming style and documentation.
You must demonstrate proper testing.
In general, simple solutions are preferred and will receive the most marks.
The marker has a limited amount of time for each assignment, so it is
your responsibility to provide documentation and testing that allows
him/her to quickly evaluate your work.
General Coding Guidelines for CSC324 Assignments
Correctness
The program should conform to the specifications for which it was written. It
should include correct handling of special cases, except that you may assume
that input will be provided in the specified format (i.e. you can use
programming-by-contract)
Design and Efficiency
The program should be constructed from small, coherent, independent and
loosely coupled functions. Each function should access only its own
parameters. The control constructs and data structures used should be
those appropriate to the problem at hand. The program should not perform
unnecessary steps, use extraneous variables, nor implement the algorithm
in a contorted or inefficient way.
Style and Documentation
The program should conform to generally accepted principles of style, such
as a consistent pattern of indentation, use of meaningful identifiers,
generous use of space, etc. Internal documentation should include program
and function headers, and in-line comments to clarify the code.
Knowledge of the language
The program should provide evidence of your familiarity with the principal
control constructs, operators, built-in functions, and data structuring
facilities of the assigned language.
Back to the main page