I ruin developers’ lives with my code reviews and I'm sorry

Original author: Philipp Ranzhin
  • Translation


Once upon a time there was a guy on my team so weak that he was going to be fired (a developer! Fired!). Every comment of mine was another nail in his coffin. I could almost hear the bang of the hammer every time I clicked “Submit review”. He was a nice person and I almost felt bad for him, but it didn’t stop me from tearing his work to shreds. I had an inalienable right to criticize his work, right? I’m a better developer, therefore I’m right. No one wants to say that bad code is good, right? He was eventually fired, not before leaving him without the customary bonus for a couple months.

I said to myself: “I’m not going to do his work, right? He was taking the place of a more talented developer. I did everything right”. But then I received another pull request for a review, and something changed. Drastically.

At first glance, it was the same as before. I opened pr, looked what problem it solved, imagined how I could’ve solved it, and looked at the code. As always, it was pure rubbish. Nowhere near the solution I could’ve come up with. OK, I typed up the general complaints and went down to details. String after string brought issues and semi-issues, punctuated by my passive-aggressive comments.

I was, again, technically stronger. A thousand-string pull request was littered with 200 comments, not leaving the person even a faint hope in his competency. Great.

I pointed the cursor at “Submit review” and then stopped and thought: why am I doing this?
The reason for these angry code reviews is obvious. As part of the team, I bear full responsibility for the project’s code base. I have to work with it later, after all. It’s a source of many issues for the business. The code doesn’t scale, can’t be tested properly, is littered with bugs. Support gets more and more expensive. It can’t be open-sourced or used to lure new developers.

And then this script kiddie comes along. That’s how the criticism always gets explained away, right? A good developer stands by the business’s interests, he makes sure the company carries on like clockwork.

But I don’t really believe that. I don’t think that’s my justification.

I was mad that, while I spent my nights learning F#, my daughter started calling everyone around “fathers”. And this guy, instead of getting better at his job, went home to his children. And I wanted to punish him.

Because I do code review for self-identification. I don’t give a toss about the project or the code. I’m simply a madman who’s allowed to hurt people. I’m a psychopath with a licence to kill. An alpha male with a huge stick.

When I realized that, I felt ashamed of myself. You ask me what I person I am, and I’ll answer that I’m a not such a mad, egocentric maniac. At least in other aspects of my life. Then why I’m so evil in my profession?



When I was learning software development, one of the most valuable sources of information for me were forums. I asked a question and got bullied in response: people were telling me that the problem itself is crap, my solution is even crappier, I picked the wrong language and I don’t deserve to be among the “good” programmers.

I wanted to get better seemingly only to put them in their place. It was like in sports — I trained not for a good cause, but simply to become “bigger, stronger, faster” than others. Kinda like a rookie boxer striving to knock out the big guy from TV.

It was painful, but I marched on.

When I became better, I gave my code for review to the real “wolves”. To developers more talented and three times more experienced than me. And every time I was promptly humiliated, and in a way that I contemplated quitting the industry. I was too dumb for all this. A week’s worth of coding destroyed in a matter of minutes, and I couldn’t even argue with anything — every note and complaint was ruthlessly obvious and precise. Strangely, every time that happened, the next day I convinced myself that in a year or two I’ll be better than them, and then we’ll find out who the true “king” is.

And finally, I became the exact thing I hated: a toxic asshat throwing his skills around like fists. I don’t do code review for the business, I just like showing the rookies their place. My skills have finally started to pay off.

If a guy brings me his code, and it has mistakes, it brings insane pleasure from how smart I feel. And then the brain kicks in and draws up a convenient explanation, like for a politician who screwed up. It’ll say that I’m actually doing the right thing, guarding the code base for the sake of the company. But “convenient” doesn’t mean “true”.

And if you tell me that you haven’t had this feeling ever, then you’re lying. Tell me about higher goals, training rookies and all that — I know you’re simply too full of themselves. And if you try to tell me that you learned to defeat that feeling (however it manifests in you), then I must be a pink unicorn.

But here’s what I thought. On one hand, I learned to code precisely because I was made fun of all this time. People awakened my anger, and this anger helped me improve. The universe blessed me with this trait so I can awaken the anger in other young and inexperienced coders, so they themselves become better coders and do the same to others, and so on and so on for eternity.

