A question by it's nature isn't aggressive. The words "should" and "we" are the real cancers IMO, as in "we should have done..."
I think your example of have you thought about, vs. Why did you is potentially better but I personally don't have an issue answering either question or feel attacked in either case.
I would on the other hand be concerned about working with someone immature enough to read in so far to perfectly innocuous curiosity.
"Have you thought about this approach" can come across as condcending. Of course I thought about that, it was the first thing I tried before the much more complicated solution that actually works.
"Why didn't you do it this way" invites them to share the war story of what happened when they tried doing that.
That said, I never liked the 'sandwhich' method, saying; "Great effort. The result is horrible, like your indentation though."
The trick is to know who you are talking to. If they did think of your idea, accusing them of having missed it is offensive. If they didn't consider it, asking them to justify their reasoning puts them on the spot.
Overall I agree with your assessment though. People giving this sort of feedback usually focus upon the problem and grasp at straws when it comes to the compliment.
This is what I want to hear. Tell me you first considered it and ruled it out because of XYZ. No where am I saying “I think you’re incompetent and I would have done it this way”. On the contrary, I think you’re the right person for the job and I want to hear the assessment of the various other approaches (if any) and why yours fits the bill. It could be as simple as “well, mine does Y, others don’t”. Next time someone asks you about your approach, try not to assume they are trying to belittle you or get you into a “gotcha” situation.
I’m sorry that you had bad managers in the past and are hurt by someone asking about your methods. I genuinely want to know so I can defend the choice to the higher ups on your behalf.
"Why didn't you do it this way?" I trust that you considered many alternatives. Can you tell me your thoughts about the decision you arrived at?
“have you thought about this approach?” You probably couldn’t imagine this possibility, let me do it for you. Checkmate!
I can also see how they could each be interpreted in the opposite directions.
I’m betting it’s more about the contextual body language and tone they’re delivered with than the words/sentences themselves that matters, which I just don’t see being that different once you look behind them to see the gist of the message.
That’s the double edged sword of text-only communication: you can choose to interpret everything charitably, but you can also infer a condescending tone even if it wasn’t intended.
Expecting people to wordsmith to your individual taste is just asking for otherwise fine coworkers to be mind readers.
I love being told short, crisp, critical feedbacj that is data dense. Any overly verbose communication adds a layer of parsing and interpretation which may be unnecessarily ambiguous, which is more costly and for the benefit of what? a subjective opinion that it is 'more social'?
As with most things, it depends and knowing your audience goes miles.
Only having one is a form of poor social skills.
It doesn't mean you have to be mean about it, but you can just spit it out.
Wrapping of criticism in praise is a poor substitute for genuinely praising good work, and being empathetic and helpful with direct, unambiguous feedback when someone can improve. Mistakes are inevitable. They're not a problem. It's ok to discuss them directly.
'Why didn't you do it this way?' reveals an expectation that you would have done whatever it was 'this way', but it doesn't indicate that that expectation is normative. A junior might well ask that just because 'this way' is the only way they know how to do it, and they're curious about whether the developer they're asking chose a different route for stylistic reasons, performance reasons, or out of some entirely different consideration. Nothing critical about it.
Inferring criticism from mere surprise may be uncomfortable, but it also seems a kind of misapprehension that will very quickly sort itself out as the conversation goes on.
In contrast to the case above, by the way, 'have you thought about this [other] approach?' does imply that the asker knows better because it very directly and explicitly raises the possibility that the one being asked hasn't even considered alternative implementations.
Imo a lot of the difficulty with things like this comes from high turnover and/or siloing. When you're working with someone who is basically a stranger, that means you've hardly had a chance to build up a real sense of rapport/trust/comfort with that person. So it's easier to doubt yourself and harder to know what the other person really intends.
Most differences in communication style or preferences about how to approach criticism are at least somewhat easier to deal with between people who know each other and understand what their particular differences are.