8/30/2008

08-30-08 - 4

God damn one of my great computer pet peeves is when I start up some big batch process to run over night, then I wake up and check on it, only to find that 15 minutes in it decided to put up some fucking prompt and stop running. Fuck you. I've written before about how you should always try to check all your possible failure cases and prompt the user right up front, but it occurs to me there's another pattern that people fail to do : defer questions to the end. When you hit a case that you need to prompt about, defer it to the end, keep processing as long as you can until you have to prompt. That way the user can walk away and then handle all the prompts at once.

Let me use a big dir copy as an example. Say I want to copy a big dir over to some other spot. First you should gather the file list and immediately check for things you might want to prompt - overwrite questions or make dir questions for example. Immediately prompt those at the beginning. Now go ahead and start doing the copy. Since you are not holding an exclusive lock on the drives, the files could change as you're copying, and unexpected situations might arise that require more prompting. If they do - defer them to the end. Finish all the copying you can, and then you might have a few little prompt cases at the end to wrap it up.

The Windows install is like the fucking devil for this. It takes almost an hour and it just randomly pops up prompts throughout, so you have to sit and watch it the whole time.

No comments:

old rants