Our thirst for success at the expense of others is a simple tool in the hands of nature’s selection. And I would’ve accepted that as is, if not for a critical bug.



When you start to copy other people’s successful practices, but they’re all asshats, then you go “Hey, I can be like this too”. You start to sound like a bloody genius and a programming god, and everything starts clicking. You speak like you know your stuff, and people believe you.

I felt that I’m where I am not because I’m competent, but because I’m an egomaniac. All egocentric people I know are more successful than their more modest colleagues. Their code is better, they’re put into better projects and they earn more. Managers and directors consider them more valuable and coworkers respect them more.

It turned out that, instead of becoming a good coder, you simply have to convince others you’re a good coder. This behaviour begets a vicious cycle that produces not professionals, but toxic asshats.

And if you managed to make your way to the top, then you’re perpetually afraid that this veneer will dissipate. This leads to another logical fallacy: you try to convince yourself and others that external showings of power is what power really is.

When you work as a developer, you always have to argue. You, as a team, arrive on a solution after a lot of argument, even though we call them “discussions”. And yet it’s somehow important than your arguments “win” more often than not, just to feel good and confident in your power.

It reminded me of an experience I had. I used to be convinced that gays = bad. I didn’t think about it much: some long time ago my dad told me that, and I remembered. Once I was in a bar with a party of liberals, and this topic came up. I immediately announced my position on the issue, and they’re like “Phil, that’s messed up”. And we started to argue. I haven’t ever thought about the issue seriously and didn’t have any decent arguments, but I couldn’t stop arguing nonetheless. I had one goal — to win and save face. I still don’t know why.

I’m still like that, to an extent. It’s somehow extremely important for me to win in arguments, to always be right and do everything perfectly. Doesn’t matter whose idea is better, but it has to be mine that gets implemented.

It’s really, really messed up. I haven’t ever wanted to be like that!



This review I kicked off the article with? I didn’t send it. Instead I gave the guy a couple of comments and politely asked to fix a couple of things. No big deal if the code’s not good, I can fix it myself it I need to. But I can’t fix the psyche of a guy broken by dozens of harsh reviews.

My personality today isn’t my disease. It’s a disease of the whole industry, at least in Russia. Our mentality is predicated on the cult of power and superiority. And that’s what we need to fix: just stop being that. It’s quite easy, actually.

If we were being laughed at while young, it doesn’t mean you have to return the favor later on. The vicious cycle can easily be broken. Life becomes easier if you learn to lose arguments, if you can admit that another developer is more talented than you.

It’s an aikido-style move. I fool my internal toxic egomaniac, convince him that accepting your weaknesses is great, and it starts to be proud of what he’s done. And it doesn’t matter what taboos I break in the process if it makes me feel better.
Support the author
Share post

Similar posts

