CS 257
Tiny exam
Due 8:30AM Wednesday, May 21, 2003

This is an open-book, open-Internet exam. Don't talk to people other than Jeff Ondich about this exam. If you get ideas from web sites or books (I'm asking for arguments and opinions in some cases, and you may find yourself seeking ideas on the web), provide thorough citations.

  1. (5 points) Summarize the arguments for and against comments. Be clear and concise. Include two brief examples of situations where you consider comments essential, and two brief examples of bad comments.

  2. (5 points) Summarize the arguments in favor of assertions. In what situations are they obviously valuable? What, if any, dangers does their use pose? Summarize the arguments for and against leaving assertions turned on in shipping code.

  3. (8 points) Six months after graduating in 1998, one of our CS majors who went off to become a programmer wrote to me raving about a paper that I needed to read and then start teaching to my students. The paper, "Hungarian Notation" by Charles Simonyi of Microsoft, describes Simonyi's naming system for identifiers (variables and constants, in particular). I'm having trouble finding an original citation (or title, for that matter), but there are copies of the paper at Microsoft and elsewhere.

    Read Simonyi's paper, and then answer the following questions.

  4. (2 points) Tell me a joke, or recommend a book or movie. I promise to laugh, read, or watch. Really.

  5. (10 points) Design patterns.