1 Tutorial T4 - Programming by Example Techniques Brad A. Myers Brad A. Myers Human Computer Interaction Institute School of Computer Science Carnegie.

Slides:



Advertisements
Similar presentations
Chapter 11 Designing the User Interface
Advertisements

Lecture 16: Demonstrational Tools Brad Myers Advanced User Interface Software 1© Brad Myers.
Software Development Languages and Environments. Programming languages High level languages are problem orientated contain many English words are easier.
Tutorial 8: Developing an Excel Application
Tutorial 12: Enhancing Excel with Visual Basic for Applications
MULTIMEDIA DEVELOPMENT 4.3 : AUTHORING TOOLS. At the end of the lesson, students should be able to: 1. Describe different types of authoring tools Learning.
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
Introducing Microsoft PowerPoint 2010 John Matthews (ITS)
Lecture 12: Interactive Tools: Prototypers (HyperCard, Director, Visual Basic), Interface Builders, Sketching Tools Brad Myers Advanced User Interface.
Programming by Demonstration Kerry Chang Human-Computer Interaction Institute Carnegie Mellon University D: Human Aspects of Software Development.
Building Whole Applications Using Only Programming-by- Demonstration Richard McDaniel January 14, 1999.
Brad A. Myers, CMU Pilot: Exploratory Programming for Interactive Behaviors: Unleashing Interaction Designers’ Creativity Brad Myers, Stephen Oney, John.
User interface design Designing effective interfaces for software systems Objectives To suggest some general design principles for user interface design.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
1 Lecture 13: Demonstrational Tools Brad Myers Advanced User Interface Software.
Microsoft Office Illustrated Inserting Illustrations, Objects, and Media Clips.
Rapid Prototyping Marti Hearst (UCB SIMS) SIMS 213, UI Design & Development February 25, 1999.
MCT260-Operating Systems I Operating Systems I Interfaces to Operating Systems.
Other Interaction Styles: Direct Manipulation, Haptic, Multimedia, Multimodal, Virtual Reality, Video Games Dr.s Barnes and Leventhal.
Chapter 13: Designing the User Interface
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft PowerPoint 2002 Working with External.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
Programming by Example using Least General Generalizations Mohammad Raza, Sumit Gulwani & Natasa Milic-Frayling Microsoft Research.
Adobe Forms THE FORM ELEMENT PANEL. Creating a form using the Adobe FormsCentral is a quick and easy way to distribute a variety of forms including surveys.
A Visual Language for Sketching Large and Complex Interactive Designs Michael Thomsen University of Aarhus G r o u p f o r User Interface Research University.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
1 Lecture 9: Deep Dive: Selecting and Creating Objects across Different Kinds of Views Brad Myers A/05-499A: Interaction Techniques Spring, 2014.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Introduction to Excel VBA University of Chicago Graduate School of Business Introduction to Computer Based Models Bus Mr. Schrage Spring 2003.
XP New Perspectives on Introducing Microsoft Office XP Tutorial 1 1 Introducing Microsoft Office XP Tutorial 1.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
INTRODUCTION TO FRONTPAGE. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features Features  Starting Front Page Starting Front Page  Components.
CIS—100 Chapter 9—PowerPoint 1. The PowerPoint User Interface 2 There is a tall band across the screen that contains many, very visual commands arranged.
1 SWE 513: Software Engineering Usability II. 2 Usability and Cost Good usability may be expensive in hardware or special software development User interface.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Designing a Graphical User Interface (GUI) Krisana Chinnasarn, Ph.D. January 2007.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Software Project Planning Defining the Project Writing the Software Specification Planning the Development Stages Testing the Software.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
In Business Series © Prentice Hall Microsoft Office Word 2007 In Business Core Chapter 3 Word Document Enhancements.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
The Advantage Series © 2004 The McGraw-Hill Companies, Inc. All rights reserved CHAPTER 1 Integrating Office Word and Office Excel.
Introduction to ArcGIS for Environmental Scientists Module 3 – GIS Analysis Model Builder.
Lecture 15: Demonstrational Tools Brad Myers Advanced User Interface Software 1.
C OMPUTING E SSENTIALS Timothy J. O’Leary Linda I. O’Leary Presentations by: Fred Bounds.
1. 2 Word Processing Word Processing is writing words and sentences on the computer. It is easy to change or move text in a word document. People use.
 Given live by a presenter  Played without a presenter on a computer screen or on the Web  Slides provide a way to use text and graphics to introduce.
