I'll throw a recent experience out there too. Totally my own fault and fortunate that nothing came of it beyond embarrassment of onlookers seeing my difficulty. I back into a narrow slip that has pilings to the left and right of the bow and it can be tight to pull forward and turn stbd to get out if there is any wind behind me pushing.
Had a person aboard on her second time on a boat and she was on the port foredeck. We had a stiff breeze from the aft (slightly port quarter) so cast off the stbd lines, had her release the bow port line and drop it down the hatch, put the boat in gear at idle, I relased the aft port line, and we were off as she happily bounced back into the aft left corner of the cockpit. We were doing fine bumping in and out of gear but before the right winch reached the right bow piling and with the wind behind I decided to throw a line on the piling to help pivot right. Done it before, especially solo, and it works great to just give a bit of drag to that side of the boat when the wind is stiff and from behind.
The bow came around to the right as planned till damn if the line didn't snag on the piling. The surprise was that the bow kept on coming right as the wind seemed to catch & push the bimini forward out of the slip, we were in neutral, we keep slowly pivoting right, and all too fast I'm watching the anchor of the neighbor boat look like it was going to impale us in slow motion. She would never have the strength to effectively fend off and she was in the aft left, so I told her to just hold the wheel (straight) as I jumped forward to fend off as we swung on the snagged line toward the anchor.
Ooops. She just did the 101 sailing class with tiller boats and saw us moving right, so moved the wheel right just like you'd do with a tiller - causing us to go faster TOWARD the anchor with me now in the middle. Now she was flustered and as I muscled us to prevent contact - in my calmest voice (not feeling it inside) - I said "Please turn the other way now" because (A) I am suspecting we are in gear and (B) what she did was obviously backward even if she didn't realize it and I hadn't picked up right away. Fortunately about this point the snagged line popped loose from the piling and the boat slowly motored forward which was when I realized I'd not gotten it into neutral. That's what actually set up the whole scene, as the snagged line alone would have simply held us at an angle between the rows of docks.
A missed shift, snagged line, noob who should not have been called upon, and not realizing her action was backward fast enough. These were a number of mistakes and ALL were on my part leading to a stern blow by blow self-critique as the adrenaline wore off. On a big boat, I couldn't have muscled us away from that anchor and would've stepped aside as it hit due to my mistakes. Fortunately no damage, we had a wonderful rest of the weekend, and I greased the return into the slip.
Accidents are almost always a chain of events, not a single item, & we all occasionally have a bad launch or return so maybe this one will help one of you mentally game yourself with some "what-ifs" and think about how you'd react. Missed that the boat was in gear at the worst time? Have something snag? Miss that an order is executed backward?
As Yul Brynner would've said "Etcetera etcetera etcetera"