Lab 3
Purpose
Review pair programming, practice with the Design Recipe & big-bang
TA Pair Demo
A pair of TAs will demonstrate pair programming, solving the following problem from last weeks lab. Pay particular attention to how they work together, and how they follow the steps of the design recipe.
For any word of at least one character that starts with a letter,
let's say that its "bingo word" is the uppercase version of the
first letter, followed by a space, and then followed by the number
of characters in the word. For example, the bingo word of "bingo"
is "B 5" and the bingo word of "Win" is "W 3".
DESIGN the function bingo-word, that takes a string as an argument
and returns its bingo word. You may assume that the argument is a valid
word as described above.
Code Review Demo
In most labs, one thing you will do is explain, to either a TA or another student, some code that you designed earlier in the lab. Learning how to explain how code works, and more importantly, why it does what it does, is an incredibly important skill, not only for working professionally (where essentially all code is subject to some form of review before it is released) but also, of course, interviews, where you will be expected to talk about code you have written.
Here, one of the other lab TAs will ask one of the pair to explain how their
bingo-word
function works, as a demonstration.
Demo of looking up documentation
TAs will show the two ways of finding documentation: right clicking on an
identifier (from either BSL or the image library) and clicking Search Help Desk,
or, going to https://docs.racket-lang.org and
searching there, being careful to select results from either the Beginning
Student Language or the 2htdp/image
or 2htdp/universe
libraries.
Find a partner
Find a new partner in the class. This should not be who you worked with last week. Working effectively with people you don’t already know (and perhaps would not be friends with!) is an important skill to develop.
Starter File
Download lab3.rkt. Start working through this, carrying out pair programming like the TAs demonstrated. Be sure, every time you see the phrase “Design the function”, to follow all the steps of the Function Design Recipe. Stop when you get to the place where it says “STOP AND SWITCH PARTNERS”
Stop and Switch Partners
At this point in the lab, we want you to find a new partner. Put your hand up and look around to find another pair that is at this point as well, and exchange partners. At this point, also indicate to one of the TAs, if they haven’t already marked you, that you are ready for a Code Review.
Make sure you share your Problem 1 code with your partner before switching.
Code Review
At some point before the end of lab, you should have a TA come over and review Problem 1. You should be able to explain, in no more than a minute or two, how your code works and why you made the choices you made.
Continue with the Lab
Concurrent with the code review (which will proceed throughout the rest of the lab), work on Problem 2 with your new partner. You are welcome to review Problems 1 with your new partner if you aren’t completely sure of them, as at the end, you will need to submit both.
Finished?
When you have completed all the exercises, both you & your partner should submit the completed file to the Lab 3 assignment on Gradescope. If you have trouble submitting it, ask a TA. Ensure that the autograder, which runs immediately, correctly validated your work, and if there are problems, correct them and re-submit.
Once you have submitted the problems, and have completed your code review, you are welcome to leave!