they immediately start thinking they're better than me, they start questioning any technical decision I make in a humiliating way,
How can I talk with other seniors without them feeling superior over the long-run?
I think this is what real seniors are about, they avoid making others feel inferior.
> Maybe find a better place to work?
I want to, but the other senior was a friend of mine that I don't want to lose.
Do you know how I can fix things and regain my respect?
This is hard. A real friend, you could say "this is hurtful" but it's been my experience both sides of this (saying it, and having it said to me because I have been a royal prick sometimes) is a hard place to come back from. The friendship will be different afterward.
If this is causing you enough damage (in some sense) its possible sacrificing the friendship is more important than retaining it, for your own sense of self-worth. I wish this wasn't so, I hope not, but if you begin to find this becomes a core problem for you, then I don't think this friendship justifies the damage it is doing to you.
I did bad things at work, and it went to mediation, and it worked really well for me. I think it worked ok-well for the other party, but I felt I shed burdens and learned things (I was the offending party btw) -So, its possible something formal like mediating this outcome could work.
You regain respect by getting clarity on what they meant when they said the humiliating thing. "When we were X, you said Y. By that, did you mean to imply Z?"
They'll either clarify that they didn't mean Z or they will double down and explicitly ridicule you.
In the first case, problem solved. Maybe you talk about why his words would make a reasonable person feel ridiculed, maybe you don't. Either way, you've eliminated the possibility of misinterpretation, which always exists when humans communicate.
In the second case, you need to actually confront him about that if you want to gain respect. Look him in the eye and say something like, "Okay look dude, we're here to help each other learn and solve problems. If you're going to ridicule someone for asking a clearly-framed question, you're not doing a good job at that. That's a serious problem. How can I help you practice that?"
Is this confrontational and therefore uncomfortable? Absolutely. Does it require enduring an uneasy feeling in your bowels as you stand up straight and maintain eye contact? yep. But being willing to deal with uncomfortable situations, keep calm, and drive problem-solving-focused confrontation is necessary for the sort of leadership that earns the respect you are looking for.
The humiliating behaviour part is simply unacceptable. You might need to talk to HR and ask them to remind senior staffers not to do this, and that annual review process includes feedback on this kind of thing. The problem there being if you can be identified by context, you get all the negativity which goes with that kind of thing.
They sound like asshats, frankly. Is it possible they just need to be told to can the ass-hattery?
Bullies sometimes can't be stopped. They have to be avoided. The problem is that senior bullies are glued in place.
A cheats way out would be this:
actors: Ron, Frank (seniors) and Debby (junior, or disrespected less-senior)
Debby: hey, Ron, I think I heard frank say <theory of debby>
Ron: oh yea, thats true and cool
Debby: hey, Frank, I think I heard ron say <theory of debby>
Frank: oh, Ron, he's a complete twonk. Thats rubbish this is why...
Another cheats way out might be "..I read in Knuth that ..." or "Van Jacobsen said to me that ..." which puts the words into somebody else's mouth.
I read that to overcome the same structural behaviours in the Astrophysics community, some senior astronomers took to asking questions for PhDs because they weren't getting traction, and I have also read that Nils Bohr and others used to commit deliberate solecisms in workshops, to remind people anyone can make mistakes and encourage junior staff to speak out and correct them. Which is kind-of sad, manipulative, but what it says is "this is a problem of some long time.. " oh wait.. sorry.. sorry.. I'm doing it again...
> A cheats way
I see your cheats way is to put words into somebody else's mouth,
which should work in an environment where there are more than 2 senior devs, but we are only 2 seniors, so the "I read in Knuth that" method should work.
How can I get my respect back and not cheat around the issue? should I dive into more advanced topics and show it in my work?
Professional development, in field can help. I have a colleague who does FP, but can't find enough tasks at work to use Haskell on, and he does a monthly functional-coders meetup and gets a huge amount out of it.
I found asking other people if they'd hire me gave me a lot of confidence around how I felt in role. I didn't waste their time actively seeking jobs, but exploring what you are worth outside your current role can be validating. It pays to have options.
My cheats way is really not ok btw. You can't sustain denying your own ideas. But, once you can get over the sense its a game they're playing and the actual ideas have merit, its somewhere to move from. You maybe get an ah-HAH moment from it but I suspect that doesn't play well
(37 years in, I'm only too well aware of hearing my own ideas played back at me. It used to infuriate me but now, I take it some kind of compliment they finally soaked in, if other people take ownership of them)
> If you respond in a similar way when asked questions then it’s just your ego having a hard time when the situation is reversed.
I 100% don't respond in any similar way.