Have you ever met a developer who never believes that his/her code is “not the best”. Makes it difficult to work with, isn’t it. Ever thought why does s/he feels that way though? It’s simple. Because s/he loves his/her code. And what happens when you love your code? You can’t accept any criticism for it. In this article we are going to talk about this problem and its effects.
In software development there can always be more than one way to do the same thing. And none of then have to be wrong. You have to chose the one that suits requirements keeping the current situation, time, budget, skills and risks & constraints in mind. There could be more things in this list depending project context. A well functioning team would require everyone to understand this fact. Otherwise we will all be be fighting over whose approach is the best. And in worst case, repeated instances of these kind of arguments becomes personal and starts affecting team environment. Trust me, you never want your team to have people who don’t like each other “personally”.
People loving their code and not being open for criticism is a serious problem today in many agile teams. It doesn’t have to be already written code. It could a technical approach that you proposed. A technical approach is just some code that has not been written yet. If you want to assess your team for this problem, just notice how the tech huddles are going. Ask these questions :
- Are you reaching conclusions?
- How long are the tech huddles going?
- Do discussions over technical approaches turn into heated arguments often?
- Do people get defensive when any one offers an alternative problem to solution?
- Do new joiners and less experienced folks feel comfortable challenging ideas proposed by senior developers?
When you fall in love with your code / idea /solution / approach you blind yourself from other ideas that may be better suitable at that given time or constraints. Other ideas just don’t seem good. You start to defend your idea. When this happens, there are three victims.
The first victim of this is the project as it has been deprived of alternative and probably better solutions. Then there are teammates who feel frustrated and discouraged to put across ideas on table. Then there is you. Yes, by not being open to new ideas, you have deprived yourself from learning something that could have been better that what you already know. Another reason you are a victim is people like you less when you don’t listen to them.
It’s very easy to think that you are right. It takes an open mind and a conscious effort to evaluate your idea and compare it with others with no bias. It takes courage to think rationally and then arrive at conclusion that there could be a better solution than yours out there. When you and everyone else in the team thinks like this, it doesn’t matter how different your ideas are… you will always end up with the best solutions for the project and with a healthier relationship with the team.
So be a nice & don’t love your code.