pair programming in the classroom - cs.virginia.edu · pair programming in the classroom mark...
Post on 23-Apr-2018
215 Views
Preview:
TRANSCRIPT
PairProgrammingintheClassroom
MarkSherriff
UniversityofVirginia
June29,2016
SomematerialcourtesyofLaurieWilliams,NCSU
Tapestry2016
Tapestry2016
Overview
• WhatexactlyisPairProgramming?
• TheCaseforPairProgramming
• TheCosts• Guidelinesforasuccessfulpairingexperience• MythsandLegends
• Resources
2
Tapestry2016
PairProgrammingDefiniQon
• "Pairprogrammingisastyleofprogrammingin
whichtwoprogrammersworkside-by-sideat
onecomputer,conQnuouslycollaboraQngon
thesamedesign,algorithm,code,ortest."
–LaurieWilliams
3
Tapestry2016
SlightlyAlteredDefiniQon
• "Pairprogrammingisastyleofprogrammingin
whichtwoprogrammersworkside-by-sideat
onecomputer,conQnuouslycollaboraQngon
thesamedesignoralgorithm."(emphasismine)
• Basicidea:IDE’shelpuscode–peoplehelp
usdesign!
4
Tapestry2016
WhyPairProgramming?
• Pairprogrammingstudentstendto:
– Makeitthroughthefirstclass
– ImprovesretenQon
– Increasesprogrammingconfidence
– Performcomparablyorbe`eronexamsand
projects
– Performjustfineinfuturesoloprogramming
– Helpcreatepeergroups
5
Tapestry2016
WhyPairProgramming?
• Aninstantsupportsystem
– Wehavefoundthatpairingcutsdownonalarge
numberofthe"trivial"quesQons(syntax,
assignmentclarificaQon,etc.)andafairnumberof
themorecomplexquesQons(debugging,etc.)
– WehavebeenabletoreducethenumberofTAs
forsomecourses
– Instructorofficehoursaremuchquieter,andthe
instructorcanspendmoreQmewithstudentsthat
needmorehelp
6
Tapestry2016
WhyPairProgramming?
• SomeQmesitisanumbersgame
• Inalabof40students…– having20pairsmakesiteasierforTAstogetto
everyone
– 20assignmentsareeasier/fastertogradethan40
• OurmainCS1coursehasonaverage500
studentsasemester…
7
Tapestry2016
TheRoles
• TheDriver– Thepersonwith"control"ofthecomputer
– Doesthebulkofthetyping• TheNavigator
– AcQvelyfollowsalongwiththedriverwithcomments
– CantakeoveratanyQme
• Howdoesthistranslatetopairdesign?
8
Tapestry2016
Partnersvs.PairProgramming
• HowisPairProgrammingdifferentthanjust
havingpartnerassignments?
– Mentalityofhowtoapproachtheassignment
• Partnering:– "YougodothispartandI’llgodothispartandthenwe’llputitbacktogether."
• PairProgramming:
– "Let’sfirstdothisparttogether,thenwe’lltackletherest."
9
Tapestry2016
Partnersvs.PairProgramming
• ThedisQncQonma`ers!
• Itma`ersto:
– Instructors– TeachingAssistants/Tutors– Students
• Callitframing,percepQon,spin…whatever
• It’sallaboutajtude!
10
Tapestry2016
It’sAllAboutAjtude
• Howdoyougettheajtudegoing?
• HowdoIstartusingpairprogramming?
• Thingstoconsider:– TeachingtheTechnique– Assignments
– PairCreaQon– PairEvaluaQon– Assessment
11
Tapestry2016
TeachingtheTechnique
• StartwiththeinstrucQonalstaff• PairprogrammingHAStobeincorporatedinto
theclass(orlab)insomestructuredway
• Studentsdonotnaturallyworkasa“pair”whengivena“partner”
• Whathappenswhenyoutellstudentstheycan
workwitha“partner”?
12
Tapestry2016
TeachingtheTechnique
• Whatareyouactuallyteachingthemtodo?
• 1.Taketurnsbeingtheonecoding(“driver”)• 2.Whoeverisnotcoding,commentacQvely
• 3.Whoeveriscoding,talkthroughwhatyou
aredoing
• 4.Switchatregularintervals• 5.Nothingisdoneindependentlyfromthe
otherpartner
14
Tapestry2016
TeachingtheTechnique
• SwitchingrolescanbeproblemaQcs
• Someideas:
– Goaroundandtappeopleontheshoulder– Haveaaudiocue– Haveavisualcue
• Trytoenforceevenrolesasmuchaspossible
• Trytoenforceno“splijngupwork”asmuch
aspossible
15
Tapestry2016
Assignments
• DoIhavetototallychangemycoursematerial
todopairprogramming?
• Answer:Probablynot,butsomechangesmight
makethingsgobe`er
16
Tapestry2016
Assignments
• Biggestproblem:assignmentscope
• Ifyouuseyourcurrentassignmentswithno
modificaQonatall,it’spossiblethatno
switchingwilloccurand/orthepointofpairing
won’tbeobvious
• Example:ConvertFahrenheittoCelsius
• CounterArgument:Twonoviceslearning
togetherfromtheverybeginningcouldhelp
withself-confidence
17
Tapestry2016
Assignments
• Iftheassignmentscopeistoolargeorifthere
isanobvious“splitpoint”,divideandconquer
becomesmoretempQng
• Example:WriteaStudentandCourseclassthat
worktogethertokeepupwithcourse
enrollment
18
Tapestry2016
Assignments
• AnassignmentIlikeforpairprogramming:
• EmailHunt
– Givenawebsitethathasabunchofemail
addressesonit,writeaprogramthatcanreadthe
websiteandextracttheemailaddresses
– h`p://cs1110.cs.virginia.edu/emails.html
• ThingsIlike:– Noonewaytodoit(infact,ittakesmorethanone
ideatogetalltheemailsout)
– AllowsforsomecreaQvity
19
Tapestry2016
PairCreaQon
• Howdoyoucreatepartners?• BigphilosophicquesQon:
– Doyouassignpartnersordoyouletstudentspicktheirownpartners?
– Advantagesanddisadvantagestoboth
20
Tapestry2016
PairCreaQon–AssignedPairs
• Howcanyouassignpairs?– Randomly
– Basedonprogrammingexperience/confidence
– Personality/friendships– Otherinterests/surveyresults
21
Tapestry2016
PairCreaQon–AssignedPairs
• Randomly
– Easiesttosetup– GoodifyouhavenootherinformaQontowork
from
– HaspotenQaltoleadtoproblems(butnotasmany
asyoumightthink)
– Consider“randomwithreplacement”for
subsequentassignments(noonecanworkwith
samepersontwice)
22
Tapestry2016
PairCreaQon–AssignedPairs
• Basedonprogrammingexperience/
confidence
– Researchindicatesthishasthehighestlikelihoodofproducinggoodpartnerships
– HardtosetupunQlyouhavedata– Eventhen,itcanbedifficultbecauseresearch
showsthatpercep)onofpartner’sability(notactualability)isahigherindicatorofagoodmatch
23
Tapestry2016
PairCreaQon–AssignedPairs
• Personality/Friendships– Mostlikelytohavethefewestpersonalityconflicts
– Enforcingcliques• Othersurveyresults
– Ihaven’tusedanythingelse,butcouldimagine
usingthingslike:
• Schedule• Outsideinterests• Commonfriends
24
Tapestry2016
PairCreaQon–Self-SelectedPairs
• Self-selectedpairsopenhaveelementsofthe
assignedpairingswithsimilarexperienceand
friendships
• Soithassimilarbenefitsanddrawbacks
• However,youHAVEtomonitorcloselyforthe
“laststudentpicked”problem
• Probablyshouldenforcereplacementforlater
assignments
25
Tapestry2016
PairReplacement
• ReassignseveralQmespersemester
• Goodforstudents– Gettomeetnewpeople,learnaboutworkingwith
newpeople
– Iftheydon’tliketheirpartner,theyknowtheywillgetanewonesoon
• Goodforinstructor– MulQpleformsoffeedback
– NaturalhandlingofdysfuncQonalpairs
26
Tapestry2016
PairManagementandEvaluaQon
• Auto-AssignPairCreaQon– CATME–h`p://www.catme.org
– Dataneededtoauto-createpairsvaries• Self-ReportedPairs
– GoogleForms
27
Tapestry2016
PairEvaluaQon
• Withorwithoutatool,itboilsdowntoafew
quesQons:
– Didthepairgetalong?– Didyougettheworkdone?– Doyoufeellikeyou“didyourfairshare?”
• Moredataisnice/interesQng,butthisisallyou
reallyneed
• Reliablefeedbacksystemisneeded(bothfor
youandthestudents)
30
Tapestry2016
PairEvaluaQon
• NCWITresourceshavesurveysyoucanuse!
• Exampleinyourpacket
• h`p://www.ncwit.org/pairprogramming
31
Tapestry2016
PairEvaluaQonandAssessment
• Ifthere’snoproblem…thengreat!
• Ifthereis…– Ifpossible,askthestudentsoneataQme:“If100%
effortisyoudoingexactlywhatyoushouldhave
beendoing,whatpercentagedidyouactuallydo?”
– 95%oftheQme,thisworks!
– Fortheother5%,youhavetouseyourbestjudgement
32
Tapestry2016
Assessment
• Forotherclassassessments,Idonotadjust
anything
• Alltests/exams,popquizzes,etc.allstaythe
sameasifitwereasoloprogrammingonly
course
33
Tapestry2016
TheBiggestCost
• Training!• Instructors,TAs,andstudentsneedtobetaughthowtodoeffecQvepairprogrammingin
acontrolledenvironment!
• Thecontrolledenvironmentcouldbeaclosed
laborlecture-labsystem
34
Tapestry2016
Butwedon’thaveaclosedlab?
• CS1:– Assignedpairsnotadvisableiftheydon’tknowthepartnersTrytointroduceinguidedlabs/in-classacQviQesfirst
• CS2:– ProceedwithcauQonforassignedpairsforfirstassignment
– Worksbe`eraperfirstmonthorso
– Atleastbondinlab+someoutsidework
• CS2+:– Aperatleastonepairedclass – BondingsQllbeneficial,outsideworkfine
35
Tapestry2016
GejngInvolved
• InstructorsandTeachingAssistantshavetotakeanacQveroleinlab
– Mustmonitorandapproachpairsiftheyseemto
bedysfuncQonal
– Should"stronglyencourage"driversandnavigatorstoswitch
• Instructorsalsomustunderstandthatsome
pairingsarejustnotgoingtowork
– Don’tletitdiscourageyou!
36
Tapestry2016
HowManyPairingsFail?
37
Class Very compatible
OK Not compatible
CS1 64% 32% 4%
SE-P1 60% 33% 7%
SE-P2 56% 35% 9%
OO 76% 15% 9%
Total 60% 33% 7%
Tapestry2016
ProblemPairs
• Willproblempairshappen?Yes.
• ParQcularcases:– The“Idon’tcare”student– Thespecialneedsstudent– Theabsentstudent– The“liberalartsvs.engineering”student
• Theseproblemsarenotpairprogramming
related,butpairprogrammingcanmakethese
cometothesurfacemoreopen
38
Tapestry2016
GuidelinesToFollow
• Stricttardiness/absencepolicymustbe
followedforpairacQviQestoguardagainstlazy
partners.
– Lossofpartner,points,andbadevaluaQon• TheremustbeareporQngmechanismfor
studentstoprovidefeedbackonpartners
– CATMEorasimpleGoogleForm
– "Ifyoucouldrateyoureffortbasedon100%.."
39
Tapestry2016
GuidelinesToFollow
• Assignmentsshouldbeabitmorechallenging
– "Sopball"assignmentstendtobefinishedbya
singlepersonwithoutconsulQngtheirpartner
• Theenvironmentforpairingmustbeconducive
topairing
40
Tapestry2016
GuidelinesToFollow
• Don’tgooverboard!– EverythinginmoderaQonJ
– Pairingisn’tforeveryassignment
– Theremustbeabalance(inworkandingrade)
41
Tapestry2016
MythsandLegends
• Myth:Halfthestudentswilllearn– "Inthefirstcourse,studentsneedsome)metoabsorbtheideasthemselves."
– "Myinclina)onistoallowmoregroupworkstar)nginthesecondcourse."
– "Wewanttobesurethateachstudentwritesenoughcodehim/herselftolearntheintroductoryconcepts."
– "Iamagainstpair-programminginintroductorycourses,wherestudentsneedtodevelopstrongprogrammingskillsthemselves."
42
Tapestry2016
MythsandLegends
• Infact,allthestudentslearnpre`ywell…– StudiesatNCSUandSDSUshowedthatexam
scoreswerecomparableorimprovedforall
studentsinintroductoryclasses
– Also,thepercentageofstudentswhosegradeinCS2wentdownbyover1/3ofagradedropped
oncepairingwasusedinCS1
Williams,L.,Layman,L.,
LabPartners:IfThey’reGoodEnoughfortheSciences,WhyAren’tTheyGoodEnoughforUs?,
ConferenceonSopwareEngineeringEducaQonandTraining(CSEE&T’07)
43
Tapestry2016
MythsandLegends
• Byfallingforthismyth,you’reperpetuaQng
anotherone
– “AllcomputerscienQstworkbythemselvesin
cubiclesstrugglingtocode.”
• WeallknowthatcreaQngsopwareisHIGHLY
collaboraQve!
• Whygivethewrongimpressioninthefirst
classtheytake!?
44
Tapestry2016
MythsandLegends
• Myth:CheaQngwillincrease– "Withlooserulesaboutwhopartnersare,peoplewilljustpasscodearound.Therehastobestructure!"
– "Oldpartnersmayfeelobligedtohelptheirformerteammates."
45
Tapestry2016
MythsandLegends
• Thinkaboutitali`ledifferently…• Whenweprovidepartners,studentsnowhave
asupportsystemtheycanturnto
– Anecdotalevidencefromstudentsindicatedthat
thestressoffeelingaloneandisolatedmadethem
considercheaQng
• TwopeoplenowhavetoagreeoncheaQng!– Well…thereareexcepQonstothisone…
– Mossandetectorarevaluabletools
46 Tapestry2011
top related