For about 15 years straight I’ve been developing software in a team. Most teams did code reviews. A team of software developers that would look at your code and ask annoying questions like: 

  • Why did you do this?
  • Why not do this instead?
  • Can’t you rename this class?
  • I have no idea what your code is doing.

A good code review makes you feel uneasy. It doesn’t mean you have to agree with every comment that comes your way. A good code review should be about the how you do things. The design choices you’ve made. This way more than one person knows how your code works. So if you’re on holiday someone can cover for you. 

It’s not uncommon that people get aggressive over their territory. It may create conflict. In some peoples eyes it may even ‘slow down’ development. But it starts healthy dialogue about design.

Not having someone review your choices however is far worse. I’ve seen it far too often and it’s not limited to programming. I’ve seen isolated managers, software architectsmathematicians, … well any role really, that fall in this trap. 

It happens most commonly when they are the only developer in a team or even in the company. And it’s a slippery slope. The daily grind wears down best practices. It becomes far more practical it seems not to have unit tests, decent architecture,… You secretly know that this is wrong. Before you know you’re dropping model view controller principles. Hell, why not put all code in one class?

Suddenly you are continuously firefighting defects, you’re no longer creating new exciting features. How did this happen? Usually it’s bias and nearsightedness and code that is far from perfect. 

How can you prevent this?

Well the obvious solution is to do code reviews. Have someone review your work. Have healthy, be it uneasy, discussions about your decisions.  

Don’t have someone to go over your code? Make a list of best practices. Stick to them.

Take some time to make your code perfect. Once you have nothing to change, nothing to improve? Then it’s done. Not because it gives the impression it works. 

It will help you sleep at night. Did you do the right thing? Well at least you did everything you could.