Earlier quoted context omitted.
Many things will be impossible unless you delay the initial action. I mean, how do you really undo sending an email? You can't. What you do instead, and I'm guessing this is what gmail does, is to delay the sending for 15 seconds to give the user time to regret. Seems like delaying the action will almost always be possible. Guess i could give the users the misconception that they can undo whenever they want, which is…
IIRC, "it's not a feature, it's a bug". Engineers noticed it took about 15 seconds to send a mail through Gmail and added an option to cancel it.
Undo
81–90 of 100 posts
Re: Undo
#82Earlier quoted context omitted.
This is a good point, but as the author points it, it feels so useful in Gmail.
Gmail undo is basically job cancellation, not really returning a changed state back to its original state. Gmail can't "undo" once that job has been processed - in other words, when something has been actually done .
Re: Undo
#83Interesting write up. Thanks a lot for writing it Sacha. Okay, so I have a question. Isn't this just a property of the internet as a system? If we remember the history of human-computer interaction on 2D displays, we first really remember what led to the desktop GUI (Xerox Alto, all that stuff). This domain had tons of research poured into it (of which Raskin is a member) - including from the military, for usability…
The trick is to put everything in commands which keep track of the old ad the new state (or at least the parts you need), so that you can have a command history stack, and undo merely means "run the unexecute method of the command at the current position, and move the pointer to the previous command". If unexecute fails, you throw away all older commands (undo history). If execute fails during redo, you throw away all newer commands (redo history). Multi-level undo does need to be designed in from the start, but once you learn how it works it does not add that much complexity.
The reason that you don't see many web applications that implement this is because web development did not branch off from desktop development, but instead branched off from unix systems administration (by creating glorified shell scripting languages to output html pages, and gradually improving on that). Web developers never learned from their senior desktop developers how to implement a multi-level undo/redo using a command pattern, because the vast majority of web developers never had a senior desktop developer to learn from. I only learned it myself because I did have such a desktop development mentor. Mobile developers are typically repurposed web developers, so no surprise that it suffers from the same affliction.
Re: Undo
#84What would be the correct solution, the one that balances out both of these needs?
Re: Undo
#85Earlier quoted context omitted.
REST could accomodate for undo quite fine. The server would just have to return a resource representing the action in the response. The client could then delete the action with another request, which would amount to an undo. This is analogous to the command pattern and would require more effort from the programmer, just like normal undo. You need to keep an action history and make sure that all actions are reversible…
If REST follows HATEOAS fully, the back button is 90% of your undo.
I suppose you can also do something state-based like /image/state4 going back to /image/state3. This would push the storage of the edit stack to the server.
Is this what you mean?
Re: Undo
#86On the one hand, I agree with the ideas here. On the other hand, it really worries me when I find out that some server doesn't delete the data when I tell it to delete it. For example, when you delete your Facebook profile or your mails on GMail, wouldn't you like that data to be utterly destroyed? What would be the correct solution, the one that balances out both of these needs?
"Your data will be deleted in 24 hours. You can undo this deletion at any time before then."
Re: Undo
#87On the one hand, I agree with the ideas here. On the other hand, it really worries me when I find out that some server doesn't delete the data when I tell it to delete it. For example, when you delete your Facebook profile or your mails on GMail, wouldn't you like that data to be utterly destroyed? What would be the correct solution, the one that balances out both of these needs?
It's 5/10/20/30 seconds for an email, which seems like a good fit for that use case. Perhaps a Facebook profile delete or mail delete might be more like a 5 min/1 hour/1 day option set, since it doesn't interfere with the primary purpose (i.e. I wouldn't want to wait an hour for all my emails to get sent, but I might be OK waiting an hour for them to actually delete).
Re: Undo
#88On the one hand, I agree with the ideas here. On the other hand, it really worries me when I find out that some server doesn't delete the data when I tell it to delete it. For example, when you delete your Facebook profile or your mails on GMail, wouldn't you like that data to be utterly destroyed? What would be the correct solution, the one that balances out both of these needs?
Something similar could work here. When you delete some data, it gets soft deleted (still exists in your database/etc, but is considered deleted by the application). After a matter of minutes (hours?), it gets actually deleted. You've got a grace period in which you can undo the delete, and then it's gone forever.
Since the most common use case for an 'undo' feature is undoing something you did very recently, that should strike a good balance.
Re: Undo
#89This is too OO for my taste. Having just seen a talk about MiniKanren, I wonder if you can implement undo effectively with a relational (logic) programming system. Is anyone aware of research (or practice) to that effect? My googling isn't turning up anything relevant.
Re: Undo
#90Earlier quoted context omitted.
Excision is built into Datomic expressly for this purpose. I don't know why people assume those capable of building a database would also fail to anticipate this need. The difference is that you don't use excision except in special cases (like legal obligation to delete data), you use retraction which doesn't lose any history.
Thank you for sharing your experience. > I don't know why people assume those capable of building a database would also fail to anticipate this need. Praptak asked if it was hard to deal with and did not imply Datomic's developers failed to anticipate the need. Excision is a feature that must be prioritized like any other and in fact was not available until Datomic 0.8.3941. https://groups.google.com/forum/#!topic/da…
Fair point. :)