Skip to main content

CSC 151.01, Class 12: Testing Your Procedures

Overview

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

News / Etc.

  • Continue partners! You know the drill.
  • I distributed grades yesterday (although with the wrong class listed).
  • Only HW1 has been graded. A “check” (the default grade) is worth about 85 points. I think that’s stated somewhere in my policies. (If about 1/4 of your grades are “plus”, you usually have a HW score in the A range.)
  • You have all earned five points of extra credit on the exam for corrections. Congratulations! Of course, Titus may never let me write exam problems again. I still appreciate additional corrections, but they will not garner you extra points.
  • I think I’ve responded to every prologue I’ve received (as of 10pm Thursday night). If you filled out the prologue before then, and haven’t heard from me, let me know.
  • Many of you wrote “Stop when I get stuck for more than a few minutes” in response to “What should you do to be successful”. Note that at that point, you should send me an email message explaining what you are stuck on.
  • I was glad to see so many of you (or what seemed to be so many of you) at yesterday’s depressing convocation. Don’t forget to send reflections!
  • How is the balance between lecture+recitation vs. lab? Mostly good, but Sam should do a bit less lecture+recitation.

Reminders

  • Ask questions via email! I’m always happy to (try to) answer questions via email. There is no need to apologize when sending me questions. If I take too long to answer, send another email (or even text, if it’s a reasonable hour).
  • Visit me in my office! I’m always happy to see students during my office hours. I prefer that you book me at https://rebelsky.youcanbook.me, but you can also just show up during office hours and hope that I’m not busy.
  • Use our tutors! We have tutors available Sunday through Thursday evening from 7-10 p.m. in Science 3813/15.
  • Visit mentor sessions! We have mentor sessions on Wednesday and Thursday evenings from 8:00-9:00 p.m. in the CS Commons. Wednesdays will be more Q&A, Thursdays will include sample quizzes.
  • Visit review sessions! I run review sessions on Thursdays at 9am in this room.
  • We have individual tutors!
    We have individual tutors available for those who take advantage of the above and find that it’s not enough.
  • Visit our store! We have office supplies in the commons. Price is free will donation.
  • Get news! Feel free to ask me to sign you up for the department mailing list.
  • NEW: Suggest extra credit! Send me extra credit ideas and opportunities.

Upcoming Work

Extra credit (Academic/Artistic)

  • CS Table, Next Tuesday at noon, 14 Feb 2017. Topic forthcoming.
  • Thursday extras, Thursday, 16 Feb 2017, 4:15 p.m., Science 3821: 4-1 joint BA/MSC program with UIowa.

Extra credit (Peer)

  • South-Asian Chai time on Friday, at 4pm, in JRC 2nd floor. Be moderate in all that you do.
  • Reflect on how awesome the sound is for Milo the Rapper and Crunchy Kids 9 p.m., Friday, Gardner.
    Be moderate in all that you do.
  • NEW Pun Club Saturday at 4pm in the Secret Younker 1st Floor Lounge Location. (You only get credit for this once.) Be very moderate in all that you do.
  • Friday-Saturday-Sunday, 17th-19th, Swimming and diving conference championships. (You can only get credit for this twice.)
  • Saturday the 18th, Symphony Concert. 2-4 p.m. Sound painting and more! In Sebring-Lewis.

Good things to do

  • Track meet this Saturday.
  • Large group speech showcase, Saturday at 6:30 p.m., Grinnell High School.
  • Women’s basketball this Saturday at 1pm.
  • Men’s basketball this Saturday at 3pm.

Friday PSA

  • Please take care of yourselves.

Questions

Questions on the exam

Questions in preparation for the quiz

Why does (yield (yield (+ (yield 1) (yield 3)))) print yields 1, yields 3,yields 4, yields 4, 4?
Let’s walk through the steps.
  • yield prints its parameter. (Prints two spaces, the word “yields”, a space, the parameter, and a newline.)
  • yield also returns the value it was given, for use by any enclosing procedure.
  • Scheme tends to evaluate expressions inside-out and left-to-right.
  • According to that policy, (yield 1) is evaluated first.
  • According to that policy, (yield 3) is evaluated next.
  • We then evaluate (+ 1 3), which gives 4.
  • We then evaluate (yield 4), which prints yields 4 and gives 4.
  • etc.
When you write (yield (* 3 (+ 4 5))) does it only print yields 27 and
not “4 + 5 yields 9” …?
We only get output when we use procedures that explicitly create output. + does not explicitly create output. add, which we defined, does.

Other questions

Why do you write all of those octothorpes?
To indicate section headings. They convert into pretty headings on the Web pages.
What’s an octothorpe?
The symbol also referred to as “mesh”, “pound sign”, “number sign”, and “hash”, among other things.
Can we get an extra credit for every CS table we attend, provided we send
a thoughtful reflection on that CS table and not just “Wow, there were
a lot of awesomely strange people there”?
Yes. Up to the limit of academic/artistic extra credit activities (4).
Why won’t Racket open my file?
Computers are evil. Incredibly evil. Send yourself copies of files once you complete the necessary work.
Just open within Racket, rather than double-clicking on the file.
Why do you sometimes use three semicolons and sometimes use one?
Three semicolons indicate that we are writing the documentation for a procedure (or value). One is an internal comment about a tricky piece of code, or something similar.

Quiz

  • Fun!

Lab

  • We will debrief on this lab on Monday.

Writeup

Write up exercise 3 from the lab on unit testing with Rackunit.

Send your solution to csc151-01-grader@grinnell.edu.

Title your email CSC 151.01 Writeup for Class 12 (YOUR FULL NAMES).