CSC151.02 2016S, Class 26: Recursion Basics, Continued
======================================================

* Continue partners!

_Overview_

* Preliminaries.
    * Admin.
    * Upcoming Work.
    * Extra Credit.
    * Questions.
* Lab.

Preliminaries
-------------

### Admin

* Please remind me when I have not posted the eboard.
* We'll spend some time today on exam questions.

### Reminders

* Office hours this week 
    * See http://rebelsky.youcanbook.me.
    * I'm working on adding more.
    * I'll soon respond to requests for special times.
    * I should be gone next Monday and Tuesday :-(
* Tutor hours
    * Sunday, 3-5 p.m.
    * Sunday-Thursday, 7-10 p.m.
* Weekly review sessions:
    * Wednesday at 8pm in the CS Commons with 
    * Thursday review session this week with Sam.
    * Thursday at 8pm in the CS Commons with 

### Upcoming Work:

* Reading for Wednesday
    * [Verifying Preconditions](../readings/preconditions-reading.html)
* Exam 2 due NEXT TUESDAY.
* Quiz Friday: Recursion basics.
* Lab Writeup: Exercise _____
    * Send email titled __CSC 151 Lab Writeup 26 (Your Names)__
    * Do not include the underscores.
    * Send to <CSC151-02-grader@grinnell.edu>
    * Due before class on Friday.

### Extra Credit

* Send your reports to <rebelsky@grinnell.edu> with subject 
  "CSC 151 Extra Credit".  (Do not include the quotation marks.)
* Send opportunities to me before class with subject
  "CSC 151 EXTRA CREDIT OPPORTUNITY!"

#### Academic / Artistic

* TONIGHT at 7:30 p.m. in Herick: Six Appeal
* Friday at 4:00 pm. in Burling: Decolonizing Digital Humanities

#### Peer

* 4:00 p.m. TODAY, ISO Travel Fair.
* The Tempest.  This weekend.  7:30 Friday and Saturday, 2:00 Sunday.
  Tickets in Bucksbaum box office.
* Salseros Friday at 8:30 pm in Garnder.  Food!  The JS non-brothers,
  sighing deeply.
* 8:00-10:00 show with various cool jazz-funk folk.  No free food.
* Sunday, 6:00-8:00 AAA Potluck in JRC 209.  Free ingredients!

#### Regular Peer

* Social Dance Workshop Tuesdays 7:00-8:00 in Bucksbaum Dance Studio
* Pun club Saturdays at 4pm in Younker 
* Electronic Potpourri on KDIC Fridays at Five 
* Space Odyssey KDIC Fridays at Six

#### Misc

#### Far in the Future

* Lords of the Flies, April.

### No Extra Credit, But Still Good

* Indoor track nationals.

### Questions

_How do we do a blue blend?  (We want to do something similar on the
 exam, so I thought I should ask.)_

> Suppose we have an image of a specified width, and we want to know
  how far along, a point (x,y) is.  What do we do?  Divide by the
  width, or the width-1.

> If you are p of the way along, and the blue component ranges from
  0 to b, use p*b to compute the blue component.

<pre class="programlisting">
(define horiz-blue-blend
  (lambda (width height initial final)
    (image-compute (lambda (x y)
                     (irgb 0 0 (+ initial
                                  (* (- final initial) (/ x (- width 1))))))
                   width
                   height)))

(define horiz-green-blend
  (lambda (width height initial final)
    (image-compute (lambda (x y)
                     (irgb 0 
                           (+ initial
                              (* (- final initial) (/ x (- width 1))))
                           0))
                   width
                   height)))
</pre>

> Works dark-to-light and light-to-dark.

_For Problem 2, Can we use supplied code?_

> Yes

_For problem 2, mine looks kinda like a cat, but not as good as yours._

> As long as it makes reasonable sense, it's fine.

> Sam used something like `(let ([p1 (+ 1 (- (max d1 d2 d3 d4) d1))])`

_Can you really have a distance of 500?_

> No

_About how many different tests should we plan on for problem 4?_

> A dozen or so *distinct* tests.

_Do we have to document supplied procedures?_

> No.  If I take off later, remind me that I said this.

_Even though we've identified approximately 1,289,131 mistakes on the
 exam ..._

> Yes, I will take more corrections.

Lab
---

* No writeup today.
* Yes, we will continue today's lab tomorrow.
* Yes, we will also start the "verifying preconditions" lab tomorrow.
