I'm hired as a software developer at a company that has sites in multiple countries, and I was sent to the sister location in the UK to collaborate in an interesting new project. I was excited to join this project because I was the only person from my country, and the project involved some disciplines that we don't usually work with at my home office, though I wrote my master thesis on a similar topic, so I wasn't totally inexperienced.
At the start of the project, I sat down with a more senior SW developer and a systems engineer to specify the work I would do and break down tasks. So far so good, we agreed on a preliminary design. Back at my home office, I wrote a prototype from the requirements that the project members had agreed on, and then sent it for review to the more senior developer in the project. Because I was a junior developer at that time, I expected that the more senior developer would give me review comments so that I could fix my mistakes and learn from them (common review practice). Instead of review comments, he sent me a prototype that he had reworked completely not explaining the updates. I was surprised, because this is not common review practice at my home workplace, and a developer behaving like this would not be respected. Here I decided to try the diplomatic way and wrote down a list of questions of the design choices he had made when he re-wrote the prototype. The quality of the answers was very bad, he did not back them up with facts but instead used arguments like "I'm more senior than you so I'm right" and "I like my own design better". The argument for a fix he made which was less readable than my original design was that "this piece of code is more optimized". We both work mainly with embedded SW and this project would run on a PC so I asked him if one small optimization really mattered, no answer. Here I started to worry about the quality of the prototype because the customer deadline was approaching, and it had not gone through a proper review yet. The lead engineer for the project was CC:ed to this whole conversation between me and my senior colleague, and here he asked me to stop "fighting and disturbing my senior colleague" because the customer deadline was approaching.
It is an understatement to say that this experience made me disappointed and made me consider quitting working in the tech industry. Back at my home office in my own country, I told my boss and a colleague what had happened, and the only reaction I got was "Ah, shit! That happens sometimes." and I got reassigned to another project. Have something like this ever happened to you and in that case, what did you do about it?
tl;dr: Senior colleague rewrote my code not explaining why, and when I asked him questions about the updates I got answers like "I'm more senior than you so I'm right" and "I like my own design better". Have something like this ever happened to you and in that case, what did you do about it? There were no consequences for the senior SW developer, and I'm not happy with how my boss handled this. What should I do?