Monday, June 30, 2008

Extending cut-and-paste: batch-copying from an online bibliography

My last example was of batch-copying items from a report to an email. Here's another batch-copying example.

A person finds an online bibliography of papers on an AI topic they're researching, and wants to note down, in a file in their text editor, several of the papers mentioned. Some of the biolographical entries link to online copies of the papers. They want to note down both the text of the entry and the link (if present).

With a single-item clipboard, noting down the details of a paper would mean copying the text describing it, switching back to the bibliography and then copying the link's URL.

It'd be much simpler if you could copy both those things to the clipboard first, and then switch to the text file. And even better if you could copy those details for all of the papers first, then switch to the text file and paste them all.

Lets look at how much difference it'd make if the person wanted to note down 15 of the papers. Using a single-item clipboard, it'd take 8 operations to copy the details for each paper (and 7 for the last one):

1) copy text of entry
2) switch to text file
3) paste text
4) switch to biblography
5) copy url
6) switch to text file
7) paste url
8) switch from text file to bibliography

(that last step isn't required for the last paper you copy)

So the formula for the number of operations for N papers, with a single-item clipboard, is:

((N - 1) * 8) + 7

if N is 15, that's 119 operations

With a multi-item clipboard, to copy N papers you'd need two copy operations per paper, two paste operations per paper, and one switch from the biblography to the text file:

(N * 4) + 1

for an N of 15, that's 61 operations -- 58 less and almost half the number.

Friday, June 27, 2008

Extending cut-and-paste: Copying link location and other context-menu operations

You can copy the URL of a link on a web-page by right-clicking on it and choosing the 'Copy Link Location' (or whatever it is called in your browser) option on the context-menu.

How could you use mult-item clipboard operations for items you copy in this way? How could you specify where in the clipboard to copy it to, and whether to insert it as a new item there or to replace the existing item there?

Here's how it could work. To insert the URL as the third item in the clipboard, the user could type

     ctrl(+shift) 3 +

and then while still holding down ctrl,

     right-click the link and click 'Copy Link Location'

which is essentially the same set of keystrokes for performing teh same copy operation with some selected text. The difference being that here they don't type the 'c' as they would to copy some text.

Extending cut-and-paste: batch-copying as another motivation for multi-item clipboard

If you want to transfer a batch of items from one context to another, a mult-item clipboard means you don't have to switch back and forth between the two contexts to copy each item.

A computer-network admin might be looking at a network-diagnostics report and want to pull out the names of some of the servers mentioned to put into an email to a colleague about having a look at them.

The report contains various details and statistics about the company's servers. The information is layed out in a table, and the server names are in a particular column. The admin wants to mention three of those servers in an email, so they copy these to the clipboard, then they open an email and paste them into that.

With a single-item clipboard and 3 items to copy, there'd be 5 switches between windows: for the first item, switch to the email and paste it, then for the next two, switching back to the report then back to the email. Whereas with a mult-item clipboard, there'd just be a single switch between windows -- 4 less.

The alternative means to copy the information with a single-item clipboard, would be to select an area of the table that contained the three server names, paste that, then remove all of the extraneous pasted information. It'd depend on the specifics of the situation as to whether this would be quicker or not.

Wednesday, June 25, 2008

Extending cut-and-paste: example two of motivation for mult-item clipboard

My last post looked at a case where it is useful to have multiple clipboard items. Here's another.

There are multiple terms ther user wants to search for within a number of documents, and the editor / word processor only allows them to search for one item at a time.

To make it easier for themselves (and avoid typing errors), the user wants to cut and paste the search terms into the Find dialog box. Within a document they need to individually search for each item, and then they need to repeat this process for each of the other documents.

With a single-item clipboard, then each time they wanted to paste an item again (for searching the next document), they'd have to recopy it into the clipboard.

If there were 3 search terms and 5 documents, then you'd have to add each term to the clipboard 5 times. That is, make 5 copy operations. In total, for all 3 terms, you'd have 15 copy operations for loading them into the clipboard. And remember that each of those 15 copy operations would involve finding an existing copy of that term that you'd stored somewhere already.

With a mult-item clipboard, you'd only need to perform 3 copy operations - that's 12 fewer copy operations and 12 fewer times having to find an existing copy of that term to copy.

In my previous example, I considered the case where a person wants to paste a particular phrase a number of times during the course of writing a document, and they need to perform other cut and paste operations in between each of these. In the present example, you want a multi-item clipboard for essentially the same reason - because you're interleaving other cut and pastes between the pastes of a particular item.

It's just that in this case, all of the items are like this - things that you want to paste multiple times over a period of time, with other cut and paste operations interleaved.

In UNIX, you could perform all of those Finds with a single grep command. Sometimes, though, you want to search the document in a more interactive manner in the editor. It depends on why you want to search for that item - you might want to look for an item then edit it or something surrounding it, for example.

Here's another reason for potentially wanting to search within the editor windows themselves. If you've got those documents all already open, you can directly search within their widow. If they were stored in different directories, and you wanted to grep them, you'd have to spell out those directories in the grep command.

Tuesday, June 24, 2008

Extending cut-and-paste: repeated pastes of an item, interleaved with unrelated cut and paste operations

I want to start looking at why you'd want some of the features I've described (there are still some more features to describe, but I'll get to them later).

Here's a reason for wanting to be able to store up more than one item on the clipboard.

Sometimes you want to paste the same information multiple times, and it may be some time between each paste.

There might be a certain phrase that will need to be included various times in a document you're writing, which you may end up needing to paste five times.

In case like this, in between those pastes you'll want to be able to perform other unrelated cut and paste operations.

If you've only got a single-item clipboard, then each time you peform one of those other cut and paste operations, you'll have to recopy that phrase onto the clipboard before you paste it again.

That means you'll have to either find one of the other instances of the phrase in the document, select it, then copy it. Or you'll have to store a copy of that phrase somewhere like in another document just containing it so you can quickly get it from there.

Monday, June 23, 2008

Extending cut-and-paste: template paste

Imagine that the clipboard contained the the name of a car part and the identifier for that part

     1) black steering wheel
     2) sw_bw07

