Dev Blog #18: Copy and paste and oh God kill it with fire.

In preparation for the Doctree video I sat down day before yesterday to implement copy/paste. Everything else was going fine: Doctree diagrams were working, filtering by event type was working, showing an individual note's history was working.

Just copy/paste to go.

It took until last night for me to grasp the full horror of the situation, and until just now for my wife to plot a course through it.

Copy/paste is not normally a big deal. You stick a copy of what's selected in a clipboard, and then you copy it back out into the document. Easy.

But wait: in Davenport the things on the screen are VIEWS of notes; when you copy and paste them it's generally in order to create a second view of the same note somewhere else. Uh. Unless it isn't. Hmm.

Then factor in Doctree. Without giving too much away, Doctree allows you to visit any prior stage of your document's development - and to start editing afresh from there, essentially creating a new "trouser of time". Suppose you do that, and then decide to copy across some of the work you did down the first pant-leg. Some of those notes you copy might be "new", and some might also exist down the second pant-leg.

What exactly should be overwritten, and what created afresh? What if there's no view of a particular note in the place you're posting, but there is elsewhere? The user is going to think she's gone insane or that the software is broken if things start changing out of her sight.

Now factor in drawers. If I copy an old version of a drawer and paste it into the most recent version, just what exactly am I saying I want to happen? Replace the content? Duplicate the content? Try to merge it? What about the drawers inside THAT drawer? What if I end up with six copies of something there's only supposed to be one of - and I don't even realise because they look pretty much the same! What if I start visiting what I think is the same place via different drawers, and end up with all my hard work strewn across canvases I don't even know how to find?

I got halfway through a system that presents the user with branching drawer options when she hits paste before realising nobody would ever in a million years know which options to pick. Or use the app twice.

Eventually I uncurled, took my thumb from my mouth, left the airing cupboard and went and talked to my wife, Jackie. It's a good idea; I recommend it to anyone.

The answer was to be found in a second perspective - figuratively and literally:

"Well, what I'd want to do is look at the old and new side by side and decide what to pull across."

Of COURSE that's what you would want to do. Individual copy and paste operations need to be simple, conservative and predictable - all the user needs is the ability to split the view in half, and she can work methodically through the drawers she wants to transfer. Anything the two views don't have in common at all will be pasted as new notes. Anything that's identical will be pasted as a new view of the existing note or drawer. And anything where there's a conflict will be pasted as a new note but HIGHLIGHTED as a conflict, with the user then able to choose how to resolve it at leisure (if you've ever used version control software, resolving conflicts will be familiar territory).

Did I ever mention how much smarter my wife is than I am?

Comments

Popular Posts