Towards a better undo

January 24, 2009

Here is my growing theory: current versions of 'undo' functionality generally aren't all that good. Having any undo is a lot better than none, and having multi-level undo is a lot better than only a single level of it (to the point where it's hard for me to consider single level undo as 'undo' any more), but this is a long way from being really useful.

(The problem with single-level undo are hopefully obvious: it's only useful if you immediately realize your mistake. In practice this is unlikely to be the case, especially if the user is an expert with your program who is thus not constantly checking their work.)

The problem with multi-level undo for me is that it doesn't really do what I want to do. If I am going back more than a little bit, I generally don't want to actually reverse my changes; instead, what I want is to go back to look at an old version and maybe cherry-pick some things that I like from it. At the extreme, I want to branch my work in order to experiment with several alternatives. This is especially common with code, where I can often wind up doing experimental rewrites of routines or interfaces or the like (and sometimes the rewrites don't work out and I revert them).

Partly I think that this is an issue of bad interfaces; even with a 'redo', action by action undo makes moving back and forth significantly awkward, for example. I would probably be better served by an interface that has a time based slider (or just an older/newer slider in general). The ability to set marker points and jump back to them would be nice, too, as would the ability to see an old version and the current version at once (to make for easy cherry-picking and the like).

(You need a slider because I am only somewhat more likely to remember how many minutes ago the program looked right as I am to remember how many operations ago that was. A slider gives you a way to directly and rapidly manipulate things to zero in on where you want to be.)


Comments on this page:

From 24.16.57.110 at 2009-01-24 04:48:35:

Photoshop has a "history" pane that I think allows something like this; I don't know, since I've never used it, since I'm too use to undo.

In fact, I think it has a 'history brush' that lets you basically select a moment in history as your "source", and then when you paint in your document, you copy in data from the same geometric position and the earlier point in time. (Again, never used it.)

-- nothings, whose password no longer works. (?)

From 83.145.208.36 at 2009-01-24 15:32:53:

I tend to agree. As an example, Emacs has terrible undo, going back only few lines.

But as you keep using terms such as "branch", perhaps the only real solution is to use a good version control system. While this has always been a truism when it comes to coding, I have recently found the joy of active, repeated 'updating' of repositories (and not necessary committing to them) when using and learning a DCVS. Actually I've thought of writing a wrapper around Emacs' save-command so that each time I hit "C-x C-s", the editor will make a commit to some "junk" local branch.

Cheers,

j.

By cks at 2009-01-24 16:21:55:

One of the problems I see with using a version control system for this is that they require planning ahead, in that you have to realize that you may want to return to a particular point as a branch point and thus push it into the version control system at the time.

Even though I save frequently, I don't always save frequently enough to make 'version control on save' good enough for this. (And I save frequently enough that I'd need some sort of easy rewind interface to navigate the saved versions.)

Written on 24 January 2009.
« The HTML tax (in Python, and in general)
Thinking about what you do with undo »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sat Jan 24 02:18:50 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.