and that the user wants to put them into a destination document with the name followed by the identifier in brackets, like:

     black steering wheel (sw_bw07)

Rather than just pasting those items in then adding the brackets around the identifier, you could use a template paste to specify you want to paste the first item followed by a space then the second item enclosed in brackets.

Effectively, you'd enter (where an underscore is used to represent a space)

     ctrl(+shift) v t #1_(#2)

the 't' says you want a template paste. Following the 't' is the specification of the template: paste the first item on the clipboard followed by a space, an opening bracket, the second item on the clipboard then a closing bracket.

If you break that up into the the individual keystrokes, what the user actually types is

     ctrl(+shift) v t # 1 _ ( # 2 )

Because the '#' has a special meaning (used to refer to items on the clipboard), if you wanted to include a literal '#' in the text, you'd have to type '\#'.

With paste commands, if you don't specify a specific position on the clipboard the last position is assumed. So to template paste the item in the last clipboard position with brackets on either side of it, you could type

     ctrl(+shift) v t ( # )

That is, you can have an anonymous item reference. It is possible to have multiple anonymous item references. The idea behind how they are parsed is that the further right an item is on the clipboard, the more likely (it's assumed) it is to be more recently entered. And it's assumed you want to fill the '#'s in the template in the order they've been added (that is, from left to right, starting at the position such that the last item in the template is the last item in the clipboard).

So if you had four items on the clipboard and the last two were a part name and a part identifier, and you wanted to paste it like before with the part name followed by a space then the identifier in brackets, you could type

     ctrl(+shift) v t # _ ( # )

The rightmost # is taken as referring to the last item on teh clipboard, and the next rightmost # the second last item on teh clipboard, the third last $ the third last item on the board, and so on. Just specifying the '#' items without explicitly specifying the positions is just a shortcut, and what I've outlined is just my current thinking about how that might best work.

What if the template refers to more items than are in the clipboard? The same principle applies. The missing items are still to be filled in, so they are "more recent". That means that if there are three items in the tempalte

     ctrl(+shift) v t # , _ # ( # )

but only two in the clipboard

then the third template item is still to be filled on. The second item is taken as the second on the clipboard, and the first the first on the clipboard.

then since there are only two items it'd paste

     item1, item2 ()

Handling (the various cases of) anonymous references to clipboard items is really about shortcuts. What I've described is just my current thinking about what'd be the most convenient default behaviour. You'd really need experience with template pastes to see how it was.

I suspect you'd soon enough pick up the way these default cases work. With cut and paste you've got fairly immediate feedback and you can always undo things if it's not what you want.

(You might have picked up that you could implement the functionality of a join paste with a template paste. But I think that the join paste is such a common pattern that it makes sense to have a speicic command for it).

Thursday, June 19, 2008

Extending cut-and-paste: understanding split copies

A multi-item clipboard is a list of items.

On the one hand, items can be individually added to that list


where those items might be taken from different places within the present document, or from within a number of documents.

On the other, multiple items can be added to the list in a single go using a split copy. The items come from a single range of text, which the split copy divides up into individual items, each of which becomes its own item on the clipboard.

It's copying from a list of items in the document to another list of items in the clipboard. These are different types of lists.

The list in the document is an implicit list - the text editor doesn't really know that it exists (it does in some limited ways, like being able to press CTRL+RIGHT_ARROW_KEY to jump to the start of the next word).

The list in the clipboard is an explicit list. Each item is separate, and the operations understand that it's a list of items. The advantage of this is that you can then tell it to paste just the third item, and then later when you need the fourth item, just that.

Both implicit and explicit lists have their own advantages (and disadvantages). Implicit structure allows you to deal with the information in a more fluid way, and explicit structure imposes more rigidity.

Cut-and-paste is for repurposing information, whether for editing what you've got, or for making a new copy of the information in another context. In either case, you're making a copy of the information from a source, and then putting that information back into a destination (which may even be the same place).

It can be useful to take an implicit list and copy it into an explicit list, so then you can repurpose that information as a list of items -- pasting individual items at different times in different contexts, for example.

Split copies allow you to translate between the implicit and explicit.

Wednesday, June 18, 2008

Extending cut-and-paste: split copy

A document might contain a line of text like

     13491, Orange, 2, $50

which can be considered as a sequence of items delimited by ', '.

You could select that text and, with a 'split copy' that specifies the ', ' delimeter, copy each item onto the clipboard as a separate item (in the following, an underscore is used to represent a space):


The clipboard would end up containing four items:

     1) 13491
     2) Orange
     3) 2
     4) $50

Remember that by default when you copy something to the clipboard it replaces the last item on the clipboard list. When you're copying multiple items on the clipboard with a split paste, the first of those items would replace the item currently at the end of the list, and the other items would be inserted after it.

If there were three space separated words in the document and you wanted to them as new items at the of the clipboard list, following what was already there, you could use '+' to do so (again with a space represented by an underscore):


If you wanted to insert the new items starting at a specific position in the clipboard list, like at position 3:


