Did Elon Musk Really Fire People Using Lines Of Code As His Metric?

Nathan Dumlao on Unsplash

This post is a response to Bennett Garner and his article Elon Musk just force-ranked Twitter engineers & fired the bottom. From the article:

“Lines of code written in the past year” was his metric…

I am here to critique his approach to reducing overhead. Recent reports have Twitter at a 50% layoff. Half of Twitter employees are getting fired.
Source

I am a fan of Bennett Garner’s blog, but I did want to drill down a little bit because it seemed suspect to me. There were no citations — was Bennett Garner making a joke? If not, is it possible he had misinterpreted one of Elon Musk’s many, many memes?

Here’s what I found:

  • They have also been discussing this on HackerNews and r/Programming
  • The source seems to be Gergely Orosz, a fairly popular tech writer and former software engineer manager who is also called “Pragmatic Engineer.” He is responding to a supposed leak
  • So, to be clear, it’s possible or even likely that this is true…but it’s not like Elon Musk officially announced this or wanted it to be known. Also, if you read the Tweet below, it seems more nuanced.
https://twitter.com/gergelyorosz/status/1588906808395333633

It’s also possible that this could have been one of multiple factors considered — rather than simply checking GitHub, looking at line count, and firing whoever was at the bottom of the list.

All of that being said…

Reasons For Controversy

According to India Today:

Elon Musk is the new Twitter chief. On day one, Musk asked Twitter engineers to print out their code for review. As per reports, Musk has asked the engineers to show the recent software code they wrote. The engineers were also asked to print their code. Musk fired Twitter executives Parag Agrawal, legal head Vijaya Gadde and CFO Nel Segal were terminated as soon as Musk took over. The Tesla CEO wants to make Twitter a “free” space and wants to work humanity.
Source, “Day 1: Elon Musk asked Twitter employees to print out their code for review”

I am not a huge fan of the article above — I don’t really know what “wants to work humanity” means, and I find it has a tendency to preface things with “according to Bloomberg” without actually providing a citation. What they do include is a photo of someone at Twitter with printed source code, which sounds like good evidence to me. Here is the tweet and photo.

Yes, she could have faked this…but I doubt anyone would take that kind of risk. It would look more than a little suspicious if a software engineer facing new management frantically printed proprietary source code without being prompted to do so.

Hey, is that Swift?

“Okay, but what’s your point, Evan?”

The point is that this all seems kind of bizarre to me. I don’t want to dive too deeply into what did or didn’t happen, nor do I want to state my opinions of Elon Musk and his leadership practices…I also want to give Pragmatic Engineer the benefit of the doubt, as he seems to have sources inside of the company.

Really, all I wanted to add to the conversation is that he at least didn’t auto-fire everyone who committed the fewest lines of code.

But yes, physically printing code is inefficient and not something commonly done.

Why Lines Of Code Is A Bad Metric

Feel free to read Garner’s link above for an in-depth explanation of why this is such a bad metric. Bill Gates famously said that measuring programming progress by lines of code is like measuring a plane by weight.

Let me just give you an example. I made a really small contribution to an open source website called Gem5. If you look closely into the specific example, you could poke holes in it…it’s mostly plain text and markup, rather than code…but I still think it’s a succinct way to make my point.

There are tutorial pages. There was a forward button and a back button, but they did not do what they were supposed to — they quite simply refreshed to the current page. I applied a fix, but it did not work as intended. Instead, it randomly moved someone to an arbitrary page.

Frantically, I apologized to the team on JIRA…then a thought hit me and I found a workaround. I could rename some files, so that they appeared in the correct order alphabetically. This was hacky, but I did find some forum posts by other people who had to do the same thing (not that this makes it any less hacky).

tl;dr I wrote about three lines of markup, but GitHub says I contributed more than 8000 lines of code.

https://github.com/gem5/website/graphs/contributors

Steven: Nope, it’s actually 8343–8346. You contributed negative three lines of code, so you’re still fired
Me: No, it’s absolute value. So I actually contributed 16,000 lines of code

We could also have an argument about whether this was even code, but it should have been a three-line contribution. One commit renamed all the plain text files, though, so I effectively modified every line of the plain text files.

Other one-off cases:

  • Web scaffolding
  • Configuration files

…and this is not to mention all the other nuances of software engineering, like people who do high-level design, people who simply write more valuable code, and so on.

Closing Thoughts

In short, firing people by lines of code is a bizarre metric. At least in this case, it was not the sole metric.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Evan SooHoo

Evan SooHoo

102 Followers

A software engineer who writes about software engineering. Shocking, I know.