November 8, 2007
Just hypothetically, imagine that you are working in a Windows environment [sigh] and want to copy a selection of files in a folder to a new location.
You select the folder. Copy. Select the destination. Paste. Windows helpfully alerts you that it is getting ready to copy (lucky, I was worried about that). Then it starts copying. Copying. Copying.
Now, it’s a pretty big folder, so the operation is apparently going to take about five minutes. Whatever. You go and make a coffee. You get back to your desk expecting the operation to be complete, and instead find a dialog box telling you that “file x has a lock blah blah and can’t be copied“. Whatever. So you click OK and think nothing more of it.
Later you waste a hypothetical hour or so troubleshooting a problem that appears to be occurring because your system can’t find the files you just copied over. And why pray tell can’t it find the files you just copied over? Because apparently you didn’t.
You see, when Windows encounters a problem during a copy operation, not only does it stop copying and wait for a user to click OK (some obscure reason requiring acknowledgment for something the user has has no option to fix), but once you have accepted that yes, yes, file x can’t be copied for some reason that I really don’t care about, the copy operation stops without completing the rest of the copy.
So the operating system:
- Takes the list of files you have asked it to copy.
- Decides on some completely arbitrary order in which it will execute that copy.
- Then if it encounters a problem partway through that arbitrary order, makes the assumption that it is safest to not finish the completely non-destructive operation you just fracking asked it to do.
Why is this so difficult? Just:
- Continue the copy operation in the background while it waits for my input, and
- Finish the copy.
Or I’ll make it even simpler:
- Don’t wait at all, just keep a running list of files that failed to copy while you complete the operation.
I know, some monkey is going to complain that they didn’t want to copy those files, and if the copy finishes they would have to go to all the trouble of deleting all those files that they didn’t mean to copy. Boo hoo. Good design should engineer for the common case, and then allow handling for the exception. Windows appears to have this arse backwards.
EDITED TO ADD: This story is entirely true. Not even the name of the operating system has been changed to protect the innocent. I must however thank the sadly finished Logically Critical podcast (Episode 26 to be specific) for the rage that inspired it, and apologize for inadvertently ripping off the description of a similar incident (involving deletion of files) described therein.
Actually just listen to the podcast. He’s wittier than me and he does funny voices.