User:Litany42/History of Undo/Undo Last Command

History of Undo/Undo Last Command is The original genesis of Undo is generally attributed to Warren Teitelman (http://en.wikipedia.org/wiki/Warren_Teitelman), the Xerox PARC (http://en.wikipedia.org/wiki/PARC_(company) ) computer scientist who invented InterLISP (http://en.wikipedia.org/wiki/Interlisp). It was first used as a method for computer programmers to test their computer programs.

The first practical use for computer users came with the earliest computer-based text editors and word processors.

During a presentation called “The Final Demonstration of the Xerox ‘Star’ Computer” on June 17, 1998, Dave Liddle (http://en.wikipedia.org/wiki/David_Liddle) attributed the initial invention of Undo to Teitelman. However, he added: “I think it’s fair to say that the ability to make text editing documents undoable flows from J Strother Moore’s piece table invention, which was the thing that made it possible to have a text document in which you could still Undo it, by not irrevocably committing the data structure.” http://www.digibarn.com/collections/movies/digibarn-tv/gui-movies/xerox/index.html#parc

http://www.computerhistory.org/events/lectures/star_06171998/star_xscript.shtml

In the early days of computer programming, calculations had to be manually fed into the computer step by step. If the programmer made a “syntax error” or entered calculations into the computer in the wrong order, the computer would simply not be able to give the programmer the answer – nor would it be able to tell the programmer where the mistake was made. The computer simply would, what we today would call, “crash” (though that term did not seem to be in use at the time – Teitelman himself used the word “complain”).

In a paper called “PILOT: A Step Toward Man-Computer Symbiosis” (September 1966) for MIT’s Project MAC, Teitelman noted that it would be helpful if the computer could avoid crashes through several methods including an Undo function.

“Before the system complains, we should have it back up and "undo" some of the transformations it executed. By this simple device, many ambiguities could be resolved.” (http://www.dtic.mil/cgi-bin/GetTRDoc?AD=AD638446&Location=U2&doc=GetTRDoc.pdf, page 148 of the PDF)

In other words, the Undo function would allow the user to test small portions of the program to ensure they were working correctly. Once the programmer was happy with the results, the small portions could be added to other portions to make longer, more complex programs.

By building up the program step by step, it would be easier for programmers to find and eliminate mistakes from their programs.

Teitelman also refers to Undo in his 1981 co-authored article, “The Interlisp Programming Environment” (http://www.ics.uci.edu/~taylor/ics228/Interlisp.pdf), in which he describes the development or “evolution” of Interlisp.

"In addition to the obvious use of recovering information lost through typing errors, UNDO is often used to selectively flip back and forth between two states. For example, the user might make some changes to his program and/or data structures, run an experiment, undo the changes, rerun the experiment, undo the undo, and so on." (http://www.ics.uci.edu/~taylor/ics228/Interlisp.pdf, page 5 of the PDF)

In January 1981, a Xerox PARC document written by J Strother Moore (http://en.wikipedia.org/wiki/J_Strother_Moore) outlined how he developed the framework of a text editor for InterLISP. Called “The TXDT Package—Interlisp Text Editing Primitives”, the paper described the TXDT package as “a collection of Interlisp programs designed for those who wish to build text editors in Interlisp”.

As part of the program, Moore designed a system of buffers that, in essence, kept a history of all changes to the text within a document. Graphically, this could be visualized by hand-editing a printed page: to change a word, you would cross out the old word and “insert” the new one by writing it in the margin.

Of course this would happen digitally within the computer program, so that the original document was kept in memory along with all the changes. This was done with the help of a “piece table”.

For example, if the user inserted a word, the document would be split into three pieces: the original document up to that word, the modified document after the inserted word, and a separate “scratch file” with the word or string of words. The piece table would keep track of all these files.

To undo the insertion, the computer would simply back up one step, reverting to the original document.

Once the document was saved and closed, it became a “clean” file that consisted of just one piece.

Theoretically, the document could be split into an infinite number of pieces during editing with the computer tracking each piece and allowing the user to undo or even redo each edit. However, the small amount of available memory in early computers meant that there were practical limitations to the number of pieces the computer could “remember” during editing.

This innovation was used in later versions of the Bravo word processor (http://en.wikipedia.org/wiki/Bravo_(software)), developed by Butler Lampson (http://en.wikipedia.org/wiki/Butler_Lampson) and colleagues at Xerox PARC. This eventually evolved into Microsoft Word (http://research.microsoft.com/en-us/um/people/blampson/38-altosoftware/Backup/WebPage.html).

In 1981, the Xerox Star (http://en.wikipedia.org/wiki/Xerox_Star) was the first computer to feature an Undo button. (http://www.digibarn.com/friends/curbow/star/keyboard/index.html) However, it didn’t work. (http://www.computerhistory.org/events/lectures/star_06171998/star_xscript.shtml)

The Apple Lisa was introduced in January 1983 and was the first commercial computer to offer Undo Last Command. Gregg Williams, senior editor at Byte magazine, noted this feature above all in his review, published in the February 1983 issue.

“This wonderful command lets you undo the effects of the last one you issued. It’s a tremendous security blanket that enables you to experiment and work without worrying about making an irrevocable mistake.” http://blog.modernmechanix.com/2008/05/29/the-lisa-computer-system-apple-designs-a-new-kind-of-machine/?Qwd=./Byte/2-1983/lisa_review&Qif=lisa_review_06.jpg&Qiv=thumbs&Qis=XL#qdig

Williams noted later in the same article that people who were nervous using computers (a common affliction in those days) would be more confident using Apple Lisa.

“With this command, even the most uncertain users will not hesitate to act in a way they think is appropriate. The way Lisa programs work, the user probably is right, and if he isn’t, he knows he can undo whatever happens. People who won’t trust most computer programs will trust Lisa programs.”

However Larry Tesler (http://en.wikipedia.org/wiki/Larry_Tesler), who was on the development team, noted that early product testing of the Apple Lisa revealed people were perplexed by the command.

“They’d never seen such a thing in a program before, and they just didn’t quite understand what it meant. Then there were other ones they understood, but they didn’t feel comfortable with somehow.”