An Introduction to Forms. The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are.
Copyright © 2006 – Brad A. Myers Answering Why and Why Not Questions in User Interfaces Brad Myers, David A. Weitzman, Andrew J. Ko, and Duen Horng (“Polo”)
The Excel model for information processing The Excel model is a grid of cells in which items of information are stored and processed. Any information that.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
1 Lecture 5: Interactive Tools: Prototypers (HyperCard, Director, Visual Basic), Interface Builders Brad Myers Advanced User Interface Software.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
LCG AA Meeting 30 June 2004 Ilka Antcheva Graphics User Interface in ROOT.
introductionwhyexamples What is a Web site? A web site is: a presentation tool; a way to communicate; a learning tool; a teaching tool; a marketing important.
1. Using word you can create the document and edit them later, as and when required,by adding more text, modifying the existing text, deleting/moving.
Introducing Scratch Learning resources for the implementation of the scenario
1 Chapter 15 Creating a Presentation. Practical Computer Literacy, 2 nd edition Chapter 15 2 What’s inside and on the CD? In this chapter, you will learn.
Programming by Example
Microsoft PowerPoint This is the introduction to PowerPoint.
Lecture 17: Demonstrational Tools
CHAPTER 8 Multimedia Authoring Tools
An Introduction to Computers and Visual Basic
Topic 8: (Last two papers)
An Introduction to Computers and Visual Basic
Brad Myers : Interaction Techniques Spring, 2019
Presentation transcript:

1 Tutorial T4 - Programming by Example Techniques Brad A. Myers Brad A. Myers Human Computer Interaction Institute School of Computer Science Carnegie Mellon University Pittsburgh, PA (412) Brad A. Myers Brad A. Myers Human Computer Interaction Institute School of Computer Science Carnegie Mellon University Pittsburgh, PA (412)

2 Contents: n Abstract & Bio n Slides from Talk n Sources for Further Information n Articles n Early VP & PBE Taxonomy n Demonstrational Interfaces paper n Gamut Paper n Intelligence in Demonstrational Interfaces n Abstract & Bio n Slides from Talk n Sources for Further Information n Articles n Early VP & PBE Taxonomy n Demonstrational Interfaces paper n Gamut Paper n Intelligence in Demonstrational Interfaces

3 Abstract This tutorial covers the broad range of techniques used in programming systems that use "Programming By Example (PBE)." Sometimes called "Programming By Demonstration" or "Demonstrational Interfaces", this refers to systems that allow the user to give examples of the desired behaviors and contents, and the system generalizes from those examples so the result will work in different contexts. Some PBE systems use sophisticated artificial intelligence techniques to generalize, others use simple rule-based heuristics, and still others require the user to perform the generalization. Applications of PBE techniques have been to general- purpose programming, programming of user interfaces, defining animations, creating macros or scripts for text editing, designing business charts, desktop file manipulation, hypertext browsing, programming for kids, etc. The tutorial will include many demonstrations and videos of research and commercial uses of programming-by-example techniques.

4 About the Presenter Brad Myers is a Senior Research Scientist in the Human-Computer Interaction Institute in the School of Computer Science at Carnegie Mellon University, where he is the principal investigator for various projects, including Demonstrational Interfaces, User Interface Software, Natural Programming, and the Pebbles Palm Pilot Project. He and his students have created about a dozen systems that use programming-by- example techniques. He is the author or editor of over 190 publications, including "Creating User Interfaces by Demonstration" and "Languages for Developing User Interfaces," and he is on the editorial board of five journals, including the Journal of Visual Languages and Computing. His research interests include User Interface Development Systems, user interfaces, Programming by Example, programming languages for kids, Visual Programming, interaction techniques, window management, and programming environments. He belongs to SIGCHI, ACM, IEEE Computer Society, IEEE, and Computer Professionals for Social Responsibility. He will also be a keynote speaker for VL'2000.

5 Topics n What is Programming by Example? n Applications of Programming by Example n Overview of PBE Systems n Issues in PBE Systems n User Interfaces for giving examples n User Interface for feedback to show the program n Implementation architectures n What is Programming by Example? n Applications of Programming by Example n Overview of PBE Systems n Issues in PBE Systems n User Interfaces for giving examples n User Interface for feedback to show the program n Implementation architectures

