---
title: Eboard 09  Tables and compound data
number: 9
section: eboards
held: 2017-09-13
---
CSC 151.01, Class 09:  Tables and compound data
===============================================

_Overview_

* Preliminaries
    * Notes and news
    * Upcoming work
    * Extra credit
    * Questions
* Lab
* Debrief

### News / Etc.

* I will distribute answer keys for homework 3 on Thursday night.  (Some of
  you asked for extensions until then.)
* I do not yet have my grading system up and running.  When I do, I will
  distribute grades.  Until then, I cannot.
* There's a lot in today's lab, so I'll try not to do too many preliminaries.
    * Well, we will discuss the exam.
* I should have a draft code of conduct for Friday's class.

### Upcoming Work

* [Writeup for class 8](../writeups/writeup08) due TONIGHT at 10:30 p.m.
    * To: <csc151-01-grader@grinnell.edu>
* [Writeup for class 9](../writeups/writeup09) due Friday at 10:30 p.m.
    * Exercise: 4
    * To: <csc151-01-grader@grinnell.edu>
    * Subject: CSC 151.01 Writeup 9 (YOUR NAMES)
* Read: [Reading data from files](../readings/reading-data-from-files) for 
  Friday's class. 
* Quiz Friday
    * Documentation
    * Testing
    * Tables
* [Flash cards for week 3](../flashcards/flashcards03) due TONIGHT
  at 8 p.m.  
    * To: <csc-151-01-grader@grinnell.edu>
    * Subject: CSC 151.01 Flash Cards Week 3 (YOUR NAME)
* Exam 1 distributed
    * Prologue due Friday night
    * Exam due Tuesday night
    * Epilogue due Wednesday night

### Extra credit (Academic)

* CS Extras, Thursday at 4:15 p.m. in 3821: Caldron: A UI for CRNs.

### Extra credit (Peer)

* Elelphantitis, Saturday, Grinnell Middle School 
* Men's Soccer vs. Buena Vista, Sept. 17 at 2:00 p.m.

### Extra Credit (Misc)

_None at the moment._

### Other Good Things

* Women in Computing, TONIGHT at 7:00 p.m. in the CS commons.

### Questions

_There were none._

Lab
---

Wow, that's a lot of data
  : Just wait until Friday's class!

Please explain "There are 42,767 lines in?"
  : Whoops.  Fixing that now.

Should our code be readable?
  : When possible.  
  : The `(lambda (params)` should be on a line by themselves

I want to experiment with a single city.  How should I do that?
  : `(define single-city (car one-two-three))`

Do you have hints on rearranging an entry?
  : Make a list of the city and state elements using `take` and `drop`
  : Make a list of the first three elements using `take`
  : Make a list of the last element (county) using `drop`
  : Append them together

How do I get `caddddr`
  : Lots of ways
  : `(define caddddr (section list-ref <> 4))`
  : `(define caddddr (o car cddddr))`
  : `(define caddddr (o car cdr cdr cdr cdr))`

Remember! Work on individual entries first and then map onto the list
(or sort or ...)
  : Ok.

Debrief
-------

_Sam will do the debrief at the beginning of next class._

Writeup

* Exercise 4

Thinking

* Look back to examples from the reading and try to understand what
  they were doing.
* Don't let the big list distract you.  For many things, you'll focus
  on one value (or two) and then use `map` or `sort` or `reduce` to
  work with the larger list.

Formatting

```
(define zf->cf (lambda (entry) (append (take (drop entry 3) 3) (take entry 2) (drop entry 5))))
```

vs.

```
(define zf->cf
  (lambda (entry)
    (append (take (drop entry 3) 2)
            (take entry 3)
            (drop entry 5))))
```

Documentation

* Please use three semicolons, not one.
* Please put a space after the three semicolons.
