1 studying development and debugging to help create a better programming environment brad a. myers...

15
1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Brad A. Myers and Andrew Ko Human-Computer Interaction Human-Computer Interaction Institute Institute School of Computer Science School of Computer Science Carnegie Mellon University Carnegie Mellon University http://www.cs.cmu.edu/~bam http://www.cs.cmu.edu/~bam [email protected] [email protected]

Post on 19-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

1

Studying Development and Debugging To Help Create a Better Programming Environment

Studying Development and Debugging To Help Create a Better Programming Environment

Brad A. Myers and Andrew KoBrad A. Myers and Andrew KoHuman-Computer Interaction InstituteHuman-Computer Interaction InstituteSchool of Computer ScienceSchool of Computer ScienceCarnegie Mellon UniversityCarnegie Mellon University

http://www.cs.cmu.edu/~bamhttp://www.cs.cmu.edu/[email protected]@cs.cmu.edu

Page 2: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 2

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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”

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”

Page 3: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 3

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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

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

Page 4: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 4

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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

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

Page 5: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 5

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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

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

Page 6: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Gentle Slope Systems

Difficultyof

Use

Goal

Programming in C++

MFC

Program Complexity and Sophistication

C Programming

LabView

Stagecast

Creator

Visual Basic

Basic

C Programming

Page 7: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 7

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

Earlier Natural Programming Studies

PhD work of John Pane How people naturally express programming concepts

and algorithms1) Nine scenes from PacMan

2) Transforming and calculating data in a spreadsheet

Specific issues of language design3) Selecting specific objects from a group (“and”, “or”, “not”)

Lots of interesting results Led to the design of HANDS

PhD work of John Pane How people naturally express programming concepts

and algorithms1) Nine scenes from PacMan

2) Transforming and calculating data in a spreadsheet

Specific issues of language design3) Selecting specific objects from a group (“and”, “or”, “not”)

Lots of interesting results Led to the design of HANDS

Page 8: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 8

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

New Language and System: HANDS

Video

Page 9: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 9

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

New Work: Improving the Environment

Use same methods to improve creating and debugging programs

Working with Randy Pausch’s ALICE environment PhD work of

Andrew Ko

Use same methods to improve creating and debugging programs

Working with Randy Pausch’s ALICE environment PhD work of

Andrew Ko

Page 10: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 10

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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?

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?

Page 11: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 11

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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?

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?

Page 12: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 12

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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

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

Page 13: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School
Page 14: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

Brad Myers and Andy KoBrad Myers and Andy KoCMU - HCI InstituteCMU - HCI Institute 14

CHI’2003 Workshop onCHI’2003 Workshop onPerspectives in End-User DevelopmentPerspectives in End-User Development

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

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

Page 15: 1 Studying Development and Debugging To Help Create a Better Programming Environment Brad A. Myers and Andrew Ko Human-Computer Interaction Institute School

15

Studying Development and Debugging To Help Create a Better Programming Environment

Studying Development and Debugging To Help Create a Better Programming Environment

Brad A. Myers and Andrew KoBrad A. Myers and Andrew KoHuman-Computer Interaction InstituteHuman-Computer Interaction InstituteSchool of Computer ScienceSchool of Computer ScienceCarnegie Mellon UniversityCarnegie Mellon University

http://www.cs.cmu.edu/~bamhttp://www.cs.cmu.edu/[email protected]@cs.cmu.edu