[racket-dev] stepper UI question

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Thu Aug 26 10:17:45 EDT 2010

Some of us are re-thinking the UI for how the stepper presents itself.
There seem to be a few obvious candidates:

1. Stays the same: ie, click on Step and it opens a new window.
Classical, but perhaps not ideal.

2. Stays entirely in the editor frame, ie, rewrites the source program
itself, with some means of restoring things.  This sounds messy and
undesirable; I'm just listing it for completeness and to express my
opinion that I don't think we should go this way.

3. Works in the Interactions window:

3a. Coarse-grained: When you click Step, it's like Run -- the program
is loaded into Interactions -- but every expression (including any
non-definition in Definitions) is Step'ed rather than Run'ed.
Clicking Run instead gives the present Interactions behavior.

3b. When you click Run, it loads the program into Interactions.  For
each expression you subsequently enter, you get the choice of
run-as-run or run-as-step.

My inclination is toward 3, and others at PLT Day also seemed to
indicate that the Stepper should be "in the REPL".  However, I did not
get a clear sense of whether "in the REPL" meant 3a, 3b, or some other
choice entirely.

Benefits to 3a:

- clarity: once you've made your choice, no confusion
- entering expressions in Interactions is uncomplicated (type an
  expression and hit Enter, no need to indicate choices)
- if you're in a "stepping mode", you don't have to remember to say it
  over and over
- Step button disappears in language levels it can't support

Benefits of 3b:

- doesn't force premature choice
- switching doesn't require entail Step/Run afresh (and thereby
  losing all previous REPL definitions/outputs)

Overall, I personally prefer 3b: postponing decisions is good (people
stress when forced to make a decision, which 3a induces), and by being
able to "turn on" stepping any time they want, people will experiment
with it more, which we want.

The big difficulty I have is in designing the UI.  It seems ideal to
leave Enter to always mean "Run", but what means "Step"?  Complex
keystrokes are hard for some kids; putting things in menus forces
attention away from the active part of the screen; having a button
drag along as you type (sorta' like the EOF button for input-port
input) seems extremely annoying.  I just have no idea.

Shriram


Posted on the dev mailing list.