Do Senior Engineers write less code?

Andres Garcia Garcia
3 min readJan 30, 2022

Senior Software Engineers write less code.

With so many meetings, who has time to write code?

This is what I always told students and junior engineers. I even have a coherent narrative attached to it. When you are a junior, your focus is on higher on writing code. As you progress in your career, you get more involved in architecture, strategy, and leadership, and hence have less time to write code. This little narrative seems coherent, and it is reinforced by my anecdotal experience.

A cursory search on the internet seems to yield similar results. Many people focus on the “other traits” of Senior Engineers and ignore coding, while others explicitly call it out. Some even claim Senior Engineers might not code at all.

What does the data say?

I recently found that my company publishes data on the number of commits generated in the whole company. This data is aggregated in several dimensions, and one of them is the job title of the author. This data includes tens of thousands of developers and goes back a few years, so the results should be statistically significant.

According to this data, mid-level engineers consistently write 10–15% more code than junior engineers. Intuitively this makes sense. We imagine mid-level developers as more proficient than juniors and still focused on code.

What about Seniors? As it turns out, seniors consistently produce about the same amount of code as junior engineers. When adjusted proportionally, both groups are within ~5% of each other.

One big caveat is that this dataset tracks number of commits, which is a lousy measure of code. But at least it gives us a better measure than anecdotal evidence, pure guess, or nothing at all.

Possible explanations

Since we are measuring the number of code commits, Senior Engineers may tend to produce more, smaller commits for the same amount of code, inflating their stats.

Another possibility is that Senior Engineers are quite productive, and their reduction in coding time is offset by their higher output.

There are more interesting out-of-the-box explanations. One is that the 2-week sprint followed by most teams in the company acts as a forcing function, where people push whatever code they have at the end of each sprint. Another is that coding is a mentally demanding task that you can only perform effectively a fraction of your working hours, so in the aggregate and over time developers tend to produce a similar amount of output.

Another possibility is that I’m reading way too much into this. This data might be faulty, meaningless, or random, and it might not correlate with how things work elsewhere.

The true point

Although I’m curious to know the answer to this question and an explanation for the data, that isn’t the point of this story.

The true point is that I believed something without a shadow of a doubt and I never bothered to check it. Not only that but I sold this idea to others. This is what Gary Bernhardt calls Ideology. Ideology is the beliefs that we held without being aware of them. We see this play all the time in our workplace and online. Topics such as agile, tests, and types are often subjects of beliefs, as well as heated online debate.

So maybe believing that Senior Engineers write less code is harmless, even if it turns out to be false. However, every time that we let a belief slide, we lose an opportunity to find out that we are wrong, learn something and become better engineers.

--

--

Andres Garcia Garcia

Passionate about learning about tech and science. Software Engineer in the UK.