Sometimes, and often, I am wrong. I love it. It hurts so good, and as makers and supposed-experts we really need to get used to it.
The immediate instinct is to question myself: Why and how am I wrong? Did I explain my idea correctly, did I have the correct mental model, did I misunderstand something? What contributed to the result that I am wrong? How can I avoid that as a pattern so it doesn't count against my reliability? What kind of measures can I take to ensure what I say is interpreted correctly and insightfully?
An example of this recently was to do with an implementation of a front end feature. I was new (several months new) to the framework and after reading tons of senior dev blogs, tutorials and analyzing out-of-the-box tools for such an implementation I decided to go with the aforementioned for performance reasons and the fact that it would hit 2 birds with one stone. I decided to spend 2 weeks making it happen. No one else on my team had done it before, and so they couldn't offer much help or feedback.
It did not work perfectly by the time I submitted it; it was 90% there. Trying to fix the remaining 10 percent was a nightmare because of how unfamiliar with the framework and its state/event management I was.
I took two days creating a fix that ran much slower. Someone else came along and redid part of it in 2 hours. I was really astounded. It was one of the few times I had really thought my idea was correct and stood behind it. I usually think everyone else has more experience, more education, more rigour than me, but why, of all times was I so confident and sure of myself?
How do you come back from being wrong? What do you do to restore trust from your team? What do you do to smooth things out?
I usually like to take some time to assess this and offer a personal message. It could be a text, reflection or short chat telling someone what my misstep was. I apologize if I let my ego get in the way, and describe the reasons why I reacted the way I did, or what it was I thought led me to such an assumption.
This is not a hill I need to die on. Being defensive makes the situation worse and makes me harder to work with in the eyes of someone else. Admitting (and announcing) my own failures publicly hopefully inspires others to be just as honest and human. (I definitely catch on to the ones that like to revel and find a source to blame though).
Now for something going really wrong, and it might not even be your fault. How do you explain that? I've been there. I opt to take the most positive retelling of the situation even if I want to be blatantly honest it was more complicated than that. It never works. People don't want to know the details; they want to know how you learned and take ownership, and what you did to move past it. You can only change how you react, not what happens :)
NB: the kind of "wrong" I'm talking about is a judgment error or mistake that leads to tech debt, loss in productivity or time or bigger bugs down the line. This is totally different from someone constantly flagging you for every little reason to be wrong (I have recognized those deliberately trying to drag). I hold myself to high standards and always think there's a better, more concise or readable way to code. But when you've got people picking at every whitespace or expression rigour... then that's sus. Really sus.