EBoard 11: Pair programming (Section 1)

Warning! You are being recorded and transcribed, provided the technology is working correctly.

We are back to the standard start-of-class procedure.

Approximate optimistic overview

  • Administrative stuff [10 min]
  • Some notes on tracing [10 min]
  • Questions and answers [5 min]
  • An exercise [20 min]
  • Reflections on the readings and broader issues [20 min]
  • Lab and turn in [15 min]

Administrative stuff

Introductory notes

  • Happy Junior Visit Day! I don’t know if we’ll have any visitors.
  • I have last Friday’s quizzes mostly graded, but not yet uploaded to Gradescope. Expect to see them tonight.
  • Thank you for making it to class on such a cold day!
  • Because I care about you, I brought you (discounted) Valentine’s day candy.

Upcoming activities

Scholarly

Artistic

Multicultural

  • Friday, 21 February 2025, 4:00–5:00 p.m., HSSC N1170 (Global Living Room). Middle of Everywhere: ???

Peer

Musical, theatric, sporting, and academic events involving this section’s students are welcome.

Wellness

  • Tuesday, 18 February 2025, 12:15–12:50 p.m., GCMoA. Yoga in the Museum.
  • Tuesday, 18 February 2025, 5:00–6:00 p.m., HSSC S1003 (Atrium). Therapy Dogs.
  • Tuesday, 18 February 2025, 4:30–6:30 p.m., BRAC P103 (Multipurpose Dance Studio). Wellness Yoga.
  • Tuesday, 18 February 2025, 7:15–8:15 p.m., HSSC S1003 (Atrium). Therapy Dogs.

Misc

  • Tuesday, 18 February 2025, 7:00–8:00 p.m., Science 3820. Mentor Session (Quiz prep for Documentation Quiz; Review Tracing)
  • Sunday, 23 February 2025, 7:30–8:30 p.m., Science 3819. Mentor Session

Other good things

These do not earn tokens, but are worth your consideration.

  • Monday, 17 February 2025, 8:00–10:00 p.m., Bob’s Underground. Open Mic Night.

Upcoming work

Notes on the tracing quiz

Please read the notes on your quiz, even if you got credit.

Do things one step at a time.

NO:

    (+ (* 2 3) (* 4 5))
--> (+ 6 20)

YES:

    (+ (* 2 3) (* 4 5))
--> (+ 6 (* 4 5))
--> (+ 6 20)

Expand all procedures, even ones in which you think you know the result

NO:

    (+ 5 (square 9))
--> (+ 5 81)

YES:

    (+ 5 (square 9))
--> (+ 5 (* 9 9))
--> (+ 5 81)

Finish evaluating each expression before moving on to the next

NO:

    (+ (square (* 2 3)) (square (* 4 5)))
--> (+ (square 6) (square (* 4 5)))
--> (+ (square 6) (square 20))

YES:

    (+ (square (* 2 3)) (square (* 4 5)))
--> (+ (square 6) (square (* 4 5)))
--> (+ (* 6 6) (square (* 4 5)))
--> (+ 36 (square (* 4 5)))
--> (+ 36 (square 20))

Evaluate expressions left-to-right (and inside-out)

NO

    (+ (square (* 2 3)) (square (* 4 5)))
--> (+ (square (* 2 3)) (square 20)

YES

    (+ (square (* 2 3)) (square (* 4 5)))`
--> (+ (square 6) (square (* 4 5)))

Remember how subtraction works

NO

    (+ (- 10 4) (- 2 9))
--> (+ -6 (- 2 9))
--> (+ -6 7)

YES

    (+ (- 10 4) (- 2 9))
--> (+ 6 (- 2 9))
--> (+ 6 -7)

Don’t parenthesize numbers

NO

    (+ 6 (- 2 9))
--> (+ 6 (-7))

YES

    (+ 6 (- 2 9))
--> (+ 6 -7)

Note: Your goal is to keep the expression as valid Scheme the whole way.

Keep the whole context at all times

NO

    (+ (square (+ 2 3)) (square (+ 3 4)))
--> (square (+ 2 3))
--> (square 5)
--> (* 5 5)
--> 25
--> (+ 25 (square (+ 3 4)))

YES

    (+ (square (+ 2 3)) (square (+ 3 4)))
--> (+ (square 5) (square (+ 3 4)))
--> (+ (* 5 5) (square (+ 3 4)))
--> (+ 25 (square (+ 3 4)))

Questions

Administrative

SoLAs

Is “Procedural Abstraction” just a long name for “Procedures”?

Yes.

Do we have to know conditionals?

Not for this SoLA. I’ll fix the page soon.

Background

  • Today is our “talk about pair programming” day.
  • In our experience, partnering works imperfectly.
    • Some students tend to dominate and are impatient with their partners.
    • Some students feel like they don’t know enough and don’t want to “hold their partner back”.
  • We use this day to help make partnering better.
  • We will return to these issues throughout the semester.

An exercise

TPS:

  • 1 min: Think to yourself for a minute. What did you hear? What would you like to talk about? What made you optimistic? What surprised you? What worried you?
  • 3 min: Talk to your partner about it
  • n min: Full class consideration

What do we want to talk about?

  • I was surprised to hear that we’re doing more pair programming in upper-level classes. (We think it’s our responsibility to help you learn to work with others.) (Students think so, too.)
  • Some people feel overshadowed by their partner. [We should talk about this.]
  • There were also a lot of negative responses.
  • We could relate to some experiences, but not all of them.
  • We do both work alone (mini-projects, SoLAs) and work together (labs).
  • It’s important to have mutual respect when working together.
  • Statistics of distribution? (Sam wrote all of them based on comments he heard from students.)

How do you avoid feeling overshadowed by your partner? How do you avoid overshadowing your partner?

  • One situation: Your partner knows (or seems to know more) than you.
    • Change your mindset. You’re here to learn. Talk with them.
    • Be patient with your partner. Everyone is here to learn.
  • Another situation: Your partner thinks they know more; they are wrong.
    • Be aggressive
    • Be patient with your partner. You can always learn something from your partner, even if you think they know less.
  • Talk through things; don’t just give a solution to your partner.

Reflecting on the readings (TPS)

What are the key points from the readings? (TPS)

Pair Programming

  • Pairs work best when partners realize that both have background knowledge.
  • Pairing can let you solve problems that you would not solve individually.
  • You tend to write better code when someone is watching.
  • Posing a good question can help you understand better.
  • Working together helps you notice things you wouldn’t notice yourself.

Couch Potatoes and Hitchhikers

  • We are averse to confrontation. However, you benefit everyone if you confront people who are not trying.
  • Self reflection: Maybe I have to do better at confronting.

Diverse teams

  • We tend to gravitate toward people we are more comfortable with. That doesn’t help us develop.
  • A bit of discomfort can be good, it may mean that you’re getting new ideas.
  • People who choose their groups seem to be less productive. That’s an unexpected (“staggering”) result.

Lab