6 What is Programming by Example? n Direct Manipulation allows properties to be set by directly moving objects with the mouse and setting properties n Example: interface builders, Visual Basic n Limited to static parts of the interface n No way to point at objects that will be drawn by the user n How set the color of an object in Visual Basic at run time? n Direct Manipulation allows properties to be set by directly moving objects with the mouse and setting properties n Example: interface builders, Visual Basic n Limited to static parts of the interface n No way to point at objects that will be drawn by the user n How set the color of an object in Visual Basic at run time?

7 Demonstrational Tools n Demonstrational Tools allow the user to operate on example objects which represent objects that are created at run-time. n Size of the boxes depends on labels n Demonstrational systems allow the user to operate on examples, and then generalize to produce a general- purpose procedure or prototype. n Demonstrational Tools allow the user to operate on example objects which represent objects that are created at run-time. n Size of the boxes depends on labels n Demonstrational systems allow the user to operate on examples, and then generalize to produce a general- purpose procedure or prototype. VL’2000 Seattle 2000 IEEE

8 "Examples" n Draw an example of the objects that will be created at run time n Draw objects in approximately the right places, and systems creates general constraints n Give examples of the steps of the algorithm n Draw an example of the objects that will be created at run time n Draw objects in approximately the right places, and systems creates general constraints n Give examples of the steps of the algorithm VL’2000 Seattle 2000 Prototype IEEE

9 Generalization n Is a hard problem, which is why you don't see many commercial products that do this. n Research on: n Algorithms for generalization n “Artificial Intelligence” n User Interfaces to help generalization n Is a hard problem, which is why you don't see many commercial products that do this. n Research on: n Algorithms for generalization n “Artificial Intelligence” n User Interfaces to help generalization

10 Motivations n Bring programming to more people n Automate repetitive tasks n Expand how much of the interface can be specified interactively. n Interactive editors are much faster to use than programming with toolkits n Frameworks improve productivity by factors of 3 to 5, interactive tools by factors of 10 to 50! n It might take an hour to draw an interface interactively, compared to days to program it. n It is much more natural to specify the graphical parts of applications using a graphical editor. n Bring programming to more people n Automate repetitive tasks n Expand how much of the interface can be specified interactively. n Interactive editors are much faster to use than programming with toolkits n Frameworks improve productivity by factors of 3 to 5, interactive tools by factors of 10 to 50! n It might take an hour to draw an interface interactively, compared to days to program it. n It is much more natural to specify the graphical parts of applications using a graphical editor.

11 Example in Emacs n Useful to create scripts for repetitive actions: n Rename all gif files to have OLD at the front of their names n Useful to create scripts for repetitive actions: n Rename all gif files to have OLD at the front of their names archesonly.gif circuitafter.gif circuitbefore.gif emacsrecord.gif generalizeloc.gif generalizeobj.gif heightgen.gif invocationdb.gif leftgen.gif moveselection.gif mv archesonly.gif OLDarchesonly.gif mv circuitafter.gif OLDcircuitafter.gif mv circuitbefore.gif OLDcircuitbefore.gif mv emacsrecord.gif OLDemacsrecord.gif mv generalizeloc.gif OLDgeneralizeloc.gif mv generalizeobj.gif OLDgeneralizeobj.gif mv heightgen.gif OLDheightgen.gif mv invocationdb.gif OLDinvocationdb.gif mv leftgen.gif OLDleftgen.gif mv moveselection.gif OLDmoveselection.gif

12 Example in Microsoft Word The fillparagraphs macro changes RETURNs into spaces, unless there are 2 in a row. Lots of short ¶ lines¶ can be filled and ¶ combined. ¶ ¶ But two RETURNS¶ signal a new ¶ paragraph. ¶ Lots of short lines can be filled and combined.¶ But two RETURNS signal a new para- graph.

13 Applications of Programming by Example n General-purpose programming n Programming for kids n Programming of user interfaces n Creating macros or scripts for text editing n Designing business charts n Desktop file manipulation n Hypertext browsing n General-purpose programming n Programming for kids n Programming of user interfaces n Creating macros or scripts for text editing n Designing business charts n Desktop file manipulation n Hypertext browsing

