CSC151.01 2015S, Class 32: Naming Local Procedures
==================================================

* New Partners!

_Overview_

* Preliminaries.
    * Admin.
    * Upcoming Work.
    * Extra Credit.
    * Quick notes on exam 2.
    * Questions.
* Lab.
* Debrief.

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

### Admin

* Welcome back!  I hope that your breaks were spectacular.
* Quizzes 6-8 returned.  More graded work coming soon.

### Upcoming Work

* Lab Writeup: Problem 4.
  <http://bit.ly/151-2015S-lab32>
* Reading for Tuesday: 
    * [Turtle Graphics](../readings/turtle-graphics-reading.html)

### Extra Credit Opportunities

#### Academic 

* Wednesday, April 1 Scholars Convocation on Implicit Bias.
* CS Table Friday: Therac 25 (readings coming soon)

#### Peer Support (Afternoon Section)

* 7:30 p.m. on April 2: Gender as a Process.  EE talks afterwards
  about using mathy things to understand gender.
* Lunch with EE and other less accomplished people Friday at noon.
  Email Damian Kelty-Stephen to reserve a slot.

#### Miscellaneous

* Offer input on the expanded Humanities and Social Science complex
  ARH 102 at 7:30 tonight.
* Wednesday evening discussion.  (Terrifyingly enough, I get to facilitate
  one of the discussions.)

### Other Good Things

* Donate to Grinnell tomorrow.
* Contribute to the IGNITE curriculum.  Hang with cool people (plus
  middle schoolers) and get a free lunch; all you have to do is
  design a two-hour course to teach culture, language, and difference.

### Notes on Exam 2

* Exam 2 is graded but will not be returned until Wednesday because a few
  people have extensions until Tuesday night.
* Academic honesty issue 1: *Many students were careless in citing code 
  from readings/labs/homework.*
    * You are expected to cite anything that's not the exam.
    * The College does expect me to report failure to cite to the
      Committee on Academic Standing.  Neither you nor I want that to
      happen.
    * If you neglected to cite because of misunderstanding of polices,
      please get citations to me by 5pm today.
* Academic honesty issue 2: *I received reports of students collaborating
  on the exam.*
    * "I saw some of your students talking about the exam."
    * "I heard the following conversation: 'How do you make the
      code faster?'  'Use a `let`.'"  (Conversation simulated.)
    * "I don't feel comfortable signing the second statement."
    * Let's treat this in an exercise in self governance.  I'll work with
      both classes on deciding what to do.  But you need some time to reflect,
      so at the start of class on Tuesday, we will discuss how I might handle 
      this issue.

### Questions

Lab
---

_Given that the computation of brightness is 0.3*red + 0.59*green + 0.11*blue,
why is red the brightest color?_

    > (irgb->string (color->irgb "red"))
    "255/0/0"
    > (irgb->string (color->irgb "green"))
    "0/128/0"
    > (irgb->string (color->irgb "blue"))
    "0/0/255"

_What should our solution to problem 2 look like?_

    (define irgb-brightest
      (letrec ([kernel (lambda (brightest-so-far remaining)
                         ...)])
        (lambda (colors)
          (cond
            [(null? colors)
             (error "irgb-brightness requires a non-empty list")]
            [(not (list? colors))
             (error "irgb-brightest expects a list, received" colors)]
            ...
            [else
             (kernel (car colors) (cdr colors))]))))

_How do we check whether every element of a list is an irgb color?_

> Refer back to quiz 8.

> Refer back to recursion with Booleans.

        (define all-____?
          (lambda (lst)
            (or (null? lst)
                (and (____? (car lst))
                     (all-____? (cdr lst))))))


> `(all irgb? colors)`

Debrief
-------
Debrief
-------
