3 ms·
Dry run is among the things you really need to design for, others are: - cancel - undo/redo - progress bars Progress bars with accurate timing are notorious
by GuB-42 5y ago
Dry run is among the things you really need to design for, others are:
- cancel
- undo/redo
- progress bars
Progress bars with accurate timing are notoriously difficult, or even impossible to get right. But even regardless of timing, having a progress bars that really shows progress and doesn't freeze is hard. Every slow operation has to have some sort of callback mechanism to update progress, and you have to know the number of steps in advance.
Undo requires, for each operation, to know how to roll back. You also need to have every operation go through the undo stack. Another option is to have an efficient snapshot system, which may be just as hard or even harder.
Cancel is actually the hardest to do right because it combines the difficulties of both the progress bar and undo. You have to have a way to interrupt a long operation at any time and get back to before it started. And because "cancel" is most often used when things go wrong (ex: disk full, bad connection, ...) you have to be very careful with error handling.
- monsieurbanana 5y agoThe thing I've gather from this whole thread is that I made the right decision by choosing a functional, immutable language.