I see these way too often, and most operations really should feel instant to the user. Little things should not be taking multiple seconds to complete.
And for the occasional actually-time-consuming task, calculate the end point so you can display a proper bar. An indeterminate spinner is laziness, forcing the user to wait an unknown amount of time when you can probably figure it out.