Lines of code

What does evaluating lines of code prove?



As part of a significant restructuring at Twitter, Elon Musk brought in engineers he trusts from some of his other business interests, namely Tesla and SpaceX.

These engineers reportedly decided to actively use the number of lines of code software engineers had written in the last three months as a measure of their employability.

This is at worst painfully ignorant and at best a relic from 1990s-style management thinking.

Broadly speaking, you could argue that if someone has written zero code for an extended period, it's worth investigating. Usually, they are either off sick or trying to solve problems elsewhere.

However, on a day-to-day basis, it can be a practically useless measure. For example, a poor software engineer could decide to write 30 times the code of a good one. It's trivial to bulk out any solution and make it ten times or more in size while doing absolutely nothing better. This is one of the reasons it's a poor metric to use; it's a fence post with no planks.

The flawed approach taken was fortunately exposed when the same people who conducted the firings panicked upon realizing that they had let go of entire teams of people they actually needed.

There are many ways to assess performance in software engineering, and simply using lines of code written is not one of them.