---
title: Eboard 19  Debugging
number: 19
section: eboards
held: 2019-03-08
link: true
---
CSC 151 2019S, Class 19:  Debugging
===================================

_Overview_

* Preliminaries
    * Notes and news
    * Upcoming work
    * Extra credit
    * Friday PSA
    * Questions
* Quiz
* Lab

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

### News / Etc.

* Mentor sessions Wednesday 8-9 p.m., Thursday 8-9 p.m., Sunday 5-6 p.m.
* In case it wasn't clear, you are *not* responsible for the second lab
  from Wednesday's class.
* Reminder: We lose an hour on Sunday morning. 
* Grinnell's admissions database was hacked
    * <https://www.reddit.com/r/ApplyingToCollege/comments/aybu9i/alert_grinnell_college_hacked/>
    * Do we think that the Grinnell admissions data breach is due to a
      technical hack or a social hack?
    * Do we think that the Grinnell admissions breach is the first step
      in a more complicated chain?

### Upcoming work

* *No* reading for Monday.
* [Exam 2](../exams/exam02) due Tuesday.
    * Prologue due **Tonight**
    * **Do not discuss the exam.**
* No flashcards next week!
* [Lab writeup](../labs/writeup19) due before class Monday
    * Exercises: 4 and 5
    * Subject: CSC 151.01 Writeup for Class 19 (YOUR NAMES) 
    * To: csc151-01-grader@grinnell.edu
    * Contents: A one-paragraph summary of your discussions.
    * _You can skip exercise 3._
    * It's ok if you only discuss exercise 4.
* Quiz next Friday: Match first names and faces.  Those with multiple
  names will likely see both names appear.

### Extra Credit

_I would certainly appreciate suggestions of other extra credit activities
(preferably via email)._

#### Extra credit (Academic/Artistic)

* CS Table, Tuesday, noon: Unknown topic
* Euphor workshop, 1 p.m. Saturday, March 9, Bucksbaum
* Euphor performance 7:30 p.m. Saturday, March 9, Herrick

#### Extra credit (Peer)

* Grinnell Singers, Sunday at 2pm. 
* Twelfth Night this weekend
* Mock Trial, Geneva, Illinois, tonight and tomorrow

#### Extra credit (Wellness)

#### Extra credit (Wellness, Regular)

* 30 Minutes of Mindfulness at SHACS every Monday 4:15-4:45
* Any organized exercise.  (See previous eboards for a list.)
* 60 minutes of some solitary self-care activities that are unrelated to
  academics or work.  Your email reflection must explain how the activity
  contributed to your wellness.
* 60 minutes of some shared self-care activity with friends. Your email
  reflection must explain how the activity contributed to your wellness.

#### Extra credit (Misc)

### Other good things 

* Rosencrantz and Guildenstern are Dead (or at least misspelled),
  Friday and Saturday at GHS.
* Men's Tennis Saturday at 9am.
* Class of 2022 talent show.

### Friday PSA

* I care about you.  Take care of yourselves, including limiting your
  time on my exam.
* Consent is essential.

### Questions

_I forgot to log some of my time on the exam.  What should I do?_

> Put in an approximate log.

        ; Time Log:
        ;   Date        Start   Finish  Elapsed Activity
        ;   2019-03-07  ~3:00   ~3:30   ~30min  Woke up, typed code, went back to sleep (approx)

_I think I can reuse a solution from a lab or homework assignment on this exam.  Is that okay?_

> Sure, as long as you cite.  E.g., "Lab from 03/06, completed by student 823412 and partner" or "Problem 2 on HW 5, completed by student 123152 and partner."

_Should there be a time log for the prologue?_

> Yes.

        ;; +----------+-------------------------------------------------------
        ;; | Prologue |
        ;; +----------+

        ; Time Log:
        ;   Date        Start   Finish  Elapsed Activity

_On problem 3, what do you mean by "simplify any unnecessarily complicated code"?_

> There's a *lot* of useless code in the procedure.  Get rid of it.

_What's the `pair` in problem 3?_

> It wasn't supposed to be there.  It now reads `hash`.  (It was
  correct in the starter code.)

_Did we get extra credit for any of the above errors?_

> Yes.

_Can we put in insane restrictions in the preconditions, such as "all fieldsd must contain strings and those strings can only contain the letter a"?_

> No

> But you can say "no quotation marks, no backslashes"

> You must allow commas and colons.

> You will not lose points for disallowing quotation marks and backslashes.

_Why doesn't SHACS have mental health appointments?_

> I don't know, but you should be able to use telecounseling.

> And, although it is not my responsibility, I express regret that the
  College is not able to provide sufficient face-to-face counseling
  resources, particularly during midsems and data breaches.

_How would you social engineer an attack on our password system?_

> Develop a resource that people would want to use.

> Set up an account creation system that requires "security" questions
  similar to those on PasswordReset.

> Send an announcement to everyone in some group (e.g., admissions).

> Alternately, set up one of those "learn about yourself" (e.g., "What
  kind of animal are you?") quizzes and ask things similar to the security 
  questions.

_How does sort work?_

> You don't need to know *how*, but you need to know *what*.

> Sort takes two parameters, a list and a "less than operation",
  and rearranges the list so that each element is less than the
  next element.

> Your goal on problem 5 is to come up with the appropriate
  "less than operation" (binary predicate) that tells sort when
  to swap.

Quiz
----

Lab
---

It should be loads of fun, or at least loads of confusion.

Yes, the code for `average-w/o-extremes` is incorrect.  It is
*intentionally* incorrect.  Our goal in this lab is to see how we can
track down bugs using the debugger.  The debugger will be very important
starting next Wednesday.

`filter-range` is so strange because, in an earlier iteration of CSC 151,
we had students write it before they learned `filter`, but after they
learned `sort`, `take`, and `drop`.  (We like to challenge students to
do things with limited tools; you've probably figured that out.)

