By the time you have completed this lab, you should be able to:
The list of skills needed for this lab is essentially the same as that for lab04, so we won't repeat that list in detail.
The only other pre-requisite for this lab is that you should already have introduced to the basic ideas behind how selection sort works. (In Fall 2009, we did this via our field day exercise from 10/28, as well as homework H07.)
Work with your assigned pair programming partner on this lab. If you do not have one, consult the TA for your lab and/or your instructor for advice prior to starting.
You can find the video "Fun with Pair Programming" at this link. It takes less than 10 minutes to watch it.
Just as the in the video "Fun with Pair Programming", you and one other person will sit at a single terminal and write code.
From the video, you should be familiar with the roles of "driver" and "navigator", and the need for switching roles often. If not, then watch the video.
You'll be asked to evaluate your pair partner, and your pair partner will also evaluate you. These are the questions you'll be asked. You may find it helpful to consider those before you begin work—you certainly want your pair partner to say good things about you.
(Previous experience with pair-programming in courses suggests that 95% of students do end up giving their pair good evaluations—make sure you are part of the 95%!)
1. Did your partner read the lab assignment and preparatory materials before coming to the scheduled lab? [For example, did he/she watch the pair programming video before coming to lab]
2. Did your partner do their fair share of the work?
3. Did your partner cooperatively follow the pair programming model
(rotating roles of driver and navigator)?
4. Did your partner make contributions to the completion of the lab assignment?
5. Did your partner cooperate?
Your pair partners evaluation will be counted as part of your grade for the course.
So please do work with your pair in a constructive way!
Also: know that the vast majority of your grade in this course is still based on individual work, not pair work—so while you do need to try to have the best pair experience possible, in the unlikely event that your experience does not go well, the impact on your grade is limited.
Your TA will tell you who are are assigned to—or you may get your assignment by email.
Please be patient—depending on who shows up, there may have to be some slight adjustments to pair assignments.
We will try to avoid the situation where someone has to work alone, or in a group of three, but if may be necessary depending on circumstances.
H06 is a one-page (back and front) homework assignment to make sure that you and your pair partner:
This second item is particularly important. The single biggest obstacle to pair programming—or for that matter and kind of group work in courses—is incompatible schedules. So, this will help us detect that situation up front, and try to resolve it.
If you don't have a copy of H06, you can find links to it on the main course website under "homework".
Turn this in during your assigned lab section. You only need to turn in one copy per pair, but it is best if you BOTH fill it out, and BOTH turn it in.
Note: DO NOT share passwords with each other. That is a violation of your account agreement, and can result in suspension of your computing privileges at UCSB.
Instead, what you should do is:
A better solution is to use scp to copy the work from person1's account into person2's account with the scp command—here's how:
Ultimately, you should BOTH submit your work via the turnin program, just to be safe
The TA can match up your submission and avoid grading the work twice.
Some final thoughts on this step:
If you've forgotten how, consult steps 1 and 2 from lab01.
The files for this weeks lab can be found here:
And here:
~pconrad/public_html/cs16/09F/labs/lab05/files/*
You can use the same techniques described in lab04 to copy those into your ~/cs16/lab05 directory. Consult the instructions for lab04 if you don't remember how to do this.
The object of this lab is finish the programs indexOfMaxWithTests.c and selectionSortWithTests.c, each of which uses the principle of test-driven development that we first worked with in lab02.
The basic procedures is the same as the one you did in lab02 and lab04, so I won't described it again in detail—here's the short explanation.
Start with indexOfMaxWithTests.c
You also need to look for any lines with @@@ on them and follow the instructions there.
For indexOfMaxWithTests.c, this includes
Then, repeat this for selectionSortWithTests.c
You will note that selectionSortWithTests.c also contains the function indexOfMax().
Once both indexOfMaxWithTests.c and selectionSortWithTests.c pass their tests, you are ready for the final check, and for scripting and submitting.
The steps for scripting your assignment are similar to those you did for lab04, so I'm not repeating the instructions in detail here. Consult the lab04 description, and do the same sequence of steps, except do it for the two programs you created this week.
If you have any questions about the process, you may consult your TA or instructor—but my hope is that you will find it straightforward.
Your script file should be located in your ~/cs16/lab05 directory and should be called lab05.txt
Use this command to list out the contents of that file:
cat lab05.txt
If it looks ok, you are ready to submit!
To submit your assignment, you need to be in the ~/cs16 directory—one level higher than the previous step (use cd ..)
When you are in inside your cs16 directory, you are ready for the turnin step.
Type the following at the prompt:
turnin lab05@cs16 lab05
If you need detailed information about how turnin works, consult the instructions in lab00 through lab02.
You should try to complete this assignment by the end of your discussion section in which it was assigned, i.e. before 8:50am on Thursday 10/22/2009 or before 10:50am, 11:50am, or 12:50pm on Friday 10/23/2009 (depending on which section you are enrolled in.)
If you are unable to complete it by the end of your discussion section you may continue to work on it through the week. During homework H06, you and your pair partner(s) worked out times you could get together through the week, so take advantage of those if needed. Please do your best to have it completed and turnin command finished by 10pm on Wednesday November 4.
If that is not possible—e.g. because you need another chance to meet with your pair partner and the TA, then you may finish it during the following lab on Nov 5, and Nov 6. There is no late penalty for submitting during lab on Nov 5 or 6, but you will be behind, because a new lab will be assigned next week.
So do your best to finish before 10pm November 4th.
Late assignments will only be accepted (with 20 point penalty) up until the time the TA doing the grading is finished with grading and posting a particular assignment. There is no specific guarantee as to the length of that period of time.
After that, a zero will be recorded, and the only option is to make up the points via extra credit.
Copyright 2009, Phillip T. Conrad, CS Dept, UC Santa Barbara. Permission to copy for non-commercial, non-profit, educational purposes granted, provided appropriate credit is given; all other rights reserved.