G107 F '08
General
Syllabus
Assignments
Presentations
Ofc Hrs
Communication
Blog
Texts
FAQ
DrScheme

Presentations

For your lectures, focus on the high-level parts of the assigned material. Illustrate it with illustrative examples of your own choice. The examples will demonstrate how well you have understood the material and how well you can explain it to others.


The homework presentations have the following general structure. The two partners must show up together at the schedule time. For each partner, the TAs will randomly choose a solution for a required problem and open it with DrScheme:

  1. A solution that runs and achieves 100% syntactic test coverage gets 10% of the weekly score.
  2. Once the TAs have established whether the solution is executable and how much of the code is covered by your test cases, you will present the solution using the appropriate design recipe. The TAs will receive a scoring sheet that explains how to use the structure of the recipe to assign partial credit. This part of the meeting accounts for 80% of the weekly score.
  3. The remaining 10% of the weekly score are "partner points." If one of the two partners is not able to score a minimum of 30% of the total score (one third of the above), his or her partner will not get the remaining 10%.

    Just like in the real world, you are carrying some responsibility for your assigned partner (or employee). For a company to function, everyone -- including the weakest -- must perform at some reasonable level. It is your task to help meet this criteria.


During our first meeting, two TAs presented the solution for the 'reveal' problem from HtDP (page 78). Their solution contained far more comments than we expect from you for your solutions. In particular, there is no need to include the templates in the solution files. An ideal student solution is appended below.

While their presentation was excellent and insightful for your current status, the TA's code suffered from two flaws:

  1. The ordering of the functions was inappropriate. Functions and their examples should not be separated by auxiliary definitions. See for a fix below. (-2pt)
  2. The contract of one of the auxiliary function was wrong, as discussed in class (-1pt).
Given that I would assign a problem like this one a score of 8 plus 1 for a perfect run and 1 for complete understanding by both partners, their overall score would have been 7 out of 10.


;; -----------------------------------------------------------------------------
(define-struct word (a b c))
;; Word = (make-word Letter Letter Letter)
;; Letter is one of: 'a ... 'z '_

;; -----------------------------------------------------------------------------
;; Word Word Letter -> Word 
;; does the guess occur anywhere in the guess word? reveal via new status word

(check-expect (reveal (make-word 'c 'a 't) (make-word '_ 'a '_) 'c) 
              (make-word 'c 'a '_))

(check-expect (reveal (make-word 'c 'a 't) (make-word '_ 'a '_) 'a) 
              (make-word '_ 'a '_))

(check-expect (reveal (make-word 't 'o 'o) (make-word '_ '_ '_) 'o)
              (make-word '_ 'o 'o))

(define (reveal chosen status guess)
  (make-word
   (compare (word-a chosen) (word-a status) guess)
   (compare (word-b chosen) (word-b status) guess)
   (compare (word-c chosen) (word-c status) guess)))

;; -----------------------------------------------------------------------------
;; Letter Letter Letter -> Letter 
;; if chosen letter is guess letter, produce it; otherwise chosen 

(check-expect (compare 'a 'a 'c) 'a)
(check-expect (compare 'c '_ 'c) 'c)
(check-expect (compare 'c '_ 'd) '_)

(define (compare chosen status guess)
  (cond
    [(symbol=? chosen guess) guess]
    [else status]))

last updated on Tue Jun 9 22:21:18 EDT 2009generated with PLT Scheme