Warning! You are being recorded (and transcribed) (provided the technology is working correctly).
Start of class instructions
For the future: I’m happy to reserve a (somewhat random) seat at the front of the classroom for those who need a front seat as an adjustment or accommodation. Just let me know.
Quiz
Approximate overview
Scholarly
Cultural
Peer
Wellness
Misc
It’s better to ask general questions via Teams Messages, email, or the Q&A channel than on the reading responses. You’ll get quicker answers.
When we redo a mini-project, do we have to redo the whole thing?
Agh! No! Just the part that didn’t get credit. And you’ll make it clear to the grader what you changed.
That passwordreset detour was, um, interesting, but not necessarily relevant. Do you often go off on tangents?
Squirrel!
Where do I submit tokens?
Stay tuned. The token assignments should be available on Gradescope by Monday.
From the Q&A channel, it sounds like some of the section 2 students have finished MP1 already. Should I be worried?
Not at all. It’s not due until next Wednesday. I just want to make sure you read it and think about it today.
How does the order of the numbers correspond to the dimensions of the shapes (length/width etc.) and can this be changed (such that the first number corresponds to height instead of length or vice versa)
For shapes that have different width and height, the first number is usually the width and the second is the height.
The documentation (see the Reference link) will usually give you the details. (I’m still working on the documentation.)
You can write a new procedure that takes the parameters in a different order (at least you will be able to after you do Monday’s reading).
Does top-down coding necessarily have to continue from the largest procedure to the most simple, or if you understand what the code should look like, could you start working out the ‘middle bit’ first?
Top-down usually starts only at the top. In practice, most people work in multiple directions at once.
I would like more examples of top-down and bottom-up.
We’ll do some in lab (at least I think we will).
Is the body of the party person a line or a rectangle?
We don’t know how to make lines, so it must be a solid rectangle.
How do we add a description to an image?
You can add the description as the last parameter, putting it in quotation marks.
(beside person-1 person-2 "Two people, side by side")
(circle 40 "red" "a red circle")
You can use the
redescribeprocedure, which returns a copy of the image with a new description.
> (define i (above (solid-circle 25 "blue") (solid-square 10 (rgb 0 0 0 0)) (solid-rectangle 20 100 "blue"))) > (describe-image i) "a center-aligned stack of images (a solid blue circle with diameter 25 above a solid black square with side length 10 above a solid blue 20-by-100 rectangle)" > (define j (redescribe i "a large blue letter i")) > (describe-image j) "a large blue letter i" > (describe-image i) "a center-aligned stack of images (a solid blue circle with diameter 25 above a solid black square with side length 10 above a solid blue 20-by-100 rectangle)"
Why did it describe the transparent square as “black”?
Incompetent programmers. (Sam)
Can I test things out on my laptop to help my partner?
No.
There’s a class policy on this. It goes like this: “If I see you running DrRacket on your laptop, I may defenestrate it.”
Do both of us submit the lab writeup, or only one of us?
Only one of you should submit. Then you should add your partner. If that doesn’t work, let us know.
What should I name the file?
decomposition.rkt.