CSC151.01 2014F, Class 21: Naming Local Values
==============================================

_Overview_

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

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

### Admin

* New partners! 
* Office hours 
    * Today 2:15-3:15 
    * Next week back to normal (MThF 1:45-3:15; walking 1:15-1:45) 
      plus 8:00-9:45 most days.
* Note: The labs assume that you've done (or at least thought about) the
  self checks.
* It's Friday.  I hope you have a chance to relax and recover this weekend.  
  As always, please think in advance about what is right for you.  If you
  choose to partake, please do so in moderation.  If you do activities
  with other people, please make sure that they have decided that the
  activity is right for them.

### Upcoming Work

* Writeup on today's lab due Monday: 6d and 7b.  
    * Link to be fixed online during quiz.  Sorry.
* [HW 5](../assignments/assignment.05.html) due Tuesday.
* Exam 2 will be distributed on Wednesday.
* Reading for Monday:
    * [Building Images by Iterating Over Positions](../readings/iterate-positions-reading.html)
    * One of Sam's favorite parts of the course.

### Extra Credit Opportunities

#### Academic

* CS table TODAY: Serendipity and Computing (with Grinnell's Artist 
  in Residence)
* Grinnell Prize events next week (particularly events related
  to the prize winners whose project involves Web tools)

#### Peer Support

* Football (???)
* Men's Tennis (???)
* Women's Tennis (???)
* Swimming (???)
* Karan's radio show 11pm Thursday nights on KDIC
* Evan's radio show 5pm Friday nights on KDIC
* Donna's radio show Sunday midnight on KDIC
* Anna Christie, Oct. 9-12 (SB plays Marthy)

Quiz
----

* One sheet of notes.
* Unlimited time (although I'll tell you when we hit ten minutes).
* Start the lab when you finish the quiz.
    * Review the end-of-reading exercises while waiting for your
      partner to finish.
* Whoops. A too-long quiz.  Sorry.  But the questions should help
  you think.

*Here are the problems, just in case you want to look at them later.*

Q1.

    > (map ___ (iota 12))
    (1 1/2 1/3 1/4 1/5 1 1/2 1/3 1/4 1/5 1 1/2)

Q2.

    (define image-stuff!
      (lambda (image x y)
        (context-set-fgcolor! "black")
        (if (< x (* 1/2 (image-width image)))
            (if (< y (* 1/2 (image-height image)))
                (image-select-rectangle! image REPLACE x y 10 10)
                (image-select-rectangle! image REPLACE x y 10 20))
            (if (< y (* 1/2 (image-height image)))
                (image-select-rectangle! image REPLACE x y 20 10)
                (image-select-rectangle! image REPLACE x y 20 20)))
        (image-fill! image)
        (image-select-nothing! image)))

Lab
---

_Why would anyone ever redefine `rgb-redder` in this idiotic way?_

> They wouldn't.  However, you will find that there are times that
  people accidentally redefine a procedure that you are counting on
  and that breaks your procedure.  This exercise is intended to help
  you think about how you might ameliorate such issues.

> No, you don't generally have to code this way.  The point is that
  you *can* code this way.

> Sam also has the "who will sue me because my code doesn't do what
  I claim" voice in the back of his head.

_Can you tell us what's going on in problems 5 and 6?_

> Yes, but not until Monday, after you think about it a bit.
