Slashdot Mirror


The History of the "Undo" Function?

TheLocustNMI asks: "So, earlier today as I was typing out some magnum opus of a stored procedure, I highlighted to copy it, and hit SPACE instead of Ctrl-C. Without thinking, I hit Ctrl-Z to 'undo' my folly. Pausing a moment to reflect, I realized that I own countless hours of thanks to whomever came up with the "undo" button. In short -- my question is this -- where did it come from? What are the earliest implementations of the 'undo'? (a quick googling returns this page, a cornucopia of undo and history related treatises)"

61 comments

  1. Since the dawn of computing... by Tuxinatorium · · Score: 1

    My guess would be that it's been around since the late '60s, if not earlier. It's something so useful, and so easy to implement, that I would be suprised if it hasn't been around at least that long.

    1. Re:Since the dawn of computing... by exp(pi*sqrt(163)) · · Score: 3, Interesting

      It's not easy to implement. It's actually a lot of work. Suppose, for example, you're building a 3D animation system and every operation needs to be undoable. Every time you tweak a vertex, or intersect two polyhedra, or retesselate a primitive you need to have a way of undoing it. This isn't just a few lines of code. It means that every time you write some code to do anything you need to write code to undo it. This is a lot of work.

      --
      Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
    2. Re:Since the dawn of computing... by Tuxinatorium · · Score: 2

      Well obviously the more complex the work the more complex the undo function. But nobody did 3D animation in the '60s. For simple text editing, it would be easy to implement, provided you had enough RAM to store duplicates of portions of the text.

  2. Before Computers by LowellPorter · · Score: 3, Funny

    The "undo" button before computers was white-out. You could never have enough of that stuff around. Especially if you were from a family like mine with several kids doing term papers.

    1. Re:Before Computers by stefanlasiewski · · Score: 4, Funny

      And the second "undo" button was the penknife, which you could use to scrape off the white-out that you applied by accident.

      --
      "Can of worms? The can is open... the worms are everywhere."
    2. Re:Before Computers by Henry+V+.009 · · Score: 2

      Hell, before whiteout was invented, we just struck out letters with the slash key of the typewriter. That was the real undo.

    3. Re:Before Computers by Anonymous Coward · · Score: 0

      That would be the 'redo' button.

    4. Re:Before Computers by Anonymous Coward · · Score: 0

      Too bad I can't get high sniffing Ctrl-Z.

  3. alt.folklore.computers by Anonymous Coward · · Score: 4, Insightful

    A better place to ask this question would be alt.folklore.computers on usenet.

    1. Re:alt.folklore.computers by crisco · · Score: 5, Informative

      Best advice here. A search of google groups yields one thread that points to Undo existing in the late sixties.

      --

      Bleh!

  4. Good question by Picass0 · · Score: 3, Funny


    Seeing how things have been lately, it's worth finding an answer for this question before someone attempts to patent the idea.

    1. Re:Good question by random735 · · Score: 1

      Actually, I once saw a patent plaque for a method to handle undo in software, hanging on the walls at IBM's main software group building.

      So you may be too late. (surprised? not really)

    2. Re:Good question by lburdet · · Score: 2, Funny

      hmmm... maybe *HE* is trying to patent "undo".

  5. Arabian Nights? by MarkusQ · · Score: 3, Interesting

    IIRC, there was an example in the Arabian Nights. Of course, this was long before computers but it still worked like magic.

    -- MarkusQ

    P.S. On a more serious note, I wouldn't be all that shocked to learn that 'undo' wasn't implemented on a computer before the 1970s. My main reason for thinking that is that it is relatively expensive, and really only useful in interactive environments. When you're editing your program by manually shuffling h-cards, there isn't much sense in having "undo".

  6. I'd like to know by Anonymous Coward · · Score: 0

    how the undo data is stored. I mean, every keystroke in Word can be undone, does the undo simply go through the list of most recently done actions and invert them, does that mean when programming a big application with 'undo' features that every function you write has to be able to work 'backwards'?
    Or is it just incremental changes saved in memory?

    1. Re:I'd like to know by benjamindees · · Score: 1

      I'm pretty sure it's just incremental changes saved in memory. In fact, recent versions of Word save those changes *in the document* itself.

      This can be a huge problem if you work with sensitive information. Lawyers, for instance, routinely re-use the headers and formatting from old documents. With this "feature", sensitive information from a client's case can make its way into documents for other cases. That's one of the reasons that informed lawyers still use Wordperfect.

      --
      "I assumed blithely that there were no elves out there in the darkness"
    2. Re:I'd like to know by exp(pi*sqrt(163)) · · Score: 4, Interesting

      Here's what one well known Academy Award winning 3D package does. Every command is an object. When you execute a command that object is stored in a 'history'. The command has two methods, a do() method and an undo() method. As long is the object remains alive it can undo or redo the associated operation.

      --
      Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
    3. Re:I'd like to know by Anonymous Coward · · Score: 0

      Thanks. I've always wondered about that. I'm no software dude, I'm merely a hardware type who occasionally dabbles in microcontroller code in assembler. I like to know things.
      Frankly, 'undo' amazes me more than you'd think, because one day I was figuring in my head how to do it and I came to the two conclusions in my OP.
      Also, the fact that the Commodore 64 GEOS operating system didn't have much in the way of an undo led me to believe it was fairly complex to implement...

    4. Re:I'd like to know by yamla · · Score: 1

      If you do your software design properly, it is surprisingly easy to implement undo. Really. I remember the first time I implemented it, in a course in university. I was planning on that feature alone taking a day to get in place (iirc, we were implementing a bookmark manager in Java). In fact, it took literally only a few _minutes_ to implement and virtually no time to test. And redo is just as easy to implement as undo, provided you did undo correctly.

      --

      Oceania has always been at war with Eastasia.
  7. is it just me ... by hari · · Score: 4, Funny

    .. or do you find yourself saying "Control-Z" in your mind whenever you find yourself making mistakes while not sitting in front of a computer..spilling a glass of milk...etc

    1. Re:is it just me ... by Mr.+Slippery · · Score: 1
      .. or do you find yourself saying "Control-Z" in your mind whenever you find yourself making mistakes

      Actually, Control-Z brings to mind the old DOS EOF character.

      The proper "undo" is either "u" or Control-Shift-_, depending on if you're a vi or emacs person.

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    2. Re:is it just me ... by pthisis · · Score: 2

      .. or do you find yourself saying "Control-Z" in your mind whenever you find yourself making mistakes

      No, just when I'm getting ready to go to bed.

      --
      rage, rage against the dying of the light
  8. Try thinking "Command-Z" ... by tdelaney · · Score: 5, Informative

    That's right people ... Apple did it first (at least in a consumer machine).

    The original Macintosh had "undo" functionality in its applications, right from the start.

    The Apple IIGS also had "undo" functionality.

    There may have been one or two individual applications before it (I don't know) but the Mac made "undo" ubiquitous.

    1. Re:Try thinking "Command-Z" ... by tdelaney · · Score: 4, Informative

      Although, IIRC there wasn't originally a command key associated with it ... you had to go to the menu.

      "Command-Z" was chosen to match with the existing command keys of "Command-V" (paste), "Command-C" (copy) and "Command-X" (cut). All the major editing command keys were in the one location.

    2. Re:Try thinking "Command-Z" ... by gmhowell · · Score: 1

      This is also the first place I remember it. But, was it Mac Write, or Word that had it first?

      Also, I'm sure someone will tell how Steve stole it from Xerox, IBM, Santa Clause, or the Tooth Fairy.

      I always wondered why it was Command-Z. Thanks for clearing that up.

      --
      Jesus was all right but his disciples were thick and ordinary. -John Lennon
    3. Re:Try thinking "Command-Z" ... by Balorn · · Score: 2, Interesting

      Hmm, I'm pretty sure it was always Command-Z, no mousing required, but it was before it was called the Command key. It was just that key with the weird symbol on it (personally I called it "funnykey" back in the mid-80s). The Jargon file lists it under "feature key".

      I know on the IIgs and some Mac keyboards it was the same as the open-Apple key (I forget what the closed-Apple key was used for). On the original mac, though, I think it just had the symbol. A google search on Apple's site turns up a number of images of keyboards among other things, though not one of the original Mac.

      So the question left is, was there a documented implementation of Undo on a computer before the original Mac? Perhaps in some old word processing programs? I know there were some I used on the Apple II, but I certainly can't remember what functions they had after 20-some-odd years.

      --
      http://www.balorn.net/
      ?
    4. Re:Try thinking "Command-Z" ... by 'The+'.$L3mm1ng · · Score: 1

      Which is incredibly more convinient if you do not use a German keyboard, where z and y are switched. *sigh*
      I never saw this mentioned in the usability reports I read.

    5. Re:Try thinking "Command-Z" ... by pruss · · Score: 1

      The Brief DOS-based programmer's text editor in had a fine undo. Don't know whether this dates to before the Mac or not--perhaps not. You could select how many undos are possible in a row.

    6. Re:Try thinking "Command-Z" ... by Anonymous Coward · · Score: 0

      vi had the 'u' key long before mac was a gleam in job/woz eye.

  9. Opps! by Anonymous Coward · · Score: 0, Funny

    I bet amazon wishes they could undo this... mistake

    1. Re:Opps! by crawdaddy · · Score: 1

      Did they honor the deal?

  10. IN 1984 by Adam9 · · Score: 1, Troll

    In 1984 history undoes YOU!

    1. Re:IN 1984 by moc.tfosorcimgllib · · Score: 1, Offtopic

      > In 1984 history undoes YOU!

      That is soooo 2002. It should be:

      history Ctrl+Z You!

  11. ancient history of undo/redo by js7a · · Score: 5, Informative
    was there a documented implementation of Undo on a computer before the original Mac?

    Yes, MIT's Lincoln Reckoner had multiple-level undo/redo in 1968. That used a screen editor, so it would be the kind of undo you are talking about, however it was probably inspired by IBM's APL line-based workspace editor.

    APL programmers had multiple-level undo/redo on their selectric typewriters around 1965. Each interaction was numbered, and you could select the number of the last interaction you wanted to keep. This would reset the entire workspace so that all variables, your program image, and options would be restored. This worked by saving the workspace each time a command completed, and was also useful for restoring sessions after interrupted connections.

    Single-level undo appeared much earlier -- the first IBM teletype line editors in the late 1950s had single-level undo.

    1. Re:ancient history of undo/redo by bill_mcgonigle · · Score: 2

      How was the multi-level undo navigated/discovered? Was it sequential and blind (hit undo, see what you get) or was it random-access (like the History panel in Photoshop). Adobe probably has a patent on the History panel anyhow...

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    2. Re:ancient history of undo/redo by js7a · · Score: 2

      I guess Lincoln Reckoner was like EMACS is: you hit undo, and look to see what you got. I don't know what the granularity for undo of inserts was -- probably character-by-character or all-at-once.

  12. No undo sans redo by ballpoint · · Score: 1

    So, earlier today as I was typing out some magnum opus of an e-mail message in Outlook, I highlighted to copy it, and hit SPACE instead of Ctrl-C. Without thinking, I hit Ctrl-Z twice to 'undo' my folly. While the spaced-over text reappeared with the first Ctrl-Z, it disappeared again with the second Ctrl-Z. My typing was now undone forever, leaving me with a blank message. Pausing a moment to reflect, I realized that whoever came up with the "undo" button without providing a "redo" button only did a half-hearted job.

    btw, the "Done buns can't be undone" saying from Insomnia keeps on playing in my head...

    --
    Flourescent (adj): smelling like ground wheat.
  13. Or AZERTY by vrt3 · · Score: 2

    ... where the Z is located, well, I guess you can figure it out.

    --
    This sig under construction. Please check back later.
    1. Re:Or AZERTY by 'The+'.$L3mm1ng · · Score: 1

      This would wo Ctrl+W... that'll be better :)
      To what language does AZERTY belong?

    2. Re:Or AZERTY by vrt3 · · Score: 2
      AZERTY is used in France and Belgium; in France and the soutern part of Belgium it's used with French, in the northern part of Belgium it's used with Dutch.

      The stupid thing is, there is even a difference between French azerty and Belgian azerty. All the letters are in the same place, but there are difference with regards to other characters like the backslash.

      BTW, not everyone uses azerty around here. Some folks, especially programmer types, use qwerty.

      --
      This sig under construction. Please check back later.
  14. We had claw hammers before whiteout. by Anonymous Coward · · Score: 0

    Drive a nail where you didn't want it?

  15. I can run a tangent off topic! by jolshefsky · · Score: 2
    Not really, but I do find myself calling the apostrophe "rem" from my BASIC days. Yeesh.
    10 ' Hello world program
    20 ? "Hello World."
    Of course, things went different with the Commodore ...
    10 rem Hello world program
    20 pR "Hello World."
    But only if you had the Caps-Lock off.

    Wee ... Offtopic +1!

    --
    --- Jason Olshefsky

    Karma: Poser (mostly affected by adding this line long after everyone else did)

    1. Re:I can run a tangent off topic! by aridhol · · Score: 2
      Of course, things went different with the Commodore ...

      10 rem Hello world program
      20 pR "Hello World."

      Hmmm...IIRC, line 20 would cause an error. I think that pR would translate to "print#", which required a channel number before the string. The abbreviation for "print" was still "?".
      --
      I can't say that I don't give a fuck. I've just run out of fuck to give.
    2. Re:I can run a tangent off topic! by Anonymous Coward · · Score: 0

      Wow, that brought back some memories! I remember I was a kid and a friend had a VIC-20 in his basement hooked to the TV to play games.
      One day I show him that you can type ?2+2 and the computer would give you the answer.
      It was like finding treasure! He was pretty happy, thinking 'no more homework'...

  16. No Undo for 10+ Years by BornInASmallTown · · Score: 3, Funny
    I use a graphical programming language from National Instruments called LabVIEW. It did not have the undo feature for over 10 years since its introduction, and I will never forget the sinking feeling of hitting the Delete key on accident only to see a whole page of graphical code lost forever!


    NI added undo to LabVIEW in the 5.0 release (ca. 1997) of the product. It was really funny how the marketing from NI revolved around that feature. "Now with UNDO!" You would think that promoting the introduction of a feature that is so ubiquitous in most other desktop software would be less than effective--that people would groan because they had expected it for so long. However, at one of their trade shows, the presenter mentioned the new UNDO and got a standing ovation.

  17. Ctrl-C by oliverthered · · Score: 1

    Don't, things are sure to 'break' if you hit Ctrl+C.

    --
    thank God the internet isn't a human right.
  18. Xerox had it in the late 70's (at least) by MarkedMan · · Score: 2

    The Xerox Alto system I first used around 1980 (and it wasn't new that year) had an undo function that worked in every program and could take you all the way back to the beginning of your session. If I remember you could have it work contiuously somehow, and it would undo all your work before your eyes.

    BTW, the system was also a WYSIWYG high res windowed display, with three button mouse, laser printer, removable (personal) hard drive, drag and drop file handling, ethernet with an internet (arpanet, actually) connection. The first thing I ever saw on it was someone in Rochester, NY playing a 3-D real-time multiplayer game (mazewars?) with someone in California.

    I have never quite recovered from the IBM PC downgrade.

  19. What could be geekier? by TerryAtWork · · Score: 2, Funny

    You ever tried to pick up chicks by elaborating on the history of the undo command in a dark bar?

    Let me know how it works out.

    --
    It's Christmas everyday with BitTorrent.
    1. Re:What could be geekier? by Anonymous Coward · · Score: 0

      You ever tried to pick up chicks by elaborating on the history of the undo command in a dark bar?

      It's all good, until you get a good look at her in the light the next morning, and
      think ``where's that damn undo button now?''

  20. Not the first but... by xav12 · · Score: 1

    The Atari ST series certainly weren't the first to support undo in applications, but they did have a dedicated "Undo" key (as well as a dedicated "Help" key). Far more useful to a new user than Ctrl-Z or F1 yet something that is still missing, even from most of the current range of expanded keyboards.

  21. 1975 Reference to "Undo" by shoppa · · Score: 2

    The Interlisp Editor had an "Undo" function in 1975. See the directory listing here.

  22. And with DWIM, you need UNDO by alispguru · · Score: 2

    Interlisp in all its incarnations had a module called DWIM (Do What I Mean) which caught typos and thinkos in your input and offered to correct them for you. It was at its smartest fixing spelling errors and inserting parentheses (it would guess '(foo)' when you typed 9foo0, for example).

    DWIM could be turned off, set so it asked you before changing anything, or set to automatically fix your inputs. That last setting would be completely intolerable without UNDO, which Interlisp also had, so even if DWIM guessed wrong, corrected your input to the moral equivalent of 'rm *', and ran it, you could still recover with UNDO and try again.

    The oldest Interlisp reference I can find is the 1978 Interlisp reference manual. Lisp was on Altos as early as 1973, hacked up by L. Peter Deutsch. For an academic take on UNDO, see this paper from ACM TOPLAS (courtesy of Citeseer).

    --

    To a Lisp hacker, XML is S-expressions in drag.
  23. "Commit" = "Undo" by dpbsmith · · Score: 4, Interesting

    I remember a rudimentary CAD program for the Apple ][+, circa 1982 or 1983. I wish I could remember the name...

    I personally first encountered "Undo" on the Mac in 1984. But this CAD program had a function... they didn't call it "commit." I don't remember the exact language they DID use.

    The idea was that you never had to worry about making mistakes, because every action you took was tentative, and would be shown to you as a preview before taking effect.

    So you'd give a command to draw a line, you'd see the line onscreen, and you could either accept it (in which case it became part of the drawing) or reject it (in which case it disappeared).

    The weird thing about all this is that logically, it is exactly equivalent to an "undo" function.

    And the even weirder thing is that while an "undo" function feels empowering and liberating... when the exact same function was presented as "tentative action, preview, accept/reject" it felt clumsy and laborious.

    To me, anyway.

    1. Re:"Commit" = "Undo" by CTho9305 · · Score: 2

      I imagine it felt worse because you had to make sure you wanted to commit - the default action would presumably be to not commit (if you don't do anything), whereas with undo, you act as if what you have is correct, and only do something extra if you catch an error.

      Disclaimer: I've never used that program

  24. MS Word question by yerricde · · Score: 1

    Lawyers, for instance, routinely re-use the headers and formatting from old documents. With [undo across save], sensitive information from a client's case can make its way into documents for other cases.

    Can't a user configure Microsoft Word to "slow save" a document, deleting all undo-across-save information, whenever closing it? If so, how? If not, would all the attorneys in the audience please throw a few dollars this way?

    --
    Will I retire or break 10K?
    1. Re:MS Word question by Suppafly · · Score: 2

      Can't a user configure Microsoft Word to "slow save" a document, deleting all undo-across-save information, whenever closing it? If so, how?

      Not sure about that, (I've never really cared) but you can easily do "save as" and pick some format other than .doc to lose the undo-across-save features, much like you can save pdf files in photoshop as gifs and lose layers and history and such.. undo across save really is a feature and not a bug, but unfortunately, when you are working with text, the end result is the same as the working file unlike photos which are typically saved in a different format from the raw file.

  25. It's Command+Z by yerricde · · Score: 1

    Control-Z brings to mind the old DOS EOF character. The proper "undo" is either "u" or Control-Shift-_

    What about Command+Z, the Mac OS undo keystroke that Microsoft shamelessly copied into Ctrl+Z in the Windows OS?

    --
    Will I retire or break 10K?
  26. And Oracle can't implement it... by Anonymous Coward · · Score: 0

    Oracle doesn't seem inclined to add this functionality to a lot of it's products...great way to ruin productivity...