Written-Homework Guidelines, CSE373 Summer 2017

Written Assignments

For written homework assignments, typed assignments are preferred. Handwritten is also fine, but it is often more difficult to organize your work clearly and legibly so that the TA can give a good grade. Writeups for programming projects must be typed and turned in electronically.

Some problems on the written assignments ask you to give an algorithm to solve a problem. Unless the assignment specifically tells you to implement the code and run it, pseudocode is acceptable. Pseudocode means that you do not write every line in Java with correct syntax, but mostly English explanations of operations. The general rule you should follow is that you can substitute English for any O(1) operation, but not for more complex steps. Thus, the following would not be acceptable:

  scan the list and count all elements greater than x

while the following would be acceptable

 Initialize a counter.
 While the list has more elements:
    Increment the counter if the current element is greater than x.
    Move to the next element of the list.

The idea is that you do not need to give all the nitty-gritty coding details (that is the purpose of the programming assignments), but you should demonstrate a clear understanding of what your algorithm does and where those nitty-gritty details would need to be.

One way you can test the quality of your pseudocode is whether they would work well as comments for code. For that matter, writing pseudocode first, turning it into comments, filling in code below the comments, and removing unecessary comments is one strategy for writing good code!

For the purposes of our homework, when in doubt, more detail is probably better than less detail. Another way of thinking about this is to write your answer in code, but we will not take off points for syntax. A common mistake for students to make is to use a phrase in pseudocode that is too vague without realizing it. In the example above, defining the variable counter helps the grader determine what you are incrementing. A more vague description would be:

  for each element of list, add to a count if it is greater than x

Among other things, the meaning of "it" is not clear.


Valid CSS! Valid XHTML 1.1