14 General Issues for All PBE Systems n Amount of Inferencing n None -> Lots n Predictability vs. amount of help n If Inferencing: n Number of examples n Negative Examples n Hints or other help from user n Feedback on the Inferencing n Control structures: loops, conditionals n Variables n How show user the resulting program? n Amount of Inferencing n None -> Lots n Predictability vs. amount of help n If Inferencing: n Number of examples n Negative Examples n Hints or other help from user n Feedback on the Inferencing n Control structures: loops, conditionals n Variables n How show user the resulting program?

15 Overview of Some PBE Systems n Chronological n Bias towards my systems n Easier to get pictures / video! n There are many other systems not covered here n See references n Chronological n Bias towards my systems n Easier to get pictures / video! n There are many other systems not covered here n See references

16 Pygmalion n David C. Smith’s PhD thesis n Watch What I Do, chapter 1. n 1975 in Smalltalk n No inferencing n Work out program using icons and example values n Primary contributions: n Programming with icons n Working out program using examples n General motivation n David C. Smith’s PhD thesis n Watch What I Do, chapter 1. n 1975 in Smalltalk n No inferencing n Work out program using icons and example values n Primary contributions: n Programming with icons n Working out program using examples n General motivation

17 Pygmalion Picture

18 Emacs n R. Stallman, 1987 in Teco, Lisp, C, etc. n Easily record a sequence of keystrokes n No inferencing n Very light-weight and extremely useful n R. Stallman, 1987 in Teco, Lisp, C, etc. n Easily record a sequence of keystrokes n No inferencing n Very light-weight and extremely useful

19 Emacs Example ^x( ^a ^k "mv " ^y " OLD" ^y ^n ^x) ^u1000 ^xe ^x( ^a ^k "mv " ^y " OLD" ^y ^n ^x) ^u1000 ^xe archesonly.gif circuitafter.gif circuitbefore.gif … mv archesonly.gif OLDarchesonly.gif mv circuitafter.gif OLDcircuitafter.gif mv circuitbefore.gif OLDcircuitbefore.gif …

20 Emacs Contributions n Primary contributions: n Clearly demonstrate benefits of macros by example n Quick and easy macro creation for “keyboard macros” n Fully programmable using Lisp for further End-User- Programming (EUP) n Primary contributions: n Clearly demonstrate benefits of macros by example n Quick and easy macro creation for “keyboard macros” n Fully programmable using Lisp for further End-User- Programming (EUP)

21 Rehearsal World n William Finzer and Laura Gould, 1984 in Smalltalk n Watch What I Do, chapter 4. n No inferencing n Metaphor of “actors” on a “stage” n Wings for off-screen computation n PBE by opening an “eye” icon n Primary Contributions: n Stage metaphor: on-stage, wings, etc. n Eye metaphor: for easy controlling of when recording n William Finzer and Laura Gould, 1984 in Smalltalk n Watch What I Do, chapter 4. n No inferencing n Metaphor of “actors” on a “stage” n Wings for off-screen computation n PBE by opening an “eye” icon n Primary Contributions: n Stage metaphor: on-stage, wings, etc. n Eye metaphor: for easy controlling of when recording

22 Rehearsal World Pictures

23 SmallStar n Daniel Halbert, , in Smalltalk n Watch What I Do, chapter 5. n Create programs in the Star office system n Desktop (file) manipulations n No inferencing n Introduced notion of “data descriptions” n Specify what data using dialog boxes n Edit straight-line program to add conditionals and loops n video (6 min) n Daniel Halbert, , in Smalltalk n Watch What I Do, chapter 5. n Create programs in the Star office system n Desktop (file) manipulations n No inferencing n Introduced notion of “data descriptions” n Specify what data using dialog boxes n Edit straight-line program to add conditionals and loops n video (6 min)

24 SmallStar Contributions n Primary contributions n Data descriptions concept and UI n UI Techniques for control structures n Demonstration in a complex environment n Primary contributions n Data descriptions concept and UI n UI Techniques for control structures n Demonstration in a complex environment

25 Peridot n Brad Myers, 1987, in Lisp n Watch What I Do, chapter 6. n Create user interface widgets (buttons, scroll bars) n Inferred: n Graphical constraints among the objects. n Control structures such as iteration over all the items in a menu n How the mouse affects the graphics, such as that the check mark should follow the mouse. n Feedback using question and answer n No representation of the program n video (8 min) n Brad Myers, 1987, in Lisp n Watch What I Do, chapter 6. n Create user interface widgets (buttons, scroll bars) n Inferred: n Graphical constraints among the objects. n Control structures such as iteration over all the items in a menu n How the mouse affects the graphics, such as that the check mark should follow the mouse. n Feedback using question and answer n No representation of the program n video (8 min)

