EBoard 03: Image and program decomposition

This class will be recorded! Its use is limited to members of the class. Please do not share with others.

Approximate overview

  • Administrative stuff [~10 min]
  • Q&A [~10 min]
  • Quiz [~10 min]
  • Reflection [~10 min]
  • Lab [~50 min]
  • Debrief [no time]

Administrative stuff

Notes and News

  • We will not generally come back as a whole class after we start lab.
  • SAM: Don’t forget to start and share the Otter.ai transcription, even if it’s embarrassing.
  • Sorry about any confusion yesterday. I’m restructuring how I use Gradescope and, well, had some problems.
    • Today you may see way too many quizzes. Ignore them.
  • Feel free to ask us about errors from the autograder. You need not get your code to pass the autograder, but you should try.
    • It’s nice to get it to the point that it reports the percent of correct tests rather than giving error messages.
  • When submitting for a group, make sure to add all the group members.
  • For those having trouble on Chromebooks, we’re working on finding solutions. For now, the best one seems to be to open a Web browser to https://remote.cs.grinnell.edu. (You can do that on any machine, but most of you will find that less convenient than working on your own computers.)
  • I will be posting notes on labs in the Class Meetings channel. Please check back there from time to time. (I’ll try to tag them with @students so you get notified, but notifications don’t seem to be uniform.)
  • If my demonstrations are too quick, let me know. I can slow down.
  • Democracy fails if you don’t vote. Only three of you have indicated times for mentor meetings. We will hold mentor meetings next Wednesday (a week from today) in advance of Thursday’s SoLA.

Notes on Teams

  • When you start a new meeting in the Lab Group, please title it appopriately, something like “Group 4 (Sam and Stella)”
    • Copying and pasting is a good way to do so.
  • If you want to reach the course staff in Teams, use @staff. (No backticks.) You should click on the pop-up thing.
  • When you want to reach the students (and staaff), use @students.

Upcoming activities

I will post details to the Announcements channel.

  • CS Extras, 5pm, Thursday, 4 February, in Events Channel on CS Team.
  • Town Hall on Strategic Planning, Noon, Monday, 8 February.
    • It appears this is only for Faculty and Staff.
    • I hope there is a separate meeting for students.
  • Try out the campus Maker Space (well, the Satellite Maker Space) https://makerlab.sites.grinnell.edu/satellite-home/

Attendance

  • Our wonderful mentors will take attendance by looking at the the list of also-wonderful people here.

Notes from today’s reading

First question

You were fairly evenly split on which of the two versions of the circles definition was clearer.

Original

(define top-row
  (beside (circle 50 'outline "red")
          (circle 75 'solid "blue")))

(define bottom-row
  (beside (circle 75 'outline "blue")
          (circle 50 'solid "red")))

(define circles
  (above top-row bottom-row))

New

(define circles
  (above (beside (circle 50 'outline "red")
                 (circle 75 'solid "blue"))
         (beside (circle 75 'outline "blue")
                 (circle 50 'solid "red"))))

You have a lot of control over concision and understandability.

  • Would it help to have (define medium-circle (circle 50 'outline "red"))?
  • What happens in terms of concision or readability if we have four rows, rather than just two?
  • Which is easier to modify?
  • Which is easier to check as you go along?

Note also that indentation helped a lot. Consider the way many of you were defining things.

(define circles
  (above (beside (circle 50 'outline "red") (circle 75 'solid "blue")) (beside (circle 75 'outline "blue") (circle 50 'solid "red")))) 

Lesson: Use separate lines and indentation for clarity.

Second check

This question was to reveal a variety of things.

  • The order in which you put things together matters (or might matter).
  • Behavior of above and beside and the effects thereof.
  • Practice predicting and playing.

Q&A

Where do we put group members’ names?

  • On Gradescope.
  • Make sure the file names.

What do you do with the autograder grade?

  • Throw it away and use the human grader grade.

How do I use a token?

  • Generally, I will take the automatically.
  • You can also send a regrade request to remind me.

How can I align my code clearly?

Type a tab on any one line.

Type Ctrl-i (indent) for the whole program.

Good policy: The first parameter to a procedure should be on the same line as the procedure. ALl the rest should either be on the same line, or separate lines.)

Note that indentation helps us check parenthesization.

What does {??} do?

It’s a placeholder that yells at you.

Are we going be testing on the evil #px stuff?

No! Not until we do it explicitly.

Just shapes, above, beside, and math.

Quiz

Bring up readings in your browser.

Open DrRacket so you’re ready.

Eight minutes (more or less).

Reflection

Here are some of the things you might have said about Monday’s exercise.

  • Things will go wrong. Laugh when they do.
  • Multiple perspectives help.
  • You can reuse some instructions. For example, we used the same instructions for the nut butter jar and the fruit spread jar.
    • Well, nearly the same instructions.
  • Worry about “edge cases”; uncommon situations in which things may go wrong.
  • Assumptions are potentially dangerous.
  • Ambiguity is dangerous. “it” can mean lots of things.
  • Developing a bit at a time and looking at the results is easier than building everything all at once.
  • Things will go wrong. Laugh when they do.
  • “Computers are sentient and malicious.”

Lab

New pairs!

  1. Sam (well, Sam using a computer program he wrote) assigns groups.

  2. First person in the group goes to the Lab Sessions channel, clicks the camera (or something equivalent) and then “Meet Now”

  3. Add a subject. “Group # (Names)”, such as “Group 1 (SamR & JohnG)” (Copy and paste is your friend.)

  4. Click “Meet Now”.

  5. Invite the other members of the group.

  6. Other members of the group join. Generally, you’ll wait until everyone is there. I may notify you if someone is taking extra time on the lab.

  7. Discuss/work/chat/whatever.

  8. Please regularly check the Class Meeting channel for updates on this lab. (I’ll try to tag you, but it appears not everyone notices the tags.)

There are four problems. Do them all, combine your code, and submit.

SAM: Don’t forget to turn off Otter.ai.

Notes for students

  • You can right click on a link (or control-click on Mac) and use “Save as …”
  • Working in the interactions pane is good.
  • Sorry about the error messages when you click “run”. I assume you figured a way around them. I’ll work on fixing code.

Debrief

We won’t have time, but I like to leave the potential there.

  • People work at different rates. That’s fine.