EBoard 25: Vectors

Approximate overview

  • Admin
  • Lab

Administrative stuff

Introductory notes

  • Yet again, our projection system is attempting to screw up class.
    • Fixed before class time.
    • But it won’t play the theme song for today’s class by the Eurythmics.
  • Bonus “handouts” today. Feel free to take when entering or leaving.
    • Follow good health protocols.
  • I’ve moved the due date for last night’s MP to Sunday. (Or I will.)
    • The next one moves, too.
  • Today’s autograder is not working correctly. I’m on it.

Today’s obligatory jokes

  • Where is your cane, Sam?
  • Why is Tigger so fat?
  • Aren’t you hot in that costume?

Friday PSA

  • Moderation is important in all that you do/consume (except sleep).
  • Consent is necessary.

Upcoming activities

Events

  • Swim meet Saturday at 1pm
  • Football vs. UofC Saturday at 1pm
  • Any one Grinnell Prize event this weekend. See signs around campus.
  • Mentor Session Sunday at 4pm

Other good things

  • Women’s Volleyball Saturday at 11:00 a.m.
  • Women’s Basketball vs. Alumnae Saturday at 4:00 p.m.
  • Men’s Basketball vs. Alumni Saturday at 6:00 p.m.

Upcoming work

Q&A

Where is Mentor #2?

Running. We wish them luck.

How do we figure out our grade in the class?

Look at the grading criteria, figure out your trajectory.

Will we get credit for the readings if we’re horribly wrong, but we tried?

Yes.

Will we get credit for the labs if we’re horribly wrong, but we tried?

Only if you indicate knowledge of your failure.

“We tried this, this is all we could get, we know it’s wrong, but there’s more to life than CS.”

A little bit wrong should be fine.

Lab

Preparation

  • Make sure that you have the correct lab page.
  • Person closest to the screen is A. Other person is B.
  • Make sure to have the pre-class discussion.
  • Review the procedures in the lab, too.

Notes during class

What are good numbers for problem 3?

size 10000, rounds 50000

Can you explain the output from time?

cpu time: 915 real time: 914 gc time: 20

cpu time is how much time is spent with the central processing unit (the part of the computer that computes) working

real time is wall clock time, more or less

gc time is special time associated with Grinnell College. More seriously, gc is “garbage collection”, the computer cleaning up all those assorted cons cells we left around that we no longer refer to.

All numbers are in milliseconds.

Why isn’t the time scaling the way I expect?

When you run a randomized experiment, your results will vary. Good practice is to run the experiment a few times for each size.

Can you explain what should happen with the tallying?

We should tally the characters in the vector from back to front.

Did you get the starter code wrong?

Yes

(define tally-letters-in-string
  (lambda (str)
    (let ([tallies (make-vector 26 0)])
      (tally-letters-in-string/kernel str 
                                      tallies 
                                      (- (string-length str) 1))
      tallies)))

Post Lab notes

  • This lab was way too long.
  • We will continue on Monday.