150 likes | 277 Views
Studying Development and Debugging To Help Create a Better Programming Environment. Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School of Computer Science Carnegie Mellon University http://www.cs.cmu.edu/~bam bam@cs.cmu.edu. Presenters: Brad A. Myers.
E N D
Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School of Computer Science Carnegie Mellon University http://www.cs.cmu.edu/~bam bam@cs.cmu.edu
Presenters: Brad A. Myers • 18 years of work on Programming by Demonstration • Peridot, Lapidary, Tourmaline, Gold, Marquise, Gamut, Turquoise, Topaz • See: http://www.cs.cmu.edu/~bam/acronyms.html • 8 years of work on “Natural Programming”
Presenters: Andrew J. Ko • Worked with Forms/3 at Oregon State as an undergraduate under Margaret Burnett • Now working on the Natural Programming Project under Brad Myers • Currently • Studying programming errors • Designing a programming environment that prevents and helps debug errors common in Alice, a 3D end-user programming system • http://www.cs.cmu.edu/~ajko
Natural Programming Project • Make programming easier and more correct by making it more natural • Closer to the way that people think about algorithms and solving their tasks • Methodology • Perform studies to inform design • Provide data about what people do and think • Guide the designs from the data • Evaluate results
Why Would Being Natural be Good? • Language should be close to user’s plan • “Programming is the process of transforming a mental plan into one that is compatible with the computer.” — Jean-Michel Hoc • Directness (as in “Direct Manipulation”) • “Distance between one's goals and the actions required by the system to achieve those goals.”— Hutchins, Hollan and Norman • Closeness of mapping • "The closer the programming world is to the problem world, the easier the problem-solving ought to be.… Conventional textual languages are a long way from that goal." — Green and Petre
Visual Basic LabView C Programming C Programming StagecastCreator Basic Gentle Slope Systems Programming in C++ MFC DifficultyofUse Goal Program Complexity and Sophistication
Earlier Natural Programming Studies • PhD work of John Pane • How people naturally express programming concepts and algorithms 1) Nine scenes from PacMan 2) Transforming and calculating data in a spreadsheet • Specific issues of language design 3) Selecting specific objects from a group (“and”, “or”, “not”) • Lots of interesting results • Led to the design of HANDS
New Language and System: HANDS • Video
New Work: Improving the Environment • Use same methods to improve creating and debugging programs • Working with Randy Pausch’s ALICE environment • PhD work ofAndrew Ko
Guidelines for Designing End-User Programming Environments • HCI design heuristics provide general guidelines • But EUD design tends to be task-, domain-, and even highly user-specific • Green’s Cognitive Dimensions provides very useful design vocabulary for notations • What about the rest of the programming environment?
What is “the rest of the programming environment?” • In our recent study of Alice, 50% of programmers’ time was spent debugging • Errors were not difficult to debug, but took time and were frustrating • This is despite the fact that: • The task was relatively simple • Alice prevents syntax, type, and reference errors • How much time is spent debugging in other end-user programming systems?
A Model of Programming Errors • In order to design environments to prevent errors, we need to know their causes • Our recently developed model of errors blames: • Knowledge problems • Lack of knowledge, incorrect recall, forgetting • Attentional problems • Fixation, working memory strain • Strategic problems • Unforeseen interactions, goal conflicts, bounded rationality • …and suggests many categories of programming actions and artifacts
Using the Model for Design • Used the model to analyze errors observed in Alice • User studies of novices and experts with Alice • Observed problems with modification, concurrency, etc. • Model ties errors to causes • Data guides future designs • New tools and techniques to prevent errors • E.g., Smart cut-and-paste • New tools to help people debug sources of errors • E.g., Time-line visualization
Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School of Computer Science Carnegie Mellon University http://www.cs.cmu.edu/~bam bam@cs.cmu.edu Thank You!