How many lines of code does an average Linux kernel developer produce per year?

Based on estimates of the value of the Linux kernel (around 2200 Million Euros in 2011), the size of the kernel (in 2011, version 2.6 was current, with a bit less than 20 million lines of code), and average salary of kernel developers (for Germany, one could estimate 60,000 - 80,000 EUR/year for a mid to senior embedded developer, you can go to kununu.de and look for salary statistics for larger companies like Siemens as a reference), one can estimate the lines of new code that a full-time kernel developer produces - less than 1000 lines per year:

 value=2200000000
 cost_man_year = 60000
 lines_of_code= 20000000

 person_years = value / cost_man_year
lines_per_person_per_year = lines_of_code / person_years

I get to 545 lines per person-year that way.

The interesting question is: You can obviously type that in in half an hour. What do these software developers actually do all day? ;->

  • thingsiplay@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    9 hours ago

    You realize that there are lots of lines of code erased and updated too? So comparing the size of the entire base does not tell you how many lines are written. Lines of code was always a bad metric, especially using it like this.

  • KissYagni@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    10 hours ago

    I don’t know if the last part “What do these software developers actually do all day? ;->” is ironique or not.

    Anyway, from my experience, industrial software developpers generate around 10 to 100 loc/day. For mobile game or shitty web stuff, it can go up to a few hundreds. For DO178A certified aeronautic code, this is closer to several days per loc 🤪. To know what’s going on when manager try to increase this metric, just have a look to Boeing.

  • Enoril@jlai.lu
    link
    fedilink
    arrow-up
    25
    ·
    16 hours ago

    Coding is the easiest part of the job and do not represent the main people activity.

    Looking at the number of lines of code and thinking “they are only doing that” is like looking at any Mozart cues and thinking “he spent years to fill 50 pages of black dots?”.

    Coding is like creating music. It’s not because you can write lines of code that the result will be a working solution.

    You need to know your activity very well to be able to get the best from all the instruments you have in your hands.

    Before coding any line, you had to THINK about the solution, find the best architecture, how to implement it without impacting in a negative way the product, detect the potential side effects, how to test in all the possible scenarios, how to maintain it, etc.

    What you pay here is knowledge, experience, architect skills, coder, tester, troubleshooter, project management, devops, etc.

    You pay highly skilled people who have the responsibility to not screw up all the servers infrastructure of the world, the brains of aircraft, cars, manufacturing tools, etc… And you don’t want them going elsewhere as the knowledge ramp-up of any newcomers could take years.

    This is where the salary goes. People brain.

    • grandel@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      13 hours ago

      Yeah it’s like the engineer who wrote a 10000 dollar bill for exchanging a single screw to his enraged customer:

      • Exchanging screw: 1 dollar
      • Knowing which screw to exchange: 9999 dollars

      (It’s a whole story, I don’t remember exactly)

  • jokro@feddit.org
    link
    fedilink
    arrow-up
    28
    ·
    16 hours ago

    What do these software developers actually do all day? ;->

    Navigate the million lines codebase to undetstand what their changes does.

  • vrek@programming.dev
    link
    fedilink
    English
    arrow-up
    15
    ·
    16 hours ago

    The value of most programmers is not loc. It’s knowing the right lines to type. It’s knowing which lines to eliminate. It’s knowing how to set up your program so it’s as short as possible while having all requested features. I can give you basic calculator in maybe 100 lines. I can give you same calculator on 100k lines. Which is the better program? Which do you think is more maintanable? Which do you think is faster?

  • nebeker@programming.dev
    link
    fedilink
    English
    arrow-up
    14
    ·
    16 hours ago

    Is that salary estimate also from 2011?

    There’s a more robust methodology here, which is to look at commit history, but that will only tell you how many lines were pushed and merged. That will be a greater number, by the way: say the kernel is 100 lines, somebody may have written 50, but they may have all been replaced by future patches, so The number of lines written is greater than the number of existing lines.

    Regardless, I’m sure you already know lines of code is a bad metric of output, let alone effort and work.

    • HaraldvonBlauzahn@feddit.orgOP
      link
      fedilink
      arrow-up
      1
      ·
      15 hours ago

      That will be a greater number, by the way: say the kernel is 100 lines, somebody may have written 50, but they may have all been replaced by future patches, so The number of lines written is greater than the number of existing lines.

      Some parts are rewritten, but most of the kernel code is actually in device drivers which usually do not need to be re-written.

  • ludrol@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    15 hours ago
    1. You are mixing up the units here. Value is not a real money, and you can’t pay salaries with value. You can pay salaries with cash.

    2. To actually get how many LOC in a kernel per person per year they produce. You need to look at git history, and do data science on it. It’s doable and easy but not really my area of expertise.

    3. You need to account for that vast majority of contributors make just one patch and they are never heard from again. They don’t work full time, or even part time on the kernel.