Lens caps are the enemy. Chuck em.
I haven't had that problem after I got my SLR. But with a 35mm compact it happened every once in a while. Usually with spontanious photographs.
My dad used to have an 8mm film camera. One day, at one of my sisters graduation, he filmed the part where she received her diploma. Perfectly focussed, steady shot. Back home he realised he accidentally pushed the button right before filming, when he took the camera out of the bag. The outcome was a wonderfull film of my dad's lap, followed with a focus session right before my sister enters the stage. After that, darkness. Followed by an off focus hand, the inside of the bag. :D