26 Peridot Contributions n Primary Contributions n Inferencing using condition-action rules n Question-and-answer feedback technique shown not successful n Demonstrational technique for graphical positions n Coverage of UI behaviors n Primary Contributions n Inferencing using condition-action rules n Question-and-answer feedback technique shown not successful n Demonstrational technique for graphical positions n Coverage of UI behaviors

27 Eager n Allen Cypher, 1990 in HyperCard n Watch What I Do, chapter 9. n Inferred loops from repeated sequence of actions n Had to match actions and look for generalizations of values n “Anticipatory Feedback” of what it thought the user would do next n User can say “do the rest” n No way to know what the step after would be n Users weren’t comfortable without knowing the stopping condition n video (4 min) n Allen Cypher, 1990 in HyperCard n Watch What I Do, chapter 9. n Inferred loops from repeated sequence of actions n Had to match actions and look for generalizations of values n “Anticipatory Feedback” of what it thought the user would do next n User can say “do the rest” n No way to know what the step after would be n Users weren’t comfortable without knowing the stopping condition n video (4 min)

28 Eager Contributions n Primary Contributions n Anticipatory Feedback n Algorithms for matching actions where parameters differ n Showed that people were not comfortable telling it to go without knowing what it would do and when it would stop. n Primary Contributions n Anticipatory Feedback n Algorithms for matching actions where parameters differ n Showed that people were not comfortable telling it to go without knowing what it would do and when it would stop.

29 Garnet n Brad Myers, in Lisp n Watch What I Do, chapter 10. n User interface development environment n Lapidary: Create UI elements, less inferencing n video (2.5 min) n Contributions: n UI for defining graphical constraints n More sophisticated behaviors by example n Brad Myers, in Lisp n Watch What I Do, chapter 10. n User interface development environment n Lapidary: Create UI elements, less inferencing n video (2.5 min) n Contributions: n UI for defining graphical constraints n More sophisticated behaviors by example

30 Garnet, cont. n C32 n video (2 min) n Contributions: n Simple generalizations on copy-paste n Gilt: Graphical styles for widgets n video (1.5 min) n Contributions: n Extend text metaphor for tabs and n Gilt: transformations of widget values n video (5:15 min) n Contributions: n Inferring parameters of procedures from examples n C32 n video (2 min) n Contributions: n Simple generalizations on copy-paste n Gilt: Graphical styles for widgets n video (1.5 min) n Contributions: n Extend text metaphor for tabs and n Gilt: transformations of widget values n video (5:15 min) n Contributions: n Inferring parameters of procedures from examples

31 Chimera n David Kurlander, 1990, Lisp+C+Postscript n Watch What I Do, chapter 12. n Graphical search and replace n Graphical “comic strip” representation for all actions n Generalization of macros selected from the transcript n Explicit specification of control structures n video (15 min) n David Kurlander, 1990, Lisp+C+Postscript n Watch What I Do, chapter 12. n Graphical search and replace n Graphical “comic strip” representation for all actions n Generalization of macros selected from the transcript n Explicit specification of control structures n video (15 min)

32 Chimera Contributions n Primary Contributions: n Graphical Search and Replace n Inferring more sophisticated constraints from examples n Comic-book metaphor for command history & programs n Editing command history as undo/redo n Primary Contributions: n Graphical Search and Replace n Inferring more sophisticated constraints from examples n Comic-book metaphor for command history & programs n Editing command history as undo/redo

33 DEMO n David A. Wolber and Gene L. Fisher, 1991, 1992 n David A. Wolber and Gene L. Fisher, "Demonstrational Technique for Developing Interfaces with Dynamically Created Objects," Proceedings UIST'91, Nov, 1992, Monterey, CA, pp n Gene L. Fisher, Dale E. Busse, and David A. Wolber, "Adding Rule-Based Reasoning to a Demonstrational Interface Builder," Proceedings UIST'92, Nov, 1991, pp n Create (pieces of) user interfaces n First system to support dynamic creation of objects. n Infers graphical relationships by examples of edits n Only simple relationships provided n No feedback of code n David A. Wolber and Gene L. Fisher, 1991, 1992 n David A. Wolber and Gene L. Fisher, "Demonstrational Technique for Developing Interfaces with Dynamically Created Objects," Proceedings UIST'91, Nov, 1992, Monterey, CA, pp n Gene L. Fisher, Dale E. Busse, and David A. Wolber, "Adding Rule-Based Reasoning to a Demonstrational Interface Builder," Proceedings UIST'92, Nov, 1991, pp n Create (pieces of) user interfaces n First system to support dynamic creation of objects. n Infers graphical relationships by examples of edits n Only simple relationships provided n No feedback of code