(At this stage I think it should probably be possible for the user to list the position specifier '3' and the '+' in any order - the previous command could also be written as:


but this is something I'll come back to).

If you specified a delimiter that wasn't contained in the selected text, I think the most sensible behavior would be for nothing to be copied to the clipboard (perhaps with a subtle auditory or visual indication of the failure). The most obvious alternative would be for the entire selection to be copied as a single item.

Cool 3D depth effect using animated gifs (images)

Unfortunately image I've uploaded has lost the animation (or somethign like that) - so you'll have to click the picture to see the original images with the 3D effect!

Very cool way of showing 3D depth in images! No doubt would get irritating soon enough, but quite effective. These animated gifs must be made by quickly switching between two stereographic images.

Tuesday, June 17, 2008

Interesting looking building complex in Japan (picture)

Looks interesting from the outside. I'd be interesting to know what it seems like when you're standing within it.

Extending cut-and-paste: joining paste

The user could use a 'joining paste' to paste all of the items in the clipboard into the document at once, separated from each other by a specified delimiter. For example:


to join paste the clipboard contents, seaparated from each other by a pipe '|' symbol. If the clipboard contained the three items 'toyota', 'ford' and 'mitsubishi', that operation would result in


The 'J' in the command specifies that you want to 'join' the items. You can follow the 'J' with whatever you want to use as the delimiter. If you don't specify a delimiter, a carriage return would be the default.

The delimiter wouldn't have to be a single character. After typing the 'J' you could press whatever keys you wanted - the command would only be executed when you released the CTRL key. So you could type


for the delimiter to be a semi-colon followed by a carriage return:


In the examples I've given, the pasted items would just be left on the clipboard. You could use a pop-paste within the command instead. As with a normal pop-paste, you'd place a minus sign '-' after the 'V':


(So far it's been assumed that you want to paste all of the items on the clipboard. Later we'll look at list ranges, which would be used to only join paste some of the items.)

Monday, June 16, 2008

Extending cut-and-paste: paste / pop-paste from anywhere within the list

Similiarly to being able to cut/copy items into any position within the list, the user could paste from any position within the list.

For example, pasting from the last position in the list


that is, ordinary paste.

or pasting from the second item in the list:


Those paste operations would leave the pasted item on the clipboard.

A 'pop-paste' would remove the pasted item from the clipboard. You could pop-paste the last item on the clipboard


If there were four items on the clipboard and you pop-pasted the second item


then the items that were originally at the third and fourth positions would be shifted one position to the left, into the second and third positions.

Extending cut-and-paste: cutting/copying items to specific clipboard position

I've described cutting/copying text to a new item at the end of the clipboard list, or to replace the item at the end of the list. The user could also cut/copy text to any position within the list.

For example, copying some text into the third position in the clipboard list:


or copying into the first position in the list:


I'm counting the first position in the list as '1' not '0'.

You could also insert text as a new item in the list. If the list had three items in it, and you wanted to add a new item into the second position (thus pushing the items originally in the second and third positions to the right one place, into the third and fourth positions), you could type:


(The reason for making the positions start from 1 is that if you're going to be explicitly specifying list item positions, I think it's likely that most of the time you're going to be dealing with small numbers less than 5. If you start the position with 1, then those 5 numbers are all in a row together on the keyboard. If you started at 0, then the common set of numbers would be separated by a fair gap on the keyboard, which could make things a little less convenient).

What if there were three items on the list, and you told it to add a new item at position 9? I think the most sensible for it to just add a new item at position 9. I don't see a problem with leaving those other clipboard positions empty.

Sunday, June 15, 2008

Extending cut-and-paste: notes at end of first session

As a note to myself, some of the other things I want to write about:

cutting and copying - inserting an item anywhere in the list
cutting and copying - replacing an item in the list
pasting - removing pasted item (pop paste)

and then getting into why this sort of thing is useful
the same information often needs to occur in mutliple places but in different forms
this and other motivations for common cut and paste usage patterns
and the ops support things like using clipboard as a queue or stack, as one way to support those usage patterns

other misc tools/operations such as list ranges, list reversal

spliting and joining cuts-copies-and-pastes
cut-, copy- and paste- templates
reln between cut and paste and the notion of 'scratchpads'
why the MS office mult-item clipboard sucks
features designed for "expert users"

Extending cut-and-paste: cutting/copying new item to end of list

The user could select text then type


to add the selected text as a new item at the end of the list of items in the clipboard. Or do the same but cut the text rather than copying it.

If there was already an item on the clipboard, then this operation would add a second one. If there wasn't any item on the clipboard, the operation would act like an ordinary copy operation - the clipboard would end up with just a single item on it.

By default an ordinary cut/copy/paste operation will act on the last item on the list. So if you do an ordinary cut or copy, it will add that item as the last item on the list - replacing what is already there. This is the cut and copy behaviour we're familiar with. An ordinary paste operation will paste the last item on the list, leaving that item there in place - again, like the paste behaviour we are familar with.

Extending cut-and-paste: CTRL+SHIFT to add modifier keys

I want to talk about some more complicated cut, copy and paste operations, but first I need to talk about how you'd enter them in.

You'd need to press additional keys to specify the additional parts of the operations, for example:


to paste the third item on the clipboard.

Except that you can't just press that key combination, for as soon as you've pressed CTRL+V, it would paste the latest clipboard item -- before you'd got a chance to specify the 3.

To indicate they're using an extended operation, the user could initially hold down SHIFT as well as CTRL. Once they'd initially done this, they could release the SHIFT key and then enter the rest of the keys in their command.

So for that same operation again:


which means, press CTRL and SHIFT together, release SHIFT, and then press 'V', then '3'.

(The way Enso works would be more conducive to entering in variable length cut-and-paste operations, but that's another story).

Extending cut-and-paste: peeking at next paste item

This is more of a speculative idea.

By pressing


it could display the item to paste (by default, the last item in the clipboard list) in a little 'tool tip' display near the cursor, thus allowing you to 'peek' at it.

If, while still holding down the WINKEY, you kept pressing 'V', that 'tool tip' would cycle through the items on the clipboard.

You could paste that item either by just pressing


or by clicking on the 'tool tip' displaying it.

(or perhaps it'd be better to display the 'tool tip' where the mouse pointer is, rather than near the cursor).

Extending cut-and-paste: selecting multiple items in clipboard contents and history

Just like in Windows Explorer, being able to use the SHIFT key along the mouse to select a range of items. Or the CTRL key to select a set of individual items.

Then you could delete the selected items from the history or clipboard contents.

And you could drag and drop them into a document. By default, these items would be put into the document with a few carriage returns between each of them.

Extending cut-and-paste: clipboard history

Providing a way to view the history of items that've been cut/copied to the clipboard.

You could view it by right clicking the clipboard icon in the system tray, and then from the menu that comes up, selecting the History item.

Or by pressing


You could double-click a history item to add it to the clipboard, or drag and drop it to some document.

If you had the clipboard-contents window open, you could drag and drop history items to it.

Extending cut-and-paste: editing clipboard contents

Being able to edit the items in the clipboard contents window.

Why want this, rather than just editing the text before you cut/copy it, or after you've pasted it?

You might not want to modify the source text, or you might think of the modification after you've copied the text.

There's several reasons why you might want to modify it in the clipboard before you paste it. That can be conceptually simpler. It's a distinct operation that you can get out of the way first, before you paste the text in and then see it there with all of the surrounding text.

Or you might not be ready to paste it yet -- you might be wanting to make some more changes to the other document first, but you've got the changes you want to make to the clipboard item more immeidately in your mind.

Or if you want to paste that modified text multiple times. I've come across situations like these.

This is all affordances stuff.

The clipboard window could provide pretty lightweight editing capabilities. Ideally, there'd be a way you could open the content for editing in the default application for handling that sort of content. (With the way Windows works, this'd probably be a bit awkward - it might have to save the content in a temporary file, have the person edit that, and then the clipboard load this back up again). That's how you could edit images on the clipboard if you wanted to.

Extending cut-and-paste: viewing clipboard contents

Providing a way to view the clipboard's contents. (Again, something provided by a number of clipboard extensions).

(In this and all of the other posts on this topic, Windows will be assumed. It's just easier to write about a single operating system, than try to give a generic description that applies to all the major operating systems, and Windows is what I'm most familiar with).

To view the clipboard contents, you could press


There could also be a clipboard icon on the system tray - clicking this could bring up the clipboard contents.

They could be displayed in a little window. It'd be a window like any other -- that you minimise, maximize, ALT+TAB to, etc.

You could drag and drop content into the window - and also drop text onto the clipboard icon.

As a more lightweight way to see the clipboard contents, you could hover the mouse pointer over the clipboard icon in the system tray, and this would show the contents in a little "speach bubble" window. As soon as you'd move the mouse, that bubble would dissapear.

Extending cut-and-paste: multiple clipboard items

A common extension to cut and paste is to replace the single-item clipboard with one that can hold multiple items. Then, you can cut/copy multiple items onto the clipboard, and choose which item to paste from it.

Extending cut-and-paste: introduction

Some thoughts about how vanilla cut-and-paste can be extended. Some of these are already available in clipboard extensions, some aren't.

I tried organising all of my notes on this into a single, big file. But I found that too unweildly and time-consuming.

In the spirit of this blog and trying to figure out and present ideas in a bottom-up -- as opposed to top-down -- fashion, I thought I'd try presenting it instead in a piecemeal fashion.

Starting now...

Saturday, June 14, 2008

Example of software affordances - level of match between code-form and data generated

Here's an example of software affordances, in this case programming language affordances. Languages have affordances concerning how much the form of the code matches the form of the data generated, as Reg Braithwaite explains (see that article for concrete examples):

one way to write code that is comprehensible is to make sure that the form of the code matches the data the code generates. This is a very general principle, it can be found in web templates (like PHP and ASP pages), markup builder libraries, and even String or List Interpolation.

Features that support this style of writing code are more than simple syntactic sugar, because they alter the reader's mental model, lowering the semantic distance between the code and the code's result.
Braithwaite touches on the issue of IT people tending to look at software in exlusively-functional terms, referring to those people who would say that such differences between languages are just matters of syntactic sugar:
It's more than just syntactic sugar. People have a habit of saying "syntactic sugar" in a dismissive way. It’s another argument that since an underlying language is Turing Equivalent, there is no need for a particular language feature.

Friday, June 13, 2008

Steve Martin: “Be so good they can’t ignore you” (i.e. have really high standards)

Steve Martin’s advice for succeeding? “Be so good they can’t ignore you”

You can see him saying this at the very end of this (54 min) interview with Charlie Rose.
As I’ve said before I think that if you want to be really good at something, you have to have really high standards.

If you want to be so good that people can’t ignore you, you can’t be easily satisfied with your capabilities. You have to be always trying to make them better, to make them the best they can possibly be. You have to have really high standards.

Steve Martin says he often gets asked for advice about how to succeed. People want to know things like how you get into the movies or how to get their screenplay read.

What they usually want is some sort of set of steps that they can follow, like "go to this sort of place to find the right people and present your screenplay in this manner". They want a recipe or formula.

They want something where the course is laid out and can be fairly blindly followed. Where there isn't uncertainty that requires adaptability and creativity. But the reality isn't that simple.

I don't see how you can really achieve something special unless you're actively working at having really high standards -- actively trying to be so good they can't ignore you.

Hibernating laptop a few mintues after lid is closed (and some comments on our ability to imagine required functionalities)

Update: actually, when I talk about 'hibernating the laptop' I mean 'putting it to sleep'. Some of the feedback on this post made me realise the mistake.

I want to describe a feature I'd like on my laptop. I also think there's a lesson here for software design.

My laptop is set to hibernate when the lid is closed. That's useful because it's easy to see a closed laptop and think that it's switched off, and risk it overheating by putting it in your bag. I've had that happen to me, and it fried the motherboard.

But what I'd actually like it to do when I close the lid -- but which unfortunately my laptop can't do -- is to hibernate after a few minutes. This might sound like a strange thing to want.

The reason is this. When i'm using my laptop while waiting for the ferry (or train), I have to close it in order to board and get a ticket, causing it to hibernate. But when I take a seat, I might want to use it again, without having to wait for it to finish going into hibernation and then coming back out of it.

If there was a delay on the hibernation, I could open the laptop again before it starts happening. If I decided not to use the laptop again, it would go into hibernation in a few minutes, before getting a chance to overheat.

The lesson for software design is that sometimes there's features that you'd never just think of by yourself - like this one. Rather, you have to be in a situation that motivates the feature, that suggests it to you.

And since you can't experience all of the different situations that people using the software will find themselves in, you have to admit that you can't know exactly how it would be most useful for it to behave for everyone.

I think people are too quick to think that if they can't see why a particular feature would be useful, then it mustn't be. That is, taking their personal perception as the reality.

What you would ideally provide is an open-ended flexibility so users can configure it to the needs of their situations.

Tuesday, June 10, 2008

A ‘Show recent changes’ editor-feature

Text editors and word processors keep track of the changes you’ve made. This enables their undo/redo features. It’d be nice if they could also use that information for a ‘show recent changes’ feature that visually indicated those changes within the document.

Some editors, such as Microsoft Word, have features along these lines, but it doesn't seem to be very common. Here's my view of what it could be like.

Consider someone using a word processor. Say they’d made three changes, being, from most recent to least recent: 1) inserted a new word 2) deleted a word 3) changed the text in a sentence from bold to italics.

