Skip to main content

CSC 151.01, Class 05: RGB Colors

Overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Extra credit
    • Questions
  • RGB colors
  • Lab
  • Debrief

News / Etc.

  • New partners! Grab a card, find a computer, introduce yourself.
  • Quiz 1 returned (by mentors; graded by SamR).
    • A quick note on the quiz.
  • HW 1 returned (via email; last few folks to submit are not yet graded).
  • The most frequent concerns raised in your surveys were (a) That you have too little background and (b) That CSC 151 is time-consuming.
    • We really do expect no background, and some of the most successful majors have come in with no background.
    • CSC 151 is time-consuming. However, my impression is that every course in this division is time-consuming. I was talking to two of you last night who had just spent eight hours on a math assignment.
    • One of the issues in CS is that you know when your work is wrong, since it doesn’t run or you get the wrong answer. I think that makes it feel like you can’t compromise as much as you do in other classes.
  • I apologize for the confusion on the self-checks for colors.

Reminders

  • The CS department maintains a mailing list of events and opportunities (and other things of potential interest).
  • Starting this week, we will have mentor sessions on Wednesday and Thursday evenings from 8:00-9:00 p.m. Wednesdays will be more Q&A, Thursdays will include sample quizzes.
  • We have tutors available Sunday through Thursday evening from 7-10 p.m. in Science 3813/15.

Upcoming Work

Extra credit (Academic/Artistic)

  • CS Table, Tuesday, noon, middle PDR: Planning for the semester.
  • Women in CS, Tuesday @ 7pm in the CS commons: Discuss Hidden Figures. (Everyone is invited.)
  • Thursday extras, Thursday, 4:15 p.m., Science 3821: LaTeX

Extra credit (Peer)

  • Swim meet this coming weekend.
  • Ritalin Test Squad Improv Troupe is looking for new members and will be holding try outs this weekend. Auditions will be on Saturday Feb 4th, 1-3 pm in The Wall (Bucksbaum 152).

Good things to do

  • Care for the people around you.
  • Bob’s Underground, Wednesday, 8pm. Call your representatives, and use up the tab.

Questions

Questions on the the quiz

My life is shallow and I have never made cookies from scratch. Should you really penalize me on the quiz? (Alternately: Sam, you are a pretentious, biased, bourgoisserasdffas, cisgendered, white male. Don’t make unreasonable assumptions about what we know.)

No. I’ll add 1 to everyone’s quiz grade.

Questions on Assignment 2

Can you explain how we are supposed to “create a few more contestant files, change the require statement, and verify that the results you generate are different and correct.”

Here’s an example.

  1. Create ContestantB.rkt that looks a lot like ContestantA.rkt, but with different scores.

  2. In assignment2.rkt, change the line that reads (require (file "contestantA.rkt")) to read (require (file "contestantB.rkt"))

  3. Run assignment2 and check your answers.

One submission per group, right?

Yes.

What happens when my partner is irresponsible and doesn’t show up to our meeting, so I do all the work myself.

That never happens.

Do we need one thing that says “N minutes and M seconds”, or two things?

Either is acceptable. I’d probably start with the latter. (define total-minutes ...)

Questions on Policies and Procedures

Do you post anything to P’web?

Nope. The only use of P’web in this course is for the pictorial class list.

Where is the middle PDR?

Second floor of Marketplace. PDR stands for “Private Dining Room” or some such.

Questions on Numbers and Symbols

What’s the point of a symbol?

Sometimes we need values whose only purpose is to identify things and be comparable for equality. Symbols serve that purpose. We’ll see some uses over the next few weeks. (Behind the scenes, symbols are used in the “tables” that keep track of variables and parameters.)

Other questions

Why are we going so fast?

See the answer to the next question.

Why are we going so slowly?

See the answer to the previous question.

What?

Moderation in all things.

RGB colors

Every time you encounter a new type of value, you should ask yourselves a series of questions. Let’s do that for RGB colors.

  • What is it used for? What do I do with it?
    • Express colors for the computer.
  • How do I express values in this type?
    • We assign values between 0 and 255 for each of three components: Red, Green, and Blue.
    • (irgb RED GREEN BLUE) creates a color
    • (irgb 255 0 0) creates a version of red.
  • How does Scheme express the values back to me?
    • It could show me an image, but that requires more commands.
    • It gives you back an inscrutable number.
  • What can do with the values?
    • use them in GIMP
    • Use color-swatch to build an image, which we show with image-show
    • Use irgb-red, irgb-green, and irgb-blue to extract the components

Lab

Writeup:

  • Exercise 7
  • Send email to csc151-01-grader@grinnell.edu.
  • Title: CSC 151.01 Writeup for Class 5 (YOUR NAMES)
  • Include in the body of the email your answers to exercise 7.
  • For 7b, just write the instructions you used to show the color swatch.
  • Due Wednesday before class.
  • If you work together, send one email. If you work separately, send separate emails.

Debrief