[racket-dev] stepper UI question

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Aug 26 10:25:56 EDT 2010

You could have things always be in "run" mode, but with each value
that prints out you can have a little icon next to it saying "how did
we get here?" which, when clicked, opens up a window showing you the
steps starting from just before that value was printed to after that
value appeared (roughly; you'd probably like this to jump you into the
middle of the entire sequence of steps that have happened, but you'd
also like the UI to not confuse for that case).

I'm also thinking that the stepper window should look more like
Redex's stepper window with a left-to-right scrolling thing as the
main window (showing all the steps) and an overview along the bottom
that lets you jump around. Probably that overview window would be more
featureful in the stepper case than in the redex case, tho.

In general, as a cautionary note: changing the way the
definitions/interactions windows works requires lots and lots of
careful programming, since there are lots of state-based invariants
associated with those windows. I'm not saying it can't be done, but I
am saying that if you don't need to do it (say with something like the
above) then you will save yourself lots of time.

Robby

On Thu, Aug 26, 2010 at 9:17 AM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> 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
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev
>


Posted on the dev mailing list.