Comments 17

    0
    Genius
      0
      You are right!
        +4

        I tended to agree with the whole article until I read this:


        No big deal if the code’s not good, I can fix it myself it I need to.

        Please don't do that. Imagine being that junior developer: he tries his best, and a few days later he pulls a commit with all of his work gone and totally rewritten, how'd you feel? You're actually stating he's totally useless — without saying a single word. That's even worse than being slapped in a face with a ton of shit during code review.


        I prefer pair programming/refactoring sessions. Well, yeah, first sessions might look like you're doing all the work and he just operates the IDE. But people learn much better when they are deeply involved. A few sessions more and, viola, your junior developer is becoming closer to a middle.

          +1
          Indeed. If you see a problem in someones PR, explain them why do you think so and let them fix it.
          +3
          I agree with what symbix says above.

          For the most part this article makes sense and is interesting. The conclusion of what to do about it in his particular case isn't the best solution though IMO. This idea of leaving a short review on code that has fundamental problems, and then rewriting it later on yourself, is not sustainable and not helpful to the junior developer. Now you have the problem of the developer not gaining any new insight into how the solution could be improved, and they'll continue to make those same mistakes in the future. Along with the practicality that you're going to have an increasingly unmaintainable codebase. I definitely wouldn't want that as the person submitting code that needs improvement personally.

          The approach IMO should be to leave reviews that are constructive and help the developer understand the issues in their code, so they can continue to improve (or show you why their approach is a good one) and over time the reviews will be less problematic because the team is on the same page. The fact that in the first example that instead of this, the developer continued to have problems and was let go, tells me the reviews must have really not been very constructive at all.

          The idea of not being mean spirited or tearing people down is a good thing to share and think about, but don't go too far in the other direction.
            +1
            Great story with a happy ending. Thanks!
              +2
              If there's a member of the team that's consistently struggling code reviews are a terrible way of learning. They need to be paired with various (not just one) developers. Any developers who get sniffy about supporting the team get reminded they are part of a team and toxic behaviour can't be tolerated. If a, subjectively to our team, bad coder remains bad and consistently costs clean up effort, then you haven't got a team, or they're being assigned jobs incorrectly.
              Don't ignore them, or do faceless reviews, mentor them.
                +4
                That was a very good read and something I'll need to give good thought at, so kudos on that! I can also issue very heavyhanded criticism at other people's work sometimes — and sometimes I am aware of that, but other times I'm just on automatic pilot. This was a very welcome reminder not to be a jerk.

                I also wanted to bring something to your attention:

                It reminded me of an experience I had. I used to be convinced that gays = bad. I didn’t think about it much: some long time ago my dad told me that, and I remembered. Once I was in a bar with a party of liberals, and this topic came up. I immediately announced my position on the issue, and they’re like “Phil, that’s messed up”. And we started to argue. I haven’t ever thought about the issue seriously and didn’t have any decent arguments, but I couldn’t stop arguing nonetheless. I had one goal — to win and save face. I still don’t know why.


                A very solid psychological theory establishes that people's opinions are mostly an emotional process, not a rational one. This is the reason why you can spend lots of time arguing with people who lack the knowledge to support their points of view and can't seem to find obvious flaws in their own arguments. Here's the thing: when we're arguing, rationality doesn't really make us look for truth — it only looks for arguments which justify our position. If we lack the foundations to build proper arguments or our position is untenable, we'll just make up crap ones — and still we'll believe in them every step of the way. That's why arguing about most stuff, but particularly about politics and religion, is a painstaking process where there's often very little to be gain. We don't want to change our minds — we want to persuade others, but at the same time, we often reject the possibility that we ourselves are in the wrong.

                If this is something you find interesting, I'll strongly suggest you read Jonathan Haidt's «The Righteous Mind: Why Good People are Divided by Politics and Religion». Otherwise, at least I hope that you found the above explanation useful.
                  +2
                    +2
                    Congratulations!, you've successfully become one of those people that bullied and humiliated you. Some day your «egomaniac» will hit you really bad and you won't be able to pull it together.

                    Doesn’t matter whose idea is better, but it has to be mine that gets implemented.

                    I also think your conclusion it's not about learn to lose arguments it's about lose to someone who has your [out of control] toxic behavior. In one point you'll often find yourself in an argument defending a code which has quality of your former co-worker's code.
                      +3
                      When I was learning software development, one of the most valuable sources of information for me were forums. I asked a question and got bullied in response...


                      In my experience this is was the de facto standard for so many usenet programming groups. I remember the Perl group being outright hostile to new programmers, and setting up the rules against them.

                      Stack Overflow was a breath of fresh air when it came out. I was happy to never return to usenet after that.
                        0
                        Nice article! I bet it took a lot to arrive there and to share that with the world. Say, would you consider swapping the gender-specific pronouns «he/him/his» referring to other developers with gender-neutral ones like «they/them/their»? e.g. «If a developer brings me their code»
                          +1
                          This is Russia, baby. In Russia if the developer has a dick, we call him «HE».
                          PS: It's a part of culture, not a part of language.
                          0
                          What is wrong with you! How can you mess up this sentence with bad spelling! If you can't write 100% to perfection, don't write at all! «I can fix it myself it I need to.» Criticizing is a lot easier then helping/teaching. «I can fix it myself if I need to.»
                            0
                            I hoped to see examples of wrong/rubbish code, and how it could be rewritten in the right way.
                            Without that I see a developer, who claims he is a best developer in the world, and he just cannot see other good solutions. I think it is good way to listen, why he done such code, to understand approaches applied by those guys.

                              0
                              Man, move to Oz. Spend here a couple of years. Learn how to relax and enjoy your lifestyle.
                                0
                                talking about code reviews...here is another article that is very explanatory for those interested in joining the world of web development blog.quero.com/become-web-developer

                                Only users with full accounts can post comments. Log in, please.