While programming, I waste a lot of time thinking about small and irrelevant details in my code.
For example, if you're given two strings $$$a$$$ and $$$b$$$ of the same length (which is unknown), it's more natural to do
int n = a.size(); instead of
int n = b.size();, right?
I prefer the first method. However, sometimes I feel bad for not using the second one. I think it's unfair to keep using the first one, so I alternate between the two. But when I use the second one, it looks weird (as I said, the first one is more natural), but I can't change it because I already used it.
It's very distracting. I can't think about the problem because these thoughts run through my mind. I end up wasting a lot of time and getting unnecessary penalties in contests.
Is anyone else troubled by this? What do you do to get rid of these thoughts?