34 DEMO Contributions n Primary Contributions n Concept of “Stimulus-Response” programming n Dynamic creation of objects n Primary Contributions n Concept of “Stimulus-Response” programming n Dynamic creation of objects

35 Tourmaline n Brad Myers and Andrew Werth, Lisp, Ness, WordBasic n Watch What I Do, chapter 14. n Infer composite styles for text formatting n E.g., more than one format in the header n Infer roles for each piece of text, and formatting for that role n Infer tables from a drawing n video (7:22 min) n Contributions n Roles n Brad Myers and Andrew Werth, Lisp, Ness, WordBasic n Watch What I Do, chapter 14. n Infer composite styles for text formatting n E.g., more than one format in the header n Infer roles for each piece of text, and formatting for that role n Infer tables from a drawing n video (7:22 min) n Contributions n Roles

36 Marquise n Brad Myers, Rich McDaniel, Dave Kosbie, 1993 in Lisp (part of Garnet) n Myers B., McDaniel, R. and Kosbie, D.. "Marquise: Creating Complete User Interfaces by Demonstration," CHI'94. Amsterdam, Netherlands, April 24-29, pp n Do more by demonstration n just show the way that the interface should operate. n Demonstrate when the behaviors start & feedback n Mouse button does one of 10 things n Demonstrate both behavior and conditions n Built-in support for palettes and modes. n Feedback using sentences with clickable words n video (3 min) n Brad Myers, Rich McDaniel, Dave Kosbie, 1993 in Lisp (part of Garnet) n Myers B., McDaniel, R. and Kosbie, D.. "Marquise: Creating Complete User Interfaces by Demonstration," CHI'94. Amsterdam, Netherlands, April 24-29, pp n Do more by demonstration n just show the way that the interface should operate. n Demonstrate when the behaviors start & feedback n Mouse button does one of 10 things n Demonstrate both behavior and conditions n Built-in support for palettes and modes. n Feedback using sentences with clickable words n video (3 min)

37 Marquise Contributions n Primary Contributions n Four modes n Ability to demonstrate mouse actions by changing modes in the middle using the keyboard n Introduction of icons for “mouse droppings” n Demonstration that text with pop-up embedded menus was not a great idea n Primary Contributions n Four modes n Ability to demonstrate mouse actions by changing modes in the middle using the keyboard n Introduction of icons for “mouse droppings” n Demonstration that text with pop-up embedded menus was not a great idea

38 Pursuit n Francemary Modugno, in Lisp n Watch What I Do, chapter 20. n Generalize desktop programs n Inferred generalizations of data descriptions n Comic book representation for programs n video (6:43 min) n Francemary Modugno, in Lisp n Watch What I Do, chapter 20. n Generalize desktop programs n Inferred generalizations of data descriptions n Comic book representation for programs n video (6:43 min)

39 Pursuit Contributions n Primary Contributions n Generalizing the comic-strip metaphor n Handling of errors, pop-ups in the macro n Meta-dialog boxes n Showing the importance of the representation for the program n Primary Contributions n Generalizing the comic-strip metaphor n Handling of errors, pop-ups in the macro n Meta-dialog boxes n Showing the importance of the representation for the program

40 Gold n Brad Myers, 1994 in Lisp n CHI’94, pp n Generalize business charts n Give one or two examples of desired elements n video (7:00 min) n Primary Contributions: n Generalizing graphics with no “program” n Feedback and editing by labeling n Handling of special items n Brad Myers, 1994 in Lisp n CHI’94, pp n Generalize business charts n Give one or two examples of desired elements n video (7:00 min) n Primary Contributions: n Generalizing graphics with no “program” n Feedback and editing by labeling n Handling of special items