Those changes might be visually shown in the document like this. Inserted text might be shown with a blue background; deleted text with a red strikethrough; and a green background for modified text, along with a description of the modification. That description could be displayed in a call-out that points to the modified text, or in a superscript label above the text. In the case of change 3) the description might say ‘bold -> italics’.

A small superscript number contained in a circle could be written next to each of these changes, to indicate the order they were made in. So the new word would have a 1 next to it, the deleted word a 2 next to it, and the changed text a 3 next to it.

By default, it might show all of the changes in the undo buffer, but it could be handle to be able to tell it to only show the, for example, 5 most recent changes.

Sometimes it's difficult to remember the changes you've made while editing the document. It can be especially confusing when you're moving information around with cut and paste. Using undo to see what changes you've made can be awkward and errorprone; it'd be more convenient to be able to see the changes. I think it'd also be better for undoing specific things done a number of changes ago, and for getting an overview of what changes have been made during a session.

A more sophisticated version of this feature could more explicitly handle text being moved around within the document. With just the basic 'insert', 'remove' and 'modified' changes listed above, copying then pasting text is just registered as an insert. Cutting then pasting text is noted as a remove then an insert.

But you could make it more explicit that the text has been moved. It could show the text as being inserted into the new position, but also have an arrow back to its original position, also indicating whether it was copied or cut from there.

