Do a better code review by having empathy
There are at least 17 Homo species who ever inhabited Earth discovered until now. We, as Homo sapiens, were able to evolve and dominate this planet, but why? What make us so different which turns us the only survivor among every Homo species?
We have a great collaboration ability. We’re masters on it. We can work together and have great capabilities of socialisation. Everyone is doing what’s better on, separating responsibilities for everyone’s benefit.
It’s pretty easy to apply this concept on our workday, as programmers, we do it in a daily basis. We work with designers, QAs, product managers, backend, frontend and mobile developers. Everyone knows how to do its job. Some products would be impossible to do with another people helping us on what we’re not capable of.
But we weren’t and still aren't the only who knows how to work as a group. Neanderthals used to work together in small groups, chimpanzees have a pretty organised society and even ants are capable of working together as they were only one animal composed by thousands of them.
So why? Why are we that amazing? Is it just because we’re more intelligent than any other animal who ever lived here?
That’s impossible to measure but estimative shows that neanderthals used to have about the same brain size compared to us. And even so, what have made us develop this huge intelligence?
Empathy to learn
We cannot know too much about how our old cousins used to live. But we know somethings. We know that they used to live in smaller groups and even being of the same specie every group seemed to live far from each other.
Some specialists argue that we have one skill more developed on us than in any other animal. And that’s empathy. We have empathy enough to share knowledge to other human beings even if we don’t know them very well.
Have you felt anything about those persons in this picture above? If you have, congrats, only we, as animals, are capable of it just by looking at someone else's picture.
Besides many people think of programmers being introspective or people who aren’t capable of socialisation (and it may be true for a large amount of us) empathy and socialisation is in our DNA, that’s our nature. If so, we can build it.
Without empathy our sharing knowledge skill won’t reach its full potential. And even tools which purpose is to do it, like code reviews, will fail if we don’t practice how to be empathic with our team.
When code review started to be a thing it was just to assure product quality by having another people looking at your code searching for errors. But sooner it was spread among developers another advantage was noticed. It was a great tool for sharing knowledge.
Raise team quality always has been a manager's concern. And one of the most difficult to succeed. As code review showed everyone its great capability for this purpose nowadays this' the reason most of companies adopt this practice.
We can’t share knowledge if we aren’t empathic
There’s a selfish reason to be selfless. And that’s if you’re able to listen other people you’re able to learn with them.
One of the main issues of code reviews is that it happens online, and is pretty noticeable that internet is a very toxic environment. It happens because face-to-face interactions are very important to create empathy as it’s much easier to notice people emotions.
But there still are examples of people being empathic there. That’s because some people are capable of sharing experiences to connect with each other, and it builds empathy. We can be empathic with words depending on what they’re saying to us.
To develop this empathy we must always try to understand the reasons behind someone else's solution. Ask yourself what's happening, why, try to be the person behind that code. Always assume good faith. People are always trying to do their best, and if they aren't it has to be for a reason. Are they with personal problems?
Code review isn't exact, every person is different and we should do it with this in mind.
Another way to create empathy and trust is by praising efforts and good points. Don't be that kind of person who only shows yourself to criticise everyone else's code. In fact, always praise when possible and avoid criticisms if they aren't that important at the moment.
There are some empathy enablers/disablers studied in online communities, take a look at some of them:
- Shared interests. Because empathy tends to be strongest among those that share common experiences, the presence of niche online communities can set the stage for higher levels of empathy among members.
- Cyberbullying is any bullying that takes place using electronic media. Studies have suggested that individuals who are bystanders, that is, witnessing someone bullying someone else, are less likely to intervene in online contexts.
- Internet trolling is “the practice of behaving in a deceptive, destructive, or disruptive manner in a social setting on the Internet with no apparent instrumental purpose.” Although empirical research on trolling is limited, studies have suggested that internet trolling may be a space occupied by already-sadistic individuals who can easily disrupt conversations and communities.
- Ambiguity. Because asynchronous, text-mediated online conversations lack the richness of interaction and cues that face-to-face interaction provides, online communication tends to be much more ambiguous. This ambiguity may decrease members’ abilities to find similarities in one another. In both online and offline interactions, increased perceived similarity is associated with increased empathy.
Change is the key for evolution
Another key factor about Homo sapiens success I've been hiding until now is we would never be able to succeed if we wouldn't be able to change and adapt to every situation.
We, humans, are what our environment is. We hold on ourselves, our family, our friends, our nation, our neighbourhood… That's a very important factor about Homo sapiens.
We're capable of evolving without needing to go through a cocoon or change our DNA. That's because we change and adapt according to our environment.
Don’t defend your code as it was your child
When we advise a code change we are doing it for a reason. Try to understand this reason and be on the adviser' skin. It’s everyone’s concern to keep the code healthy.
Remember that it's not about you because your code isn't yours. You probably won't be the person who will be responsible for maintain this code in a couple of years. We need to see our code as it belongs to the team.
As long as you have learned something, that's all that matters.