• xthexder@l.sw0.com
    link
    fedilink
    arrow-up
    45
    ·
    3 days ago

    A little off on the lines of code… it’s only around 20 million. I’d be a little worried if there was billions of lines of code, it would be unmaintainable slop.

    • Pup Biru@aussie.zone
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 days ago

      LOC doesn’t inherently make things unmaintainable slop, as long as you have strong abstractions (which Linux certainly does)

      one could argue that most Linux distros have billions to trillions of LOC and their abstraction is packages, which are kinda a level of abstraction higher than libraries, which are just a level of abstraction higher than a folder of util functions

      things being “not my code” doesn’t mean it’s not part of your system

      • xthexder@l.sw0.com
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        While you’re correct in a general sense, the linux kernel is what I was referring to, not the whole ecosystem of linux programs and repositories.

        If Hello World can be written in 1 line and someone comes along and presents a version written in 100-1000s of lines without any new features, I’m going to argue it’s unmaintainable slop.

        • Pup Biru@aussie.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          and if a display driver can’t be written in 1 line that doesn’t make the thousands of lines unmaintainable slop

          some things just require more code

          i’d argue if the linux kernel were billions of LOC, then that’s just what’s necessary

          and necessity is probably relative at that point; many of your LOC are likely technically unnecessary abstractions to help with human understanding

          • xthexder@l.sw0.com
            link
            fedilink
            arrow-up
            1
            ·
            1 day ago

            and if a display driver can’t be written in 1 line that doesn’t make the thousands of lines unmaintainable slop

            That’s not what I’m saying.

            I’m saying if there’s 1000x more lines of code than necessary, it’s unmaintainable slop. I could understand 2x or even 10x the lines of code just being a difference in architecture, but even 100x is getting crazy.

            I think only EnterpriseFizzBuzz surpasses the 1000x inefficiency metric that this meme is implying.

            • Pup Biru@aussie.zone
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 day ago

              I’m saying if there’s 1000x more lines of code than necessary, it’s unmaintainable slop. I could understand 2x or even 10x the lines of code just being a difference in architecture, but even 100x is getting crazy.

              and i’m saying who’s to say what’s necessary with the linux kernel? it’s a one of a kind project: the largest software undertaking by humanity, ever

              there probably are 100x more LOC than technically necessary… heck there are… how many LOC in the linux kernel? millions? there’s n-1 more LOC than necessary because it’s C and can be a one-liner (hell even python can be a one liner if you turn it into something resembling brainfuck more than python)

              what are you comparing 2x, 10x, 100x to? bsd? windows? neither are particularly good comparisons because linux is so much more capable (in many respects) than either, and solves different problems of scale that either too

              linux has no point of comparison for a simple LOC metric… the only thing we can judge is the output itself: its efficient to run, velocity of new features is great, bug count is low for a project of its size, and tech debt gets paid down

              again, i think given those factors it wouldn’t matter if linux were 100x the LOC that it actually is: it is the benchmark that other things are measured against

              LOC has always been, and will remain a terrible metric for anything except number of newline characters in a source repo

    • altphoto@lemmy.today
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      Hey! I just finished beta release of my brand new AI developed word processor! It’s a single python script with just under 1 million lines of code! Isn’t that great?!!! 😸