General advice
-
Read the csc108 newsgroup when
you sit down to do an assignment. The question you are thinking of
asking may already have been asked and answered.
-
Anybody can post here, not just the TAs. To post to ut.cdf.csc108h,
send mail to ut.cdfpc.csc108h or just click here.
-
You are encouraged to POST QUESTIONS here, while you are working at
the terminal. Don't wait a week until the next office hour or
tutorial.
-
Post answers (followups) to other posts too, if you are sure you know
the answer.
-
use netscape for general course information. The course home-page is at
http://www.cs.utoronto.ca/~craig/csc108
GENERAL PROGRAMMING COMMENTS
-
The program should begin with a brief explanation of what the program does,
as a comment. Comments should be found wherever a program segment needs
clarification. At this stage more comments are better that fewer. Comments
are essential to your understanding of your own code.
-
Program comments are necessary and variable names, even counted "for
loop" indexes should be meaningful to a casual reader. These things
are important for me to understand your work. Part of your mark
will depend on program readability (and style).
-
Programs that satisfy the specifications of assignments will be
quite short and should be short. If your program is getting too
long then you should rethink what the assignment is asking you to
do.
-
Making assumptions while writing the program is okay as long as you
don't compromise what was required in the assignment. Reasonable
assumptions are frequently necessary and should be included
explicitly in the program's comments. They will add to your
understanding of the code as well.
-
As you write the program think about what tests are needed to check
your program. Really look at the output and check it adding written
comments. Include a reasoned and reasonable number of tests runs.
More than one and less than a thousand :)
-
Don't get pathological with exceptions but try to grasp the context
and purpose of the exercise. Don't add "Bells and Whistles" until
you are sure you have met the specifications of the assignment.