Rewarding for LOC

I stumbled upon a company that rewards their developers for the number of committed lines of code, and generally for the number of commits. What an utterly idiotic idea!

The thing is, it’s not that hard to write a code that works. It’s not hard to write a lot. With enough hard work and enough attempts everybody can achieve it. But the true skill, and the reason that qualified programmers are so well-paid, lies in the ability to write good code. Clear, simple, short, without duplication, understandable without any comments or introductions.

Writing some repeatable code in ten places makes you earn 10x more LOC than just wrapping it in a reusable function. But if you ever need to come back to that code, understand it and modify it, having it abstracted to a function makes it 10x faster and easier.

Good design and maintainability are worth so much more than just a sheer number of lines.

Another example: every serious developer knows that dependencies shouldn’t be included in the repo. We have Composer, Bower, NPM, Gem and so many others to handle the dependencies! But imagine your boss pays you for LOC, and you could “earn” millions of them just by commiting all the external libraries to the repo... Could you resist?

In the and, the “most active” programmer in that company turned out... not to be a programmer at all! He just set up all the new projects with bootstrap code. Surprise, isn’t it?

A photo of me

About the author

Hi! I'm Andrea (they/them). I tell computers what to do, both for a living and for fun, I'm also into blogging, writing and photography. I'm trying to make the world just a little bit better: more inclusive, more rational and more just.