41 InferenceBear & Grizzly Bear n Martin Frank, n Martin Frank and Jim Foley, "Model-Based User Interface Design by Example and By Interview,” UIST'93. Atlanta, GA, Nov. 3-5, 1993, pp n Create UIs by demonstration and direct edit n User control through dialog boxes, edit using textual language: EET n First UI builder with multiple examples n Snapshots of before and after n Multiple examples n Add more positive examples to cause generalization n Negative examples to specify exceptions n Martin Frank, n Martin Frank and Jim Foley, "Model-Based User Interface Design by Example and By Interview,” UIST'93. Atlanta, GA, Nov. 3-5, 1993, pp n Create UIs by demonstration and direct edit n User control through dialog boxes, edit using textual language: EET n First UI builder with multiple examples n Snapshots of before and after n Multiple examples n Add more positive examples to cause generalization n Negative examples to specify exceptions

42 InferenceBear & Grizzly Bear

43 InferenceBear Pictures

44 InferenceBear Contributions n Primary Contributions n Inferencing algorithm which can handle linear equations n Use of negative examples n Studies showing negative examples are difficult n Primary Contributions n Inferencing algorithm which can handle linear equations n Use of negative examples n Studies showing negative examples are difficult

45 Pavlov n David Wolber, 1995-present n David Wolber, "Pavlov: Programming by Stimulus-Response Demonstration," CHI'96. April pp n Single positive example n Little generalization n Score editor for feedback and editing n Stimulus from mouse or time-based n video n David Wolber, 1995-present n David Wolber, "Pavlov: Programming by Stimulus-Response Demonstration," CHI'96. April pp n Single positive example n Little generalization n Score editor for feedback and editing n Stimulus from mouse or time-based n video

46 Pavlov Contributions n Primary Contributions n Score editor as representation n Mouse-based stimulus n Primary Contributions n Score editor as representation n Mouse-based stimulus

47 StageCast Creator n (formerly called KidSim, Cocoa) n Allen Cypher & David C. Smith;1994-present n n Formerly research at Apple, now commercial company: n Create animations and rough simulations n Program using before and after pictures n Can add additional control to rules n No automatic generalization n Video – on computer (3 min) n (formerly called KidSim, Cocoa) n Allen Cypher & David C. Smith;1994-present n n Formerly research at Apple, now commercial company: n Create animations and rough simulations n Program using before and after pictures n Can add additional control to rules n No automatic generalization n Video – on computer (3 min)

48 StageCast Contributions n Primary Contributions n Before-After rules by example n Grouping of rules into sets: n Random ordered, first to succeed n Bringing PBD to wider audience n Primary Contributions n Before-After rules by example n Grouping of rules into sets: n Random ordered, first to succeed n Bringing PBD to wider audience

49 Gamut n Rich McDaniel, n R.G. McDaniel and B.A. Myers, "Getting More Out Of Programming-By- Demonstration.” CHI'99. Pittsburgh, PA, May 15-20, pp n Domain: "board games" and educational software n Goal: new interaction techniques so can infer more complex behaviors n E.g., how a piece can move in Monopoly / Chess n Reduce number of modes in UI n “Do Something”, “Stop That” n New interaction techniques to provide hints n Better inferencing algorithms n video (4:19 min) n Rich McDaniel, n R.G. McDaniel and B.A. Myers, "Getting More Out Of Programming-By- Demonstration.” CHI'99. Pittsburgh, PA, May 15-20, pp n Domain: "board games" and educational software n Goal: new interaction techniques so can infer more complex behaviors n E.g., how a piece can move in Monopoly / Chess n Reduce number of modes in UI n “Do Something”, “Stop That” n New interaction techniques to provide hints n Better inferencing algorithms n video (4:19 min)

50 Gamut Contributions n Primary Contributions n UI techniques for positive and negative examples that reduce modes n Hints by asking to highlight n Most powerful inferencing algorithm n Most ambitious coverage by inference n Primary Contributions n UI techniques for positive and negative examples that reduce modes n Hints by asking to highlight n Most powerful inferencing algorithm n Most ambitious coverage by inference

51 Topaz n Brad Myers, 1998, part of Amulet in C++ n B.A. Myers. "Scripting Graphical Applications by Demonstration," CHI'98. Los Angeles, CA, April 18-23, pp n Move Emacs techniques to graphical editing n Move selection like a cursor n Generalizations using dialog boxes n video (3:00 min) n Brad Myers, 1998, part of Amulet in C++ n B.A. Myers. "Scripting Graphical Applications by Demonstration," CHI'98. Los Angeles, CA, April 18-23, pp n Move Emacs techniques to graphical editing n Move selection like a cursor n Generalizations using dialog boxes n video (3:00 min)

