CSC151.02 2016S, Class 46: Analyzing Procedures
===============================================

_Overview_

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

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

### Admin

* New partners!
* I will continue to bring you food (or food-like substances) until I am 
  caught up on grading.  
    * Today: Cookies!
* Reminder: 161 is an awesome course.  
    * I'm sorry that you have not gotten enough feedback on whether
      you've been doing well.  I think most of you can tell.
    * Talk to me if you'd like my feedback on whether I think you're ready.
* I should have comments on proposals by Friday.

### Reminders

* Office hours this week 
    * See http://rebelsky.youcanbook.me.
    * Ask me about other available times.
* Tutor hours
    * Sunday, 3-5 p.m.
    * Sunday-Thursday, 7-10 p.m.
* Review Sessions
    * Wednesday at 8pm in CS commons with Sarah
    * Thursday at 10 am with SamR 
    * Thursday at 8pm in CS commons with Kumar

### Upcoming Work:

* Reading for Wednesday:
  [Association Lists](../readings/association-lists.html)
* Lab Writeup: Assorted questions (see end of eboard)
    * Send email titled __CSC 151 Lab Writeup 46 (Your Names)__
    * Do not include the underscores.
    * Send to <CSC151-02-grader@grinnell.edu>
    * Due before class on Friday.
* Projects due NEXT TUESDAY.
* Quiz 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

* Open Listening Session, Tuesday, April 26, 6:00 p.m. - 7:00 pm, JRC 209
* Scholars' Convocation: Dutch Global Horizons, Thursday, April 28, 11 am, JRC 101
* Damon Williams: Bigger Than The Cops, April 28, 4pm or 5:15 pm

#### Peer

* Maybe GMon, Thursday, 7:30 in Loose Lounge.
* Rushdie's East/West, May 6/7 at 7:30 p.m.

#### Regular Peer 

* Social Dance Workshop Tuesdays 7:00-8:00 in Bucksbaum Dance Studio
* Post-break ExCo on British Politics Wednesdays at 8:00 in JRC 203.  
  Just show up; you don't need to sign up.
* Pun club Saturdays at 4pm in Younker 
* Electronic Potpourri on KDIC Fridays at Five 
* Space Odyssey KDIC Fridays at Six
* Bollywood, Fridays, 7:30-8:30, Younker
* Effective Altruism club, 2:30-3:30 Sundays in JRC 226.

#### Misc

### Not for Extra Credit

* Third year students, design a logo or something for a vinyl sticker.  
  Gift card to PC!

### Questions

_Should we write separate helper procedures on the project?_

> Please!  It makes it easier for me to read.  It makes it easier for
  you to experiment.

_How upset will you be if we write a cond with 999 different options?_

> I'll be sad rather than mad.

_How can I break an integer into a list?_

> One somewhat silly way

        (map (r-s - (char->integer #\0)) (map char->integer (string->list (number->string num))))

> But math is your friend

        (list (quotient num 100) (quotient (remainder num 100) 10) (remainder num 10))

_What if I want all sorts of numbers?_

        (list (remainder num 5) (remainder num 7) (remainder num 11)
              (remainder num 13))

Lab
---

The lab makes much more sense if you've done the reading.

For `list-reverse-2`, make sure that you count calls to the `kernel` proc.

Remember!  When you are counting calls to `cons` and company, you'll need
to count the calls within `append`.

Writeup: 

* How many calls to `cons` do you expect when you use 
  `list-reverse-1` to reverse a list of N values?  
  (You should give a formula in terms of N.)
* How many calls to `cons` do you expect when you use
  `list-reverse-2` to reverse a list of N values?
  (You should give a formula in terms of N.)
* What do you take as the primary "morals" of this lab?
