Minimal state. Recordable state at every transition point. This lets you bookmark your point anywhere in your work, go backwards and forwards, save your spot and come back to it, etc.
This all goes back to the entire state being a little token that you can just grab and store off. Granted, lots of web pages fuck this up because they use some server-side shit and they don't show you all the public state or whatever fucking dick-ass thing they do. But good old fashioned Web gets this awesomely right.
It's actually a paradigm that I think more developers should espouse in their Win32 apps, both publicly and internally.
By "publically" I mean you should expose it to the user - let the user drag off the current spot to a link, and let them restore. This should be in like every app. The full state of the app should be in an edit box somewhere that I can copy/paste or drag to the desktop. I should be able to double-click it to jump back into the app at that same point.
"Internally" I mean it's nice to make sure your state some very simple plain C structures, so that you can just push & pop or save old versions of the state, like :
State save(curState); DoSpeculativeStuff(curState); GetResults(curState); curState = save;this is actually one of the new things I'm doing in my Video Test framework and it has been awesomely useful.
Yeah yeah the C++ way is to give every member a stream-in/stream-out, but it's too hard to maintain that robustly all the time.
This is actually related to another very important programming paradigm in general : minimize state, and avoid redundancy. Don't store variables that are computed from other variables. Don't copy values from one place to another. Always go get them at the original source. This is a massive bug reducer. Every time I see something like "this variable must be kept in sync with this variable" I think "why not just get rid of one of them?".