How you might be able show recent changes in other types of editors, such as for graphical or musical information, is another matter.

The general principle behind this idea is that if you have information concerning other information (in this case, the information about changes, which concerns the inforamtion in the document), then it’s usually useful to be able to see their relationship as directly as possible, by showing them together.

Not having to specify a file's name or location, and generalised file identification

Sometimes I open a text file or word document as a scratch pad. Though it’s a temporary file and I’m more than likely going to end up throwing it out, I’d like to still be able to save it as I’m working on it.

To do so I have to specify a filename and a directory to store it in. I find this too heavyweight: it’s just a temporary file, I don’t really care what it is called or where it is stored. All that really matters to me is that it’s open in a window on the screen that I can easily locate now.

One way to deal with this would be that if you haven’t yet saved the file with a particular name in a particular place, the program automatically saves it in a temporary location for you. But I think there is a better solution, which points to a different way of opening and saving files.

One limitation of just saving a temporary copy of the file is that often you end up needing the scratchpad for a longer period of time, across multiple sessions using the computer. So you need to be able to close it and then open it again.

A file’s name and location is only one bit of information about the file that can be used to locate it. There’s other information that could be used for those purposes. For example, the data and time the file was created, when it was last modified, and the contents of the file.

These should by default be used to identify the file. If you save it, it saves the creation and last modification date and times. That way you wouldn’t have to give it a name and location unless you wanted to.

To open the files you’d use a modified file dialogue box or windows explorer. Rather than just showing the directory path, it would also be able to show you a chronological listing of files by creation date and modification date. It could also show a special directory listing for ‘unnamed files’.

I think you could generalise this. Essentially, you could tag files with any information you like. Then windows explorer / open dialogues could serve more as like the google search bar, where you just type in the various critiera you’re looking for, and it brings back a listing of candidates that match your critiera:

e.g. search for ‘created yesterday work 93555’
where this is to search for a document that was created yesterday
and it searchers for ‘work’ and ‘93555’ first in tags associated with the files, then in the directory and file names, and then in the contents of the files.

(yes, this would require extensive indexing and powerful processor. I’m not sure how practical a full blown version of this is for today’s machines).

