Why Code Climate is good for society 10 November 2013

Code reviews are great, they produce better code, and allow convergence in style and approach, without the authoritarian feel of formal best practices documentation. Avoiding formality is something I hold dear, as creative free thinking individuals are who I want to be around, and who I want to be. The problem with code reviews, is that creative free thinking individuals will always have creative free thinking differences. This causes tension.

What I really want is a code review where I don't have to suppress the urge to defend my less elegant choices. A code review where my lizard brain sense of pride doesn't have a say.

The problem is that this defensiveness is natural, you poured your heart and soul, 3 days of your life into that final change set. Having someone you respect nitpick about that 10 line method somewhere in the 500 lines of change is hard. We both know it's shit, but the idea that your masterpiece has a flaw, and a flaw that may take another day of your life to fix is hard to swallow. This is normal.

A to D: Board has gotten worse

A computer saying the same thing does not tickle the same emotions.

Code Climate and other static code analysis tools spot common code smells, and let you know where you fucked up, or got lazy. They don't replace a human eye, but they can cover many of the issues that do come up, all without messy human interaction.

Here's the kicker. I can wiggle, and justify all I want, and it'll carry on telling me what I did wrong. Code Climate does not care about pressure to ship, it does not care about office politics, it does not care about you, or your fragile human ego, or even your hangover. Code Climate cares about your code, nothing more. I can differ with it's opinion, but if I want its approval, I'm going just going to deal with it.

And do you know what? It's almost exclusively right. I come out the other side of a Code Climate driven fix, with ok code transformed into great code. With lazy code, transformed into expressive code. I didn't need to do it, and a human reviewer would probably have agreed that it's 'ok', and ignored it, but Code Climate pushed me the extra mile. Not only did it make me better, but it told me I was better too:

D to A: Board has improved

Oh Mr. Computer, you flatter me.

I ❤ Code Climate.