CSC151.02 2016S, Class 12: Testing Your Procedures
==================================================

* Continue partners!  
* Grab a reading on Pair Programming.
* Candy!

_Overview_

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

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

### Admin

* We will finish today's lab on Monday.
* Virtual machine is ready.
* Friday PSA.

### Reminders

* Office hours: MTWF 10-11, Tu 1-2.
    * Sign up at <http://rebelsky.youcanbook.me>.
    * Also feel free to stop by when my door is open.
    * Or to email me for an appointment.
* 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 at 10am in this room with SamR!
    * Thursday at 8pm in the CS Commons with ...

### Upcoming Work:

* Readings for Monday:
    * "How Pair Programming Really Works", available at
       <http://www.computer.org/cms/Computer.org/ComputingNow/homepage/2010/0110/W_SW_PairProgramming.pdf>.
* [Exam 1](../assignments/exam.01.html) 
    * [Prologue](http://bit.ly/151-2016S-exam1pro) due TONIGHT
    * Exam due Tuesday at 10:30 p.m.
    * [Epilogue](http://bit.ly/151-2016S-exam1epi) due Tuesday at 11:00 p.m.
    * Cover sheet due Wednesday at the start of class.
* Lab Writeup: Exercise 3ab
    * Send email titled __CSC 151 Lab Writeup 12 (Your Names)__
    * Do not include the underscores.
    * Send to <CSC151-02-grader@grinnell.edu>
    * Due before class on Tuesday.

### Extra Credit

* Send your reports to <rebelsky@grinnell.edu> with subject 
  "CSC 151 Extra Credit".
* Send opportunities to me before class with subject
  "CSC 151 EXTRA CREDIT OPPORTUNITY!"

#### Academic

* This week's Rosenfield Symposium on Campaign Finance.
* This week's Carnival and Creativity series.
* Convocation next week: Hilary Mason '00 on Data Science and Social Good.
  (11 a.m., Thursday, JRC 101)
* CS Extras next week: Hilary Mason on Fast Forward Labs.
  (4:30 p.m., Thursday, Science 3821)

#### Peer

* Track and Field February 13. 
* Shanghai Express Saturday at 4:30 p.m. in JRC 101.

#### Regular Peer

* Social Dance Workshop Tuesdays 7:00-8:00 in Bucksbaum Dance Studio
  (Dance with Salsa Jenny)
* Pun club Saturdays at 4pm in Younker (max 2)
* Electronic Potpourri on KDIC Fridays at Five (TONIGHT)
* Space Odyssey KDIC Fridays at Six (TONIGHT)

### No Extra Credit, But Still Good

* High School Large Group Speech Presentations Saturday at 6:30 p.m. 
  at the high-school auditorium.  Sam will reimburse you for the $5 entry
  fee (or give it to you in advance).

### Questions

_How many errors have my peers discovered?_

> Three.   Two found by students in my section.  One by a student in
  Charlie's section.  All of the errors are my fault.

_Should I type my responses to the prologue in a Google doc and then
 copy and paste into the form so that I still have a record?_

> Yes.

> But Sam will send it to you if you ask.

_How much detail do I have to include in the prologue?_

> The more detail you include, the better it is for you.  

> Preferred: "This is similar to the first problem on homework 3, except 
  that I want to substitute something else for the components."

> Preferred: "Use sectioning with the `irgb-add` procedure and
  the `irgb-subtract` procedure.  Need to figure out how much to
  add and subtract."

> Acceptable: "Review the reading on sectioning."

> Unacceptable: "No idea."

> Unacceptable: "dsafdj;afsdj;adfsj;abasdvjlvsa"

Section
-------

As programmers, we want to write procedures.

Sometimes, we're really lucky, and we have existing procedures that
are pretty close to what we want, but they are too general.

There's this cool procedure, `(expt base power)` raises the base (a
real number, or maybe any number) to the given power (which is a 
real number).

Assume we want to square.  That's `expt`, with the power fixed at 2.

We write

        (define square (section expt <> 2))

Now

        (square 5)


We can have multiple diamonds in the same section

        (define reddish (section irgb 255 <> <>))

The diamonds can refer to any type.

        (define redder (section irgb-add <> (irgb 64 0 0)))


Exam Questions
--------------

_Do we need to document the color palette procedure?_

> No.

_What's the cover sheet?_

> A piece of paper with the requisite info.

_Won't the citations reveal too much info?_

Quiz
----

When you are done with the quiz, please turn your quiz over and 
either sit quietly or play quietly on an electronic device until
your partner is done.

When your partner is done, please start the lab.

Lab
---

Start the lab.  We will finish on Monday.

Writeup (for Tuesday): 3 a and b.