To delete one of these unnamed files you could locate it in windows explorer then delete it, or -- as I think programs should work anyhow -- you should be able to open the File menu in the window it's open in, and then choose a ‘Delete file’ option.

Monday, June 09, 2008

Caramelised plum and soy flavoured pork

This is a Chinese style dish my mum showed me. The pork ends up very tender and coated in a delicious sticky coating of a dark, complex, caramelised sauce, the result of frying the ingredients for a very long time. The cooking transforms the individual flavours of the ingredients into something quite different and much greater than 'the sum of the parts'.

Warning: I've written a really long description of the dish. I've tried to capture the rationale behind the use of the ingredients and the method, so you can understand why it's done that way.

Main ingredients

  • Pork, 1.5kg (if the cut contains bones, then more like 2kg)
    Use a cut of pork that you'd use for roasting, like some sort of pork leg or shoulder. You want it to be fairly fatty, so it can fry for a long time. You can drain the excess fat off at the end.
  • Plum jam/conserve, about 6 tablespoons.
  • Miso paste, about 6 tablespoons.
    This comes in white and red types, but I don't think it matters which you use.
  • Soy sauce
    Why soy in addition to the miso, considering that they have similar flavours? Even though the miso is fairly salty, for some reason you seem to loose that in the dish, but at the same time you don't want to add too much miso or it’d probably make the dish too soupy. So add some of the stronger, saltier soy. The combination of miso and soy probably adds a bit of a depth to the flavour.
  • Garlic, 8-10 cloves
  • Ginger, about 5 cm piece, but pureed ginger from a jar is fine (enough for about 6 tsp)
    These quantities of garlic and ginger might seem like a lot, but because the dish cooks for so long, and involves a lot of other strong flavours, you don’t really notice distinct garlic or ginger flavours at the end.

Secondary ingredients

These aren't necessary, but just add additional depth to the dish. In some of the cases, I'd need to experiment more with the dish to better see what difference they really make to it
  • Star anise, 2 or 3
    Definitely nice if you've got some. Alternatively, add some chinese five-spice powder towards the end of cooking (I think the flavour of it tends to get lost, otherwise).
  • Onion, 1
  • Red chillis, 5
    Use the ordinary red cayenne chillis. If you want it hot, you could use bird's eyes.
  • Green shallots
    Recommended - to add at the end, for the look and the texture.
  • Chinese rice wine
    Not sure how much difference this makes, though the dish is tasty with or without it.

Serving suggestions

Goes best with rice.
As the flavours are so strong, it’s nice to have it with some fairly mild vegetables.
Like some fairly simple chinese greens. I fry them with a little garlic and soy, then wilt them down.
And some lebanese cucumbers, sliced into little rounds. These are a nice refreshing foil to the dish's richness.
To make it look more special, you could sprinkle it with some sesame seeds, and then garnish it with some coriander and finely sliced red chilli. Visually, the white, green and red looks nice in contrast with the near black colour of the meat.
I think the nuttiness and slight sweetness of the sesame seeds goes well with the sauce.

Method - the basic idea

You have to cook the dish for a long time (I’d say at least 2 hrs). Basically, you’re frying the ingredients, to turn the mixture from a fairly light brown colour to a very dark, essentially black, colour.

It’s not very touchy about when you add all of the different ingredients, as long as once they’re all in, it gets to fry for quite a while. It seems to be the longer you cook it, the better it comes out. The flavours come out better, and the meat gets more tender. Because of the fat in it, as long as the temperature is not too high, I think it’s hard to overcook it.

Usually, I cut the meat up first, get that browned at a high-heat, and then start preparing the other ingredients and adding them when they’re ready. You want to turn the heat down a bit before any of those other ingredients get burnt.

