reset password
Author Message
rabbott
Posts: 1649
Posted 14:32 Sep 13, 2016 |

When I review your work I expect you to understand and explain the code at the following levels.

  1. What the overall code does. That is, given the project and it's overall goals what strategy does the code use -- explained on an intuitive level -- to achieve those goals. You should be able to explain, again on an intuitive level, how each function contributes to that strategy. For example, for project 2 the goal is to find all numbers less than 6000 that do not satisfy Goldbach's second conjecture. (You should be able to explain what Goldbach's second conjecture requires of a number.) You should be able to say that the overall strategy is to use a function (goldbachPairs) to find for each number g the pairs (p, k) that satisfy the conjecture. The main function then uses the goldbachPairs function to find numbers for which there are no (p, k) pairs that satisfy the conjecture. Any such number does not satisfy the conjecture.  The function goldbachFails lists all those numbers.
  2. For each function:
    1. What that function computes.
    2. What strategy it uses to do the computation.
    3. How the code implements that strategy.

For example, for goldbachPairs you should be able to say that for argument g it computes the list of (p, k) pairs such that p is prime and g = p + 2 * k ^2.

You should be able to say that it's strategy is to enumerate possible values of k and for each to compute what p would be, i.e., p = g - 2 * k ^ 2. If p is prime, (p, k) is one of the pairs. 

You should then be able to explain step by step by discussing to the code (and this is the first time you will be talking about the code directly) how the code implements the strategy just discussed.

Of course, you should also be able to answer other questions the project asks. 

 

When you are reviewing someone else's code, be sure the person you are reviewing understands the code at this level.

If the person being reviewed needs help in understanding, please offer whatever help you can. It's fine to be a tutor.

However, once you serve as tutor, do not be the reviewer. To be sure the person you helped really understands, someone else should be the reviewer.

==============================

If you haven't looked at this forum post, you should. I helps you understand how list comprehension works. 

 

Last edited by rabbott at 19:05 Sep 13, 2016.