52 Topaz Contributions n Primary Contributions n Scripted macros for graphics like have for text n Moving graphics selection like text cursor n Dialog boxes for generations of position n Primary Contributions n Scripted macros for graphics like have for text n Moving graphics selection like text cursor n Dialog boxes for generations of position

53 General Themes n User Interface for Giving Examples n UI for feedback of Programs n Implementation n User Interface for Giving Examples n UI for feedback of Programs n Implementation

54 User Interface for Giving Examples n Issue of Modes n Hints to help with inferencing n One versus multiple examples n How specify negative examples n Issue of Modes n Hints to help with inferencing n One versus multiple examples n How specify negative examples

55 User Interface for Feedback of Program n None (Peridot, Gamut, etc.) n “Real” Code (Visual Basic for Word) n Special languages n EET language for InferenceBear n Comic strip languages (Chimera, Pursuit) n “Score” (time-line) view (Pavlov) n Before-after rules (Stagecast) n How edit the resulting program? n Many only support: give up and start over n None (Peridot, Gamut, etc.) n “Real” Code (Visual Basic for Word) n Special languages n EET language for InferenceBear n Comic strip languages (Chimera, Pursuit) n “Score” (time-line) view (Pavlov) n Before-after rules (Stagecast) n How edit the resulting program? n Many only support: give up and start over

56 Example in Microsoft Word The fillparagraphs macro changes RETURNs into spaces, unless there are 2 in a row. Lots of short ¶ lines¶ can be filled and ¶ combined. ¶ ¶ But two RETURNS¶ signal a new ¶ paragraph. ¶ Lots of short lines can be filled and combined.¶ But two RETURNS signal a new para- graph.

57 Word Visual Basic code n For “fillparagraphs” (removes RETURNS unless there are 2 in a row) Public Sub MAIN() WordBasic.EditReplace Find:="^p^p", Replace:="%$%", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1, Format:=0, Wrap:=0 WordBasic.EditReplace Find:="^p", Replace:=" ", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1, Format:=0, Wrap:=0 WordBasic.EditReplace Find:="%$%", Replace:="^p", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1, Format:=0, Wrap:=0 End Sub n For “fillparagraphs” (removes RETURNS unless there are 2 in a row) Public Sub MAIN() WordBasic.EditReplace Find:="^p^p", Replace:="%$%", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1, Format:=0, Wrap:=0 WordBasic.EditReplace Find:="^p", Replace:=" ", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1, Format:=0, Wrap:=0 WordBasic.EditReplace Find:="%$%", Replace:="^p", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1, Format:=0, Wrap:=0 End Sub

58 Implementation n Techniques for implementing PBE n Especially for inferencing n Rule-based heuristics n More sophisticated AI algorithms n Pattern matching n Decision trees n Techniques for implementing PBE n Especially for inferencing n Rule-based heuristics n More sophisticated AI algorithms n Pattern matching n Decision trees

59 Conclusions n PBE techniques are powerful but still “researchy” n Many exciting research questions n A community of researchers addressing them n Some commercial applications now n Increasing as computers get “smarter” n PBE techniques are powerful but still “researchy” n Many exciting research questions n A community of researchers addressing them n Some commercial applications now n Increasing as computers get “smarter”

60 Sources for Further Information n Special issue of Communications of the ACM on Programming by Example: March, vol. 43, no. 3. n WWW home page for programming by example: n Watch What I Do, edited by Allen Cypher, co-edited by Daniel C. Halbert, David Kurlander, Henry Lieberman, David Maulsby, Brad A. Myers, and Alan Turransky, The MIT Press, Cambridge, Massachusetts. n New book, next year: Henry Lieberman, ed. Your Wish is My Command. 2001: Morgan Kaufmann n Special issue of Communications of the ACM on Programming by Example: March, vol. 43, no. 3. n WWW home page for programming by example: n Watch What I Do, edited by Allen Cypher, co-edited by Daniel C. Halbert, David Kurlander, Henry Lieberman, David Maulsby, Brad A. Myers, and Alan Turransky, The MIT Press, Cambridge, Massachusetts. n New book, next year: Henry Lieberman, ed. Your Wish is My Command. 2001: Morgan Kaufmann