4 ms·
I've found that Undo isn't something you can bolt on after the fact, you need to design with it in mind from the start. I've had very good outcomes with that a
by mark-r 7y ago
I've found that Undo isn't something you can bolt on after the fact, you need to design with it in mind from the start. I've had very good outcomes with that approach.
- usmannk 7y agoAbsolutely. See the meme of how IDA Pro doesn’t (didn’t) have undo for evidence of this.
- Doxin 7y agoUndo can be bolted on after the fact, but only if you had the presence of mind to either do event sourcing or if your application state isn't too big to store all your state centrally.
- ken 7y agoWhy would Undo be any harder to add post-hoc than any other feature? Encapsulate each action, codify its opposite, and push it onto the undo stack.
- mark-r 7y ago"Encapsulate each action and codify its opposite" is exactly the hard part of this. Too much code is written assuming it has access to the entire state of whatever it's modifying and doesn't have to worry too much about side effects.
- buckminster 7y agoMost new features don't require changes to the logic of every existing feature.