You have to f#@king paddle.
You might relate to the situation when you walk in front of somebody, crossing your paths, and neither of you knows the intentions of the other. You get closer, and you try to turn left so as not to bump into a person. Unfortunately, at the same time, they turn right, so in response, you try the other side, but with the same result. You do a chaotic dance for a while. Finally, with either a smile or anger, one of you says where they will turn and resolves the situation. You both can go your way.
A similar thing happened to me recently on the lineup while surfing. I was paddling out, and suddenly I saw a nice wave coming in my direction. I was a bit further in, and I saw somebody paddling to it, but I believed my position was better, so I sat on the board and waited to see what would happen. When the wave got closer, I realised I was too far in, and the guy sitting further out could get it, but I wasn't sure which way he would go. The wave wasn't breaking in one direction, as it often happens on a beach break, and I struggled to read the guy's intention. I sat for a bit too long, waiting for what will happen. The guy looked at me from the top of the wave, I looked at him from the bottom, and we did the classic, confusing dance. As you could imagine, he crashed on me and wasted a wave that could give him a few nice turns. Then he said the words that I mentioned in the title "You have to f#@king paddle". I couldn't phrase it better. I made two mistakes here. First, I didn't read the wave correctly and waited for too long, hoping I could get it for myself, and when I realised that he was catching it, I should have just made my mind choose a direction and paddle there, throwing the confusion out of the window. My confidence would help both of us get the most out of the situation.
While coding, you can often end up in a similar situation without realising it. You understand the problem, you know the best solution, but at the same time, you know it is not the only nor the perfect one. You choose a direction and start coding, but suddenly you see its drawbacks very clear. You start doubting if other approaches wouldn't be better and if you won't end up regretting your first choice. You think you need to be agile and switch to something else, but it doesn't work as you expected, so you switch back. You might stay in this confusion for a while. In the end, rush with a solution that is a mixture of all approaches, far from ideal.
In all examples, lack of confidence can lead to undesirable results. I don't argue to never change your mind, but I advocate not switching your opinion until you are not confident enough that you won't switch back in a second. We need to believe in our abilities and take responsibility for our actions. Listening to the feedback from the world is crucial, but we can't' be too sensitive about our ego. We often choose wrong and later need to deal with the consequences. Still, it is way better to deal with the results of your actions rather than blaming others for your mistakes or staying in a no-action zone, confusing both ourselves and everybody around us.