Method - specifics
  • Preheat the pan at a fairly high temperature, for browning the meat. Add a fair amount of oil (you'll drain of excess fat later).
  • Chop up then brown the meat
    Debone the meat, then cut the skin and the fat under it off it. You can add the bones and the fat for flavour (and take them out later).
    Cut the meat into fairly large chunks -- at least an inch square, on average -- as the strong flavours of the sauce would be a bit overwhelming with small pieces.
  • One at a time, finely chop then add each of the following
    If any of this starts to look like it's going to burn, turn the heat down
    • the onion, if using
    • garlic
    • ginger (or just add the ginger puree).
    • chilli
      Cut fairly coarsely. It’ll cook for a while, so will become quite soft and coz everything gets covered in the thick dark sauce, you can’t see the chilli if it’s too small.
      If you don’t want it hot, remove the seeds and the dish won't be hot at all.
    • star anise, if using
  • If you haven't already, turn the heat down so it's frying at a moderate level
  • Then add the miso and jam, a few splashes of soy sauce, and a generous spash of rice wine.
    It’s probably better not to add them all at once, so you can keep it frying, rather than steaming/boiling (but it's ok to add them both at once.. once it's dried out enough it’ll be frying for ages anyway).
    With the miso and jam and juice from the meat, it'll proably look like its boiling, but if you scape the wooden spoon / spatula along the bottom of the pan, you should hear a frying sound. It should be gentle-moderate, not too vigorous. You basically want to keep this going the whole time.
  • Stir from time to time (I probably wouldn't leave it for more than 20 minutes without stirring).
    It’s ok if you get a bit stuck to the bottom of the pan – that’s probably a good part of the caramelisation process. Just unstick it with the wooden spoon. If it gets too dry or is sticking too much, you can add some water to help deglaze it, and then just evaporate that off over time.
  • The dish is done when the sauce has turned black.
    I'd expect the meat to be tender at this point, but if it isn't cook it longer (if necessary, add some water).
    You definitely want to keep cooking it until the sauce gets very dark and quite reduced (so it’s mainly coating the meat, rather than like a free liquid – it’s too strong to just have by itself). The flavour there is just so much better. It starts out with a relatively light brown colour, and while it’s at the stages before it gets really dark, the flavours just aren’t as good.
  • Chop the green parts of the green shallots into approx 3cm long lengths, and add them to the dish, and cook till they wilt. You can probably turn the heat off when you add them.
    You want long bits because it wilts a bit and folds up, and it looks nicer against the fairly large pieces of meat, and I think you need more sustantial bits of it to get the flavour against the very strong sauce.
  • Before serving, you can drain off the liquid fat that's pooled on the surface - which might not sound so nice, but you'll be getting rid of it.

Thoughts / variations

Pork seems to go well with these flavours. Which makes sense given that pork is the meat most commonly used in asian dishes, and asian flavours basically seem designed to work well with it. I haven't tried it with beef or lamb (which'd be interesting to do). You could possibly use chicken thighs. Though not something like chicken breasts, which wouldn't be robust enough for the long cooking.

My mum tells me you can also use orange marmalade instead of the plum jam. Apparently as a kid they used dried orange peel in it (I guess along with some other source of sugar), but marmalade works well.

We underappreciate affordances because we tend to underestimate the emotional force of motivation

I've said recently that we tend to overlook affordances (see here for some more examples and elaboration of this notion) when we evaluate software, because we tend to look at software in exlucively functional terms.

Here's another reason we do that. First, remember that motiviation has a big impact on the things we do:

What acts on your motivation to do things? There’s always costs and benefits associated with doing anything. There’s always multiple things you could be doing. If you do this thing, you’ll miss other things. It always takes some physical/mental energy to do things. You’ve got limited time. You’ve usually got a number of things you need to keep track of at any time (even if you don’t need to put much conscious effort into them). And even a simple task, can distract you from that.

Something less obvious is that the ‘benefit’ of doing tasks is often very small. Probably the majority of things we do are like this. And that means that the ‘cost’ of doing it has to be tiny, if we’re to feel motivated to actually do it.
That last point applies especially to using software. Each click, each function you perform -- often the amount of benefit associated with it is quite small. So the cost has to be tiny. And that cost can be where two different bits of software that allow you to ultimately do the same things can differ. If the cost is too high and performing that function isn't absolutely necessary, then are you going to bother doing it? Different costs mean different affordances.

But more than this, we tend to underestimate the force of emotional factors such as motivation. So it's very easy to look at two bits of software with compariable functional capabilities, and -- overlooking the force of motivation -- think that performing the functions in them is simply a matter of wanting to do them.

Which sounds like a weird thing to say: of course performing a few mouse clicks is just a matter of wanting to do it. You just need the connection between that desire and the movements of your hand, right? But when you're actually in the situation, and the possibility of performing the action comes up, you'll be actually experiencing the positive or negative force of motivation that can make it far from a no-brainer.

Motivation as an instance of 'Emotions, feelings and desires'

Emotions, feelings and desires include happiness, sadness, anxiety, distress, feeling tired, arousal, being in pain. Another, perhaps less obvious one, is motiviation. You could clean your room, and part of you wants to, but you just don’t feel motiviated. You could look up how to turn off an annoying feature in your word processing software, but you just couldn’t be bothered.

That’s not to say that we don’t make ‘rational calculations’ in deciding to do things, but I doubt there’s ever a situation that doesn’t involve the emotional pull of motivation in one direction or the other.

What acts on your motivation to do things? There’s always costs and benefits associated with doing anything. There’s always multiple things you could be doing. If you do this thing, you’ll miss other things. It always takes some physical/mental energy to do things. You’ve got limited time. You’ve usually got a number of things you need to keep track of at any time (even if you don’t need to put much conscious effort into them). And even a simple task can distract you from that.

Something less obvious is that the ‘benefit’ of doing tasks is often very small. Probably the majority of things we do are like this. And that means that the ‘cost’ of doing it has to be tiny, if we’re to feel motivated to actually do it.

When you take into into account all of these things that effect motivation, which can work against what you really to do, it helps to see why, in practice, doing something is not a simple matter of “wanting to do it”.

In cool reflection, it’s easy to underestimate the force of emotions

Damn those inticing chips! We all know the situation – we wanted to eat heathier, but those chips were just too tempting. As we all know, emotions, feelings and desires can sidetrack us from what we really want.

In the cold light of reflection, it’s easy to think that you just need to strengthen your resolve. You make yourself feel more strongly that you want to eat healthier, and on the strength of that feeling, it seems like you just need to maintain that. It ought to just be a matter of doing what you want to do.

But the thing is that imagining the pull of those desires is quite a different thing from actually experiencing them. Experencing those emotions changes you. But they don’t have that effect when you’re just imagining their effect.

It’s easy to overlook this when imagining a situation where we’d be experiencing emotions. This makes it easy to underestimate the force of emotions, and overestimate the ease of just doing what you want.

Friday, June 06, 2008

More examples of affordances, and why we need this general concept.

Some more examples of affordances

Web designers should do their own HTML/CSS, from the Signals vs. Noise guys, argues that different design tools -- HTML/CSS vs Photoshop -- that can all be used for the same end -- mocking up web pages -- nonetheless have different affordances (though of course they don't use that term):

The web is a world of constraints, the materials of HTML and CSS flex and give in ways that encourage particular styles. And being able to understand and bend within that scope is what makes a design feel native. Designers who work directly with the materials rather than through simulated environments like Photoshop are at a distinct advantage for making that happen. ...
Some more examples. Architecture and interior decoration have affordances, that effect things like mood and attitude (Alain de Botton's The Architecture of Happiness look at this). So does music. And clothing - wearing a suit vs wearing a t-shirt and shorts.

If the concept of affordances can apply to such diverse things, doesn't this mean that it must have little utility - to be spread too thinly, so to speak?

The concept is meant to provide a way to talk about the fact that things can shape our experience. I think that we neeed to recognise that this does happen, and is a general part of our lives.

And I think it is easy to overlook this if we only see particular cases and describe them in their own terms. We can be aware that a building can make us feel a certain way, without really acknowledging that our environment can shape our experience.

That's why I think we do need a general concept. That would also help us to see instances of it in situations we hadn't thought about before.

That general concept doesn't have to be like a theory that acounts for how all of the different cases actually work.

Tuesday, June 03, 2008

Maddox: Nobody cares if your puns were intended.

Maddox's funny little rant about people pointing out that their puns were (or weren't) intended

The intuition that vertical technologies are the way to meet goals in computing

If you want to move the state of computing forwards, how are you to do it?

I think that people tend to think of vertical technologies as the answer.

For example, if we think that computing would be moved forwards if it could provide better means for us to collaborate with each other, then we tend to think the answer must lie in developing better collaboration systems.

It sounds obvious enough, but I think it's wrong.

First I need to talk about what I mean by 'vertical technologies' and mention what the alternative is.

Computational technologies differ in how domain specific they are.

At the very domain specific end of the scale, you might have a program that performs a specific function for companies in the finance sector.

At the other end, there are technologies like the C programming language or HTML. You can write a C program that does pretty much what you like. You can write a HTML page about whatever you like. They're not very domain specific.

Domain specific technologies are vertical technologies, whereas things like C and HTML are horizontal technologies. Other examples of horizontal technologies are cut and paste, RSS, regular expressions, relational databases and dialog boxes.

I think that advances in horizontal technologies tend to push forwards the state of computing more than vertical ones do. And similarly, flaws or limitations in horizontal technologies tend to hold us back the most.

Horizontal technologies are infrastructure. Vertical technologies tend to work within the bounds of that infrastructure. Vertical improvements tend to be more incremental, horizontal improvements can be more revolutionary.

That's not to say to say that vertical technologies are unimportant, or that you can't have a big impact from developing a new vertical technology. Nor am I suggesting it's equally easy to make advances in both vertical and horizontal technologies. I'm just saying that, in general, with horizontal technologies, you can get a bigger bang for your buck.

I'm talking in broad outline here, and I'm not saying there's no exceptions.

I think that most people know that 'infrastructure' changes have the potential for being the biggest changes. But I think the thing is that, when it actually comes to considering how we can move the state of computing forwards, it's really hard to avoid thinking about it in terms of developing new vertical technologies.

It seems to stand to reason that if you've got a difficult goal you really want to meet, then you should focus as much of your efforts as possible on that goal.

This means focusing as sharply as possible on that goal, and targeting it with as much as possible of your solution. Any bits that aren't targeted at that solution are like wasted effort -- the effort'd be better targeted more directly at the goal.

Translating this into horizontal/vertical technology terms, this means that horizontal solutions feel less than ideal, because they're something more general that is not just for this problem but can be used for all sorts of other things. Their powers must be spread more thinly, and can only really bestow some of its benefits on this specific problem.

A more focused solution would be a vertical one - targeted specifically at this problem. Every bit of it is designed with that thing in mind. How could it not be the right way to go?

But benefits don't just come from specific targeting. Horizontal technologies provide benefits not by being for a specific goal, but by helping to enable them. They can enable new fundamentals, that then can be used to tailor specific vertical solutions. And I think that often what's needed is new fundamentals. That's what relational databases provided, what the web and RSS provided.

Look at what actually has been the biggest boon for collaboration. I think it's largely horizontal technologies -- computer networks, the world wide web, RSS, CVS. These are all things that are not specifically for collaboration but which enable it.

This is closely related to what I've been writing about recently about people looking at software pretty exclusively in functional terms.

The functions are domain-specific capabilities of the software. Looking at the software pretty-exclusively in these terms means overlooking the horizontal functions that are used to implement them.


Related: A short post from March 2006, where I briefly looked at vertical and horizontal technologies - Factors in Tool Complexity/Simplicity: Vertical- and Horizontal- Features

Sunday, June 01, 2008

On the notion of affordances

Donald Norman used the notion of affordances for how the nature of things in our environment suggest how we can interact with them.

When things suggest how we can interact with them, it changes how we interact with them. If a door suggests that it is opened by pushing it, we are more likely to try opening it that way. And if things have poor affordances, we're likely to try using them in ways that don't work.

Recently, I used the term in a more general way, to refer to how anything can shape how we perceive, think about things or do things. For example, the character limit on SMS messages shapes the kinds of things we write with them, even though it's quite possible to write email length messages but split them up across multiple texts.

I think the importance of this notion is that, in practice, we don't have absolute autonomy, we aren't simply "in control", and don't simply do things "because we choose to or want to". Nor do we make choices based on all the information; we use heuristics and hints, and what things suggest.

I'm not aware of an existing term for this property of things, and I think affordances fits well.

To illustrate this notion of affordances, here are some recent Paul Graham articles that can be seen in this light:

Cities and Ambition - cities have affordances that shape the amibtions of their citizens, and different cities have different affordances.

Disconnecting Distraction - computer setups have affordances that shape your usage of them, and how much time you waste when you're using them.

Another thing I think is an example of affordances is the notion of framing. That the way you describe something shapes the way people think about it.