Warning This class is being recorded (and transcribed), provided Sam remembered to hit the “Record” button.
Approximate overview
Academic
Cultural
Peer
Wellness
Misc
(filter pred? lst) returns a list of the
values for which pred? returns true. What if it returns neither
true nor false? filter actually keeps all of the values for which
pred? returns a “trueish” value (trueish = “not false”)“The style LA killed a little bit of my soul.”
Now you know how our graders feel.
I’ll give a style quiz this Friday (sorry ???).
Can we go over this LA?
You can attend the mentor session. You might also be able to ask the evening tutors. You can TM me or set up an appointment.
I’m a bit worried about the recursion in blur.
(Taken from the pre-assessment.)
bitmap->vectorgives some ideas on how you can write a procedure that recurses in two dimensions.
I would recommend that you write a lot of helper procedures. Decomposition is your friend. For example,
- something that grabs all the pixels around a location
- something that grabs a pixel from the vector based on the column and row
- something that sets a pixel in the vector based on the column and row
Of course, blur is optional (only needed for E).
Can you explain again how we convert a bitmap into a vector?
A bitmap is a width-by-height grid of colors.
We can think of each cell as having an “address” given as (col,row)
We can turn the two-dimensional grid into a one-dimensional vector by “putting the rows side by side” (“row-major order”)
We can look at the indices of all of the cells in the vector in the “normal” way (0,1,2,3, .. 4) or in terms of the col/row pairs 0/0, 1/0, 2/0, 3/0, 4/0, 0/1, 1/1, 2/1, …
There’s a forumla to convert the col/row pairs into indices:
(+ col (* row width)). E.g., in a 5x6 image, 3/2 gets converted to location 12.
I had an extension on an MP and emailed you the MP. How do I email you the post-assessment?
You can find the questions in the handouts section.
Can I use tokens to turn in pre- and post-assessments really late?
That violates the point of pre- and post-assessments. Particularly for pre-assessments, it’s important for you to do them before the assignment.
I may be a bit more lenient on assessments than I’d planned.
What will Friday’s quiz be on?
- Randomness.
- Makeup on diagramming data.
- Makeup on style.
- Makeup on tracing (if you ask me).
Wouldn’t Sam like to write more quizzes?
Not really. Typically, missed topics are made up on SoLAs.
My family is coming to visit and I may have to miss class on Nov 10 and/or Nov 13.
“There’s more to life than computer science.”
Make sure to let me know.
Make up the work on your own. Check the eboard and talk to peers.
You do not get a different time to take the quiz. You’ll have to make it up on a subsequent Friday (or SoLA).
If you miss class, do you have to make up the full lab?
Make sure to tell Sam that you missed class. “I’m sorry; I couldn’t make class today.”
Do as much of the lab as you can do in 60 minutes.
Can you really send email from the command line?
Yup. I think.
Things we’ve learned …
!) tend to modify their parameters.!) often return nothing.Sam notes that the mutable/immutable dichotomy is one programmers and computer scientists spend a lot of time thinking about. It’s often easier to work with mutable data structures, but it’s easier to analyze programs that only use immutable data structures.