Pair Programming in the Classroom · 2017-06-28 · Pair Programming Definition •"Pair...
Transcript of Pair Programming in the Classroom · 2017-06-28 · Pair Programming Definition •"Pair...
PairProgrammingintheClassroom
MarkSherriffUniversityofVirginia
June28,2017
SomematerialcourtesyofLaurieWilliams,NCSU
Tapestry2016
Tapestry2017
Overview• WhatexactlyisPairProgramming?• TheCaseforPairProgramming• TheCosts• Guidelinesforasuccessfulpairingexperience• MythsandLegends• Resources
2
Tapestry2017
PairProgrammingDefinition• "Pairprogrammingisastyleofprogramminginwhichtwoprogrammersworkside-by-sideatonecomputer,continuouslycollaboratingonthesamedesign,algorithm,code,ortest."– LaurieWilliams
3
Tapestry2017
SlightlyAlteredDefinition• "Pairprogrammingisastyleofprogramminginwhichtwoprogrammersworkside-by-sideatonecomputer,continuouslycollaboratingonthesamedesignoralgorithm."(emphasismine)
• Basicidea:IDE’shelpuscode– peoplehelpusdesign!
4
Tapestry2017
WhyPairProgramming?• Pairprogrammingstudentstendto:
– Makeitthroughthefirstclass– Improvesretention– Increasesprogrammingconfidence– Performcomparablyorbetteronexamsandprojects
– Performjustfineinfuturesoloprogramming– Helpcreatepeergroups
5
Tapestry2017
WhyPairProgramming?• Aninstantsupportsystem
– Wehavefoundthatpairingcutsdownonalargenumberofthe"trivial" questions(syntax,assignmentclarification,etc.)andafairnumberofthemorecomplexquestions(debugging,etc.)
– WehavebeenabletoreducethenumberofTAsforsomecourses
– Instructorofficehoursaremuchquieter,andtheinstructorcanspendmoretimewithstudentsthatneedmorehelp
6
Tapestry2017
WhyPairProgramming?• Sometimesitis anumbersgame• Inalabof40students…
– having20pairsmakesiteasierforTAstogettoeveryone
– 20assignmentsareeasier/fastertogradethan40• OurmainCS1coursehasonaverage500studentsasemester…
7
Tapestry2017
TheRoles• TheDriver
– Thepersonwith"control" ofthecomputer– Doesthebulkofthetyping
• TheNavigator– Activelyfollowsalongwiththedriverwithcomments
– Cantakeoveratanytime• Howdoesthistranslatetopairdesign?
8
Tapestry2017
Partnersvs.PairProgramming• HowisPairProgrammingdifferentthanjusthavingpartnerassignments?– Mentalityofhowtoapproachtheassignment
• Partnering:– "YougodothispartandI’llgodothispartandthenwe’ll putitbacktogether."
• PairProgramming:– "Let’sfirstdothisparttogether,thenwe’lltackletherest."
9
Tapestry2017
Partnersvs.PairProgramming• Thedistinctionmatters!• Itmattersto:
– Instructors– TeachingAssistants/Tutors– Students
• Callitframing,perception,spin…whatever• It’sallaboutattitude!
10
Tapestry2017
It’sAllAboutAttitude• Howdoyougettheattitudegoing?• HowdoIstartusingpairprogramming?• Thingstoconsider:
– TeachingtheTechnique– Assignments– PairCreation– PairEvaluation– Assessment
11
Tapestry2017
TeachingtheTechnique• Startwiththeinstructionalstaff• PairprogrammingHAStobeincorporatedintotheclass(orlab)insomestructuredway
• Studentsdonotnaturallyworkasa“pair”whengivena“partner”
• Whathappenswhenyoutellstudentstheycanworkwitha“partner”?
12
Tapestry2017
TeachingtheTechnique• Theenvironmentmatters!
13
Tapestry2017
TeachingtheTechnique• Whatareyouactuallyteachingthemtodo?• 1.Taketurnsbeingtheonecoding(“driver”)• 2.Whoeverisnotcoding,commentactively• 3.Whoeveriscoding,talkthroughwhatyouaredoing
• 4.Switchatregularintervals• 5.Nothingisdoneindependentlyfromtheotherpartner
14
Tapestry2017
TeachingtheTechnique• Switchingrolescanbeproblematics• Someideas:
– Goaroundandtappeopleontheshoulder– Haveaaudiocue– Haveavisualcue
• Trytoenforceevenrolesasmuchaspossible• Trytoenforceno“splittingupwork”asmuchaspossible
15
Tapestry2017
Assignments• DoIhavetototallychangemycoursematerialtodopairprogramming?
• Answer:Probablynot,butsomechangesmightmakethingsgobetter
16
Tapestry2017
Assignments• Biggestproblem:assignmentscope• Ifyouuseyourcurrentassignmentswithnomodificationatall,it’spossiblethatnoswitchingwilloccurand/orthepointofpairingwon’tbeobvious
• Example:ConvertFahrenheittoCelsius• CounterArgument:Twonoviceslearningtogetherfromtheverybeginningcouldhelpwithself-confidence
17
Tapestry2017
Assignments• Iftheassignmentscopeistoolargeorifthereisanobvious“splitpoint”,divideandconquerbecomesmoretempting
• Example:WriteaStudentandCourseclassthatworktogethertokeepupwithcourseenrollment
18
Tapestry2017
Assignments• AnassignmentIlikeforpairprogramming:• EmailHunt
– Givenawebsitethathasabunchofemailaddressesonit,writeaprogramthatcanreadthewebsiteandextracttheemailaddresses
– http://cs1110.cs.virginia.edu/emails.html• ThingsIlike:
– Noonewaytodoit(infact,ittakesmorethanoneideatogetalltheemailsout)
– Allowsforsomecreativity19
Tapestry2017
PairCreation• Howdoyoucreatepartners?• Bigphilosophicquestion:
– Doyouassignpartnersordoyouletstudentspicktheirownpartners?
– Advantagesanddisadvantagestoboth
20
Tapestry2017
PairCreation– AssignedPairs• Howcanyouassignpairs?
– Randomly– Basedonprogrammingexperience/confidence– Personality/friendships– Otherinterests/surveyresults
21
Tapestry2017
PairCreation– AssignedPairs• Randomly
– Easiesttosetup– Goodifyouhavenootherinformationtoworkfrom
– Haspotentialtoleadtoproblems(butnotasmanyasyoumightthink)
– Consider“randomwithreplacement”forsubsequentassignments(noonecanworkwithsamepersontwice)
22
Tapestry2017
PairCreation– AssignedPairs• Basedonprogrammingexperience/confidence– Researchindicatesthishasthehighestlikelihoodofproducinggoodpartnerships
– Hardtosetupuntilyouhavedata– Eventhen,itcanbedifficultbecauseresearchshowsthatperception ofpartner’sability(notactualability)isahigherindicatorofagoodmatch
23
Tapestry2017
PairCreation– AssignedPairs• Personality/Friendships
– Mostlikelytohavethefewestpersonalityconflicts– Enforcingcliques
• Othersurveyresults– Ihaven’tusedanythingelse,butcouldimagineusingthingslike:• Schedule• Outsideinterests• Commonfriends
24
Tapestry2017
PairCreation– Self-SelectedPairs• Self-selectedpairsoftenhaveelementsoftheassignedpairingswithsimilarexperienceandfriendships
• Soithassimilarbenefitsanddrawbacks• However,youHAVEtomonitorcloselyforthe“laststudentpicked”problem
• Probablyshouldenforcereplacementforlaterassignments
25
Tapestry2017
PairReplacement• Reassignseveraltimespersemester• Goodforstudents
– Gettomeetnewpeople,learnaboutworkingwithnewpeople
– Iftheydon’tliketheirpartner,theyknowtheywillgetanewonesoon
• Goodforinstructor– Multipleformsoffeedback– Naturalhandlingofdysfunctionalpairs
26
Tapestry2017
PairManagementandEvaluation• Auto-AssignPairCreation
– CATME– http://www.catme.org– Dataneededtoauto-createpairsvaries
• Self-ReportedPairs– GoogleForms
27
Tapestry2017
PairEval
28
Tapestry2017
PairEval
29
Tapestry2017
PairEvaluation• Withorwithoutatool,itboilsdowntoafewquestions:– Didthepairgetalong?– Didyougettheworkdone?– Doyoufeellikeyou“didyourfairshare?”
• Moredataisnice/interesting,butthisisallyoureallyneed
• Reliablefeedbacksystemisneeded(bothforyouandthestudents)
30
Tapestry2017
PairEvaluation• NCWITresourceshavesurveysyoucanuse!• Exampleinyourpacket• http://www.ncwit.org/pairprogramming
31
Tapestry2017
PairEvaluationandAssessment• Ifthere’snoproblem…thengreat!• Ifthereis…
– Ifpossible,askthestudentsoneatatime:“If100%effortisyoudoingexactlywhatyoushouldhavebeendoing,whatpercentagedidyouactuallydo?”
– 95%ofthetime,thisworks!– Fortheother5%,youhavetouseyourbestjudgement
32
Tapestry2017
Assessment• Forotherclassassessments,Idonotadjustanything
• Alltests/exams,popquizzes,etc.allstaythesameasifitwereasoloprogrammingonlycourse
33
Tapestry2017
TheBiggestCost• Training!• Instructors,TAs,andstudents needtobetaughthowtodoeffectivepairprogramminginacontrolledenvironment!
• Thecontrolledenvironmentcouldbeaclosedlaborlecture-labsystem
34
Tapestry2017
Butwedon’thaveaclosedlab?• CS1:
– Assignedpairsnotadvisableiftheydon’tknowthepartnersTrytointroduceinguidedlabs/in-classactivitiesfirst
• CS2:– Proceedwithcautionforassignedpairsforfirstassignment– Worksbetterafterfirstmonthorso– Atleastbondinlab+someoutsidework
• CS2+:– Afteratleastonepairedclass– Bondingstillbeneficial,outsideworkfine
35
Tapestry2017
GettingInvolved• InstructorsandTeachingAssistantshavetotakeanactiveroleinlab– Mustmonitorandapproachpairsiftheyseemtobedysfunctional
– Should"stronglyencourage" driversandnavigatorstoswitch
• Instructorsalsomustunderstandthatsomepairingsarejustnotgoingtowork– Don’tletitdiscourageyou!
36
Tapestry2017
HowManyPairingsFail?
37
Class Verycompatible
OK Notcompatible
CS1 64% 32% 4%
SE-P1 60% 33% 7%
SE-P2 56% 35% 9%
OO 76% 15% 9%
Total 60% 33% 7%
Tapestry2017
ProblemPairs• Willproblempairshappen?Yes.• Particularcases:
– The“Idon’tcare”student– Thespecialneedsstudent– Theabsentstudent– The“liberalartsvs.engineering”student
• Theseproblemsarenotpairprogrammingrelated,butpairprogrammingcanmakethesecometothesurfacemoreoften
38
Tapestry2017
GuidelinesToFollow• Stricttardiness/absencepolicymustbefollowedforpairactivitiestoguardagainstlazypartners.– Lossofpartner,points,andbadevaluation
• Theremust beareportingmechanismforstudentstoprovidefeedbackonpartners– CATMEorasimpleGoogleForm– "Ifyoucouldrateyoureffortbasedon100%.."
39
Tapestry2017
GuidelinesToFollow• Assignmentsshouldbeabitmorechallenging
– "Softball" assignmentstendtobefinishedbyasinglepersonwithoutconsultingtheirpartner
• Theenvironmentforpairingmustbeconducivetopairing
40
Tapestry2017
GuidelinesToFollow• Don’tgooverboard!
– EverythinginmoderationJ– Pairingisn’tforeveryassignment– Theremustbeabalance(inworkandingrade)
41
Tapestry2017
MythsandLegends• Myth:Halfthestudentswilllearn
– "Inthefirstcourse,studentsneedsometimetoabsorbtheideasthemselves."
– "Myinclinationistoallowmoregroupworkstartinginthesecondcourse."
– "Wewanttobesurethateachstudentwritesenoughcodehim/herselftolearntheintroductoryconcepts."
– "Iamagainstpair-programminginintroductorycourses,wherestudentsneedtodevelopstrongprogrammingskillsthemselves."
42
Tapestry2017
MythsandLegends• Infact,allthestudentslearnprettywell…
– StudiesatNCSUandSDSUshowedthatexamscoreswerecomparableorimprovedforallstudentsinintroductoryclasses
– Also,thepercentageofstudentswhosegradeinCS2wentdownbyover1/3ofagradedroppedoncepairingwasusedinCS1
Williams,L.,Layman,L.,LabPartners:IfThey’reGoodEnoughfortheSciences,WhyAren’tTheyGoodEnoughforUs?,ConferenceonSoftwareEngineeringEducationandTraining(CSEE&T’07)
43
Tapestry2017
MythsandLegends• Byfallingforthismyth,you’reperpetuatinganotherone– “Allcomputerscientistworkbythemselvesincubiclesstrugglingtocode.”
• WeallknowthatcreatingsoftwareisHIGHLYcollaborative!
• Whygivethewrongimpressioninthefirstclasstheytake!?
44
Tapestry2017
MythsandLegends• Myth:Cheatingwillincrease
– "Withlooserulesaboutwhopartnersare,peoplewilljustpasscodearound.Therehastobestructure!"
– "Oldpartnersmayfeelobligedtohelptheirformerteammates."
45
Tapestry2017
MythsandLegends• Thinkaboutitalittledifferently…• Whenweprovidepartners,studentsnowhaveasupportsystemtheycanturnto– Anecdotalevidencefromstudentsindicatedthatthestressoffeelingaloneandisolatedmadethemconsidercheating
• Twopeoplenowhavetoagreeoncheating!– Well…thereareexceptionstothisone…– Mossandetector arevaluabletools
46 Tapestry2011
Tapestry2017
OtherGuidelinesandMyths• Anyotherstoadd?
47 Tapestry2011
Tapestry2017
Resources• http://www.realsearchgroup.org/pairlearning• http://www.ncwit.org/pairprogramming
• Mypersonalwebsite:http://marksherriff.com
• Myemail:[email protected]
48 Tapestry2011