I think a lot of times you have to ask yourself: Am I giving this advice to help others or for my ego? Then SIT on that for 30 minutes. You probably think you're helping others when really you're just trying to boost your own confidence and ego.
BTW when I say you, I don't mean you directly. Just you in the general sense.
A lot of unsolicited advice comes from the assumption that someone hasn't thought through their code or decisions. Asking someone first what their thoughts are on "X" or what their motivation was for doing "Y" is usually a better way to go about it because then you're not making assumptions and it may lead to learning lessons for the target and/or yourself.
You also have to think about the culture. For example, PRs have are asking for advice by nature.
In 30 minutes you'll able to give a ton of useful advice. Nice that you have 30 minutes spare while coding, but some of us definitely not.
At the same time I see your point, and absolutely agree, but this is only question of professionalism/egoism. Professionalism should be automatic.
As evident by all the CoC drama, I think tech is also plagued by people who have no concept of how to communicate civilly or that people's feelings can get caught in the crossfire so to speak.
"Interesting that you chose solution X. We tried that initially but found out that it caused problem Y when we set up our CI system, so we had to resort to solution Z"
"Why are you doing X? It's going to cause problem Y in CI. You need to do Z instead"
I know all of you have seen plenty of the latter, and not enough of the former. They both say the same thing in wildly different ways.
It doesn't have to be 30 minutes. My point in saying that is because people always give unsolicited advice without thinking about it. If you are forced to give yourself some time to respond, it's less impulsive and can be better phrased or helpful.
This can go for a lot of things too, not just giving others unsolicited advice lol.
As I said, I have understood your point. But I can also understand the human factor (ie when you, as a teamleader, are under pressure and constant stress, and you have to do XXX merges per day, you have 20 incompetent juniors in your team etc. - in situations like these, some people can easily lose nerves, and i totally understand it, although I do not think that this is professional behavior).
In a professional setting, it's a bit more understandable. But I have both gotten it outside of work. It's infuriating :(
Yes in this case it is totally understandable as it is nothing more than bitching. I'm sorry, that it's happening to you, but as Bryan Lunduke said, sometimes programmers_are_evil(). Big egos and so on. In my community (information security people) it is not much better, believe me.
Thank you Lindsey, I'm definitely guilty of both commenting to feed my ego (here on dev.to) and not spending enough time to think about how I want to respond or if I should respond at all
There is also human factor. If you keep repeating version 1. 50x per day, you might just lose nerves and choose version 2. instead. I have understanding for it, especially in cases when person who does the merges has huge incompetent team (which, sadly, often happens).
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.