CSC151.02 2015S, Class 09: Side Effects: Images, Output, and More
=================================================================

* New partners!

_Overview_

* Preliminaries.
    * Admin.
    * Upcoming Work.
    * Extra Credit.
    * Questions.
* Quick Comments from Sam.
* Lab.
* Possible Debriefing.

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

### Admin

* We've seen more DrRacket crashes this semester than in the past few years
  combined.  And we're not sure why.
    * Save regularly!
    * Save a backup!

### Upcoming Work

* [Assignment 3](../assignments/assignment.03.html).
    * Due TONIGHT at 10:30 p.m.
    * Don't forget the prologue and epilogue!
* Exam 1 to be distributed tomorrow
* Lab writeup for lab 9 (today), exercise 3a: 
  <http://bit.ly/151-2015S-lab09>
* Readings for Wednesday:
    * [Testing Your Procedures](../readings/rackunit-drawings-reading.html)

### Extra Credit Opportunities

#### Academic 

* Wednesday, February 4, 12:00 noon, JRC 101, Scholars' Convication:
  "The Fight for Economic Justice from the Streets of Chicago" by 
  Virginia Parks.
* Any other event in this Rosenfield symposium.
* Thursday extra this week.
* Friday, February 6, 12:00 noon, Science 3821, CS Table, Summer Research
  Opportunities for CS Students
* TEDx Grinnell, sometime in February.

#### Peer Support (Afternoon Section)

* Track and Field, Saturday at 10 a.m., the Bear Fieldhouse
* Men's Basketball, Saturday at 3:00 p.m., New Darby
* Swimming, Conference Championships, February 13-15, The Osgood

### Recommended Events (no EC unless mentioned above)

* #OneGrinnell, Wednesday, February 4 at 4:15 p.m.

### Questions

_What do you do when DrRacket corrupts our files?_

> I deal with it on a case-by-case basis.  

_If we give advance notice of our birthday, can we have a party in class?_

> I will bring snacks and we'll sing a song, but that's about it.

_How do we get the square inside the circle?_

> Two approaches.  

> Draw the square and the circle centered at (0,0).  Circle has diameter
  `size`.  Square has diameter `(/ size (sqrt 2))`.  Shift to the correct
  position.

> Draw a square of the correct size using `square-thing`.  It can be
  anywhere.  Draw the correct circular hole using `circle-thing`.  Use
  `center-peg` to move the square.

Quick Overview
--------------

* Official topic from yesterday: Documentation
* Really important concept from yesterday: Think about procedures as
  taking input values, returning new values, and *not changing their
  inputs*.
* We break that concept today.  We will look at procedures that change
  their parameters or the world around them.
* Two competing models of computation.
* Meta-thinking: Which works better, and in which circumstance.

Lab
---

* Reminder: 3a writeup


Debrief?
--------

* DrRacket and GIMP both refer to images by numbers.  
* If you close all of the windows associated with an image, GIMP forgets
  about it, and you get weird error messages.
* DrRacket is even more careful about things than Sam when making a
  sandwich.  Subtle differences lead to huge errors.
  E.g., `(image-save 23 "/home/rebelsky/desktop/modified.jpg")`
