Coding clearly: You should always make an effort to write code that is easy for other people to read. In the real world, this is an important skill that is valued higher than cleverness or using the least number of lines/characters possible. In this class, it is important so that we can understand your program and grade it fairly. By reading through your code and comments, we should be able to figure out how your code is organized and why it works. If we can't, we reserve the right to deduct points.

Commenting: One aspect of writing clear code involves commenting your code so that it is clear what it does without reading it line by line (nothing is more boring). Comments should be used: (a) at the top of each file to tell what code it contains, (b) at the top of each function to tell what it does, (c) on any lines whose purpose is nonobvious.

Coding simply: Although C and C++ allow it, there is no benefit to writing overly complicated statements such as:

    if ((i = myfunc(counter++)) < num_iterations) {
       ...
    }
when they could easily be rewritten in a clearer manner:
    i = myfunc(counter);
    counter++;
    if (i < num_iterations) {
      ...
    }
Coding should not be a macho activity. It should be like writing English sentences that you truly want someone to understand (including yourself).

Working Individually vs. with Partners: All of the programming assignments this quarter will be designed so that you can complete them individually. If you choose to work on a programming assignment individually, you may collaborate during the brainstorming stage as described on the course syllabus. Obviously, the actual coding must be done independently.

However, if it is your preference, you are welcome to work with a partner for any or all of the programming assignments. Ideally, I view this as a way for two people who aren't as confident with their programming skills to tackle the assignment together in order to deal with bugs in their code or problems with MSVC++. I've often found that two heads can often be better than one in these situations. My expectation is that both people will work on the program together rather than dividing the program into two halves and trying to sew the parts together the day before the project is due. For those of you who decide to work with partners, here is what I expect of you:

I firmly believe that there is great value in programming in pairs -- it's amazing what two pairs of eyes can catch that one would've missed. The above rules are obviously set up to make sure that both people learn from the assignment and understand its point without one completely carrying the other. If you have any questions or problems with these policies, let me know or simply work by yourself.

Turn-in procedures:

For each programming assignment, there will be both an electronic turnin (so that we can compile and run your program) and a hardcopy turnin (so that we can scribble comments and grades on your code). Both of these will be due by the beginning of lecture or considered late. People working as partners should also turn in their private statements of who did what.

Electronic turnin: The electronic turnin will consist of mailing your code to c373@ms.washington.edu. Note that this is not the normal class mailing list, but a staff account on the MSCC UNIX machines. In your mail, you should: Hardcopy turnin: The hardcopy should be a stack of paper that includes: