Upload
others
View
10
Download
0
Embed Size (px)
Citation preview
EnablingData-DrivenAPIDesignwithCommunityUsageData:ANeed-FindingStudy
Tianyi Zhang1,Björn Hartmann2,Miryung Kim3,ElenaGlassman11HarvardUniversity2UCBerkeley3UCLA
APIsareubiquitous
WebAPIs SDKs Frameworks&libraries
…
APIsareaprimaryinterfacebetweenprogrammersandcomputers
Programmer ComputerAPIs
Human-CenteredAPIDesign
• ApplyHCImethodstoAPIdesign,
e.g.,A/Btesting[1,2,3]
• Butitiscostly.
• ToomanyAPIsandusagescenarios
• Participantrecruitment
1. Ellis et al. The factory pattern in API design: A usability evaluation. ICSE 20072. Stylos et al. A case study of API design for improved usability. VL/HCC 2008.3. Stylos et al. The implications of method placement on API learnability. FSE 2008.
AlotofAPIusagedatahasbeengeneratedfromprogrammercommunities…
HowcanweleveragecommunitydatatoinformbetterAPIdesign?
Contributions
• Semi-structuredinterviewswith23APIdesigners
• Anin-depthanalysisoftheirdesignstyles,usabilityevaluation
methodsinpractice,andunmetinformationneeds
• SeveraltooldesignimplicationsforleveragingcommunityAPIusage
datatoinformAPIdesign
Interviewwith23APIDesigners
Alloy Partisan
6
6
11
WebAPIs DSLs Libraries
10
11
2
LargeTechCompanies Academia Open-source
InterviewQuestions
• Whatdesigndecisions andtradeoffshaveyoumade?
• Howdoyouevaluate theusabilityofyourAPIs?
• Whatchallengesandfrustrations doyouhave?
• Whatinformation wouldyouliketodiscover?
• Whattoolsupport doyouneed?
Finding1.DesignerSpectrum
User-driven Self-driven Visionary Closed-world
User-DrivenAPIDesigner
• User-centereddesignprocess
• Surveyuserneeds
• APIstability
Self-DrivenAPIDesigner
• Maketheirowndecisions
• Cleargoalsandpriorities
• APIexpressiveness&
extensibility
VisionaryAPIDesigner
• Lackcommunicationchannels
tousers
• Designwithimaginedusecases
• EagertoknowAPIusageinthe
wild
Closed-WorldAPIDesigner
• APIsusedinternallyinacompany
• Workcloselywithallstakeholders
• LeasttensionbetweenAPI
designersandusers
Finding1.DesignerSpectrum
Theyallacknowledgedtheimportanceofkeepingusersinmind.
User-driven Self-driven Visionary Closed-world
Finding2.UsabilityEvaluationMethods
Finding3.UnmetInformationNeeds
Finding3.UnmetInformationNeeds
P13:“I’dliketolookattheircodeandseeiftheywritecodeintheidealwaywewantthemtowrite.BecauseeveryAPIhasitsownpurposewhenthey’rebeingdesigned,andwehavesomeusecasesinmind.Ifnot,we’llprobablythinkifthisAPIisdesignedinaproperwayorweshouldcreatesomemoreobviousAPIstodealwiththiscase.”
Finding3.UnmetInformationNeeds
Finding3.UnmetInformationNeeds
P6:“Iwanttogetwhatpeoplearethinking,notjustwhethertheyareabletousethisAPI,likethat’swhatyouwouldgetfromlikeminingGitHubrepos.Butwhatyouarenotgettingislikethispersonstillspentthreehoursgoogling howtousethisAPI,andhespentanhouronStackOverflowtryingtofigureoutwhatwasgoingon,intheend,hegotthat,butitwasafrustratingattempt.”
Finding3.UnmetInformationNeeds
Finding3.UnmetInformationNeeds
Finding4.OpportunitiesforToolSupport
• MiningandvisualizingAPIusagemistakes
• Interactivelyanalyzingpopulation-levelAPIusage
• AdaptingelicitationmechanismstounderstandAPIusers’mental
models
• ExploringthedesignspaceofsimilarAPIs
• LiveAPIdocumentation
MiningandVisualizingDocumented Mistakes
CapturingUndocumented LearningBarriers
• Participants suspectalotofissueswerenotreportedatall.
P9:“IthinkthepeoplethatusetheAPIwithnopriorexperience perhapshitthewallquickly.That’stherealissue.Butforthemostpart,I suspectthatImissedmostoftheeasyproblems goingonthere becausetheydon’tconveythatfirstbarrier withtheirremote communication.”
CapturingUndocumented LearningBarriers
• Compilation/runtimeerrorsaregoodindicatorsofundocumentedlearningbarriers.
Conclusion
• APIdesignersdesiretohaveaholisticviewofrealAPIusecases.
• Suchrealusecasesaregatheredinaninformalwayduetoalackof
toolsupport.
• NewinteractivesystemsareneededtodistillavarietyofAPIusage
insightsfromcommunitydata.