Lab procedures for CS51 #
Note that you must attend your assigned lab slot. If you want to change your assigned lab slot, please contact course staff. If you can’t make your assigned slot, do not simply attend the other slot. See the syllabus for information on excused absences.
The procedures we follow in lab are as follows:
Before lab #
- Do the pre-lab reading (including the preview of the lab itself) before the day of the lab.
- Submit the reading survey via Canvas by 11:59pm the day before the lab.
- Feel free to work on the exercises in the textbook reading. Many have answers in the back of the book that provide further clarification on concepts.
- Bring paper and pencil to all labs. Writing aids thinking.
Upon entering the lab session #
- Head to the lab location as specified in the syllabus. You should get there a few minutes ahead of time to get situated.
- For each set of six labs (in particular, labs 3-8, 9-14, and 15-20), lab partners come from the same group of six randomly assigned students. You’ll be assigned a partner number for each lab, which you’ll receive by scanning your Harvard ID. Head over to the table with your partner number and introduce yourself to your partner for the day: trade names, trade emails, write them down.
- Download the lab instructions available from the course website and look them over.
During lab #
Generate your git repository for the lab via Github classroom.
Go to
http://url.cs51.io/lab{n}
. (The{n}
is the lab number.)You may have to “Authorize application”.
Click on “Accept this assignment”.
Click on the generated link to
https://github.com/cs51/lab{n}-2025-{yourname}
.Click on the “Code” button.
Select “SSH” if needed.
Copy the SSH URL for the generated repo:
git@github.com:cs51/lab{n}-2025-{yourname}.git
Clone the repository into a local directory
lab{n}
:% git clone git@github.com:cs51/lab{n}-2025-{yourname}.git lab{n}
Go to the directory for your just-created local repository:
% cd lab{n}
Before getting started with the lab proper, lab sessions typically start with a puzzle. Often, there’s material pertinent to the puzzle in the lab instructions that you’ve downloaded.
When the instructor tells you to get started on the lab problems:
Open the file
lab{n}.ml
in your favorite text editor.Decide which partner is going to drive first.
Work together with your partner to do the exercises in the provided lab files.
Once an exercise is working on one laptop, congratulate your partner. Really, I mean it. Every single time.
Now get the exercise working on the other laptop; no moving to the next exercise until both partners understand the solution and agree.
Switch laptops after each exercise, so the other partner can “drive”.
If you and your partner get stuck, raise your hand and a staff member will come by your table to get you making progress again. (If only one of you is stuck, work with your partner to get unstuck. This helps the learning of both partners a win-win!)
Add lab files to staging (using
git add
), commit the staged files (git commit
), and push your modified repo (git push
) after each problem. Here’s a typical example of the shell instructions:% git add lab{n}.ml % git commit -m "such and such progress on lab whatever" % git push
Submit your repo (not your individual files) to Gradescope for testing. Each person does this separately.
Gain tranquility from the end-of-lab puzzle.
After lab #
If you don’t finish all the exercises in the lab session: Don’t panic! No one finishes in lab.
Continue working on the lab, with the same partner or with others or on your own. Study groups are an especially great idea.
Commit and push your repository frequently.
We recommend that you submit your lab to Gradescope at least once the day of the lab itself. Gradescope will run the lab against our unit tests and provide a report on the results, including your future score on Sunday’s virtual quiz.
As you continue to work on the lab, submit to Gradescope as often as you’d like to see the results of the unit tests, and your future score on Sunday’s virtual quiz.