• AA5B@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    8 hours ago

    When I was stuck with that, my rebellion was to widely announce all my merges with negative line of code. Let them try to challenge that publicly.

    Of course my current gig is new features generating positive lines of code but the new stupid metric is how much did the ai add. So far I’m losing that battle. Making me more efficient? No, so far ai is doubling the amount of time I’m stuck code reviewing junior developers

      • AA5B@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        7 hours ago

        It could probably do a decent job generating those scripts, given adequate prompting and a few cycles of feedback from you. But it’s almost never a final result. It’s still on you to know what it’s doing and whether it meets requirements, whether it’s sufficiently performant and scalable, whether it’s resilient and flexible. Most importantly it’s up to you to ensure good quality that future you can read and maintain.

  • foggy@lemmy.world
    link
    fedilink
    English
    arrow-up
    104
    ·
    11 hours ago

    Linus from LTT asks Linus if he’d ever heard of software developers being terminated based on how many lines of code they’d written .

    Linus Torvalds responds “Anyone who thinks that’s a valid metric is too stupid to work at a tech company…”

    It’s clear Torvalds doesn’t know who this is about when questioned.

    Linus hints to him it’s about Musk.

    “Apparently I was spot on [about Elon Musk being such and individual who is too stupid to work at a tech company].”

    • BarneyPiccolo@lemmy.today
      link
      fedilink
      English
      arrow-up
      45
      ·
      11 hours ago

      I’m not even a computer guy, but even I can see how just using the number of lines of code as a metric would be an extremely stupid method for determining effectiveness. Quality should ALWAYS rule over Quantity, but billionaires are obsessively into quantity, to an extremely unhealthy degree (it’s a mental illness, OCD, hoarding, etc.), that’s how they become billionaires.

      • teft@piefed.social
        link
        fedilink
        English
        arrow-up
        27
        ·
        11 hours ago

        I’m going to set my terminal width to 1 character. That way my “lines” of code count goes way up.

        • BarneyPiccolo@lemmy.today
          link
          fedilink
          English
          arrow-up
          23
          ·
          11 hours ago

          That’s the kind of thinking that a Sociopathic Oligarch could get behind, which is entirely the problem. Gaming and/or hacking the system is preferable to doing things properly. They want to be “disruptive,” even when it’s ill-advised.

          • corsicanguppy@lemmy.ca
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            52 minutes ago

            Imagine trying to read that

            Kernel code is very often a series of short words, and very often formatted to take a lot of vertical space (i.e lines of code). It can be hard to read, especially when it’s a short code that corresponds to a longer function or location; but with practice we can cope.

            tho

            See? You’re expecting people to do it already. And kernel code conforms to the grammar a lot more than American 'english.

            • SolSerkonos@piefed.social
              link
              fedilink
              English
              arrow-up
              1
              ·
              7 hours ago

              I wasn’t trying to suggest that it would be impossible- it’s obviously not. Just that it would be a difficult adjustment.

      • foggy@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        10 hours ago

        Here’s a very simple example.

        What’s 3^3?

        Or,

        Well it’s 3x3x3

        Which is 3+3+3, 3 times.

        Which is 3+3+3+3+3+3+3+3+3, which is 27.

        Which solution do we prefer?

        3^3 = 27?

        Or

        3+3+3

        +3+3+3

        +3+3+3

        =27?

        Which one uses more lines?

  • otacon239@lemmy.world
    link
    fedilink
    English
    arrow-up
    27
    ·
    edit-2
    9 hours ago

    I’ve never had to code professionally, but even on my personal projects, I don’t want a single extra line in the program that doesn’t need to be there and I should be able to understand the purpose of every line years later.

    My eyes glaze over whenever I look at corporate code because there are so many moving parts at that scale all from different qualities of programming.

    I don’t know if this is a practical thought, but I really wish we could get away from every project being monstrously sized. I prefer small packaged ideas similar to terminal commands. Just because it has a GUI doesn’t mean you need to design every piece of software as if I’m going to spend a day in it. Just give me small, purpose-built tools I can understand and then stop eternally developing and adding features.

    To add to this, it seems that every company now either makes one piece of software or 36 different softwares. If they make one piece of software, they endlessly pack it with features people don’t want and if they’re the latter, every piece of software is a hastily-cobbled-together half idea and they just move onto another piece of software. Is there really not a middle ground here?

    • ohlaph@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      8 hours ago

      That’s the result of product managers, project leads etc constantly thinking users need stuff, maybe trying to beat their competition, etc. I have watched a few products get bloated with the aim of beating their competition not providing user value.

      • orclev@lemmy.world
        link
        fedilink
        English
        arrow-up
        8
        ·
        8 hours ago

        The really disgusting part is that actually works (if you’re primarily selling to other corporations). Most of the most popular pieces of corporate software have the common trait that they do tons of stuff really poorly and nothing well. They get picked by the bean counters because the bean counters don’t care that it’s a fucking trash fire of a UI, they’re just looking at the list of other software they can remove because this new software does the same job significantly worse. That or they’re just mesmerized by the giant fucking bullet point list of “features”.

    • Ricaz@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      3
      ·
      edit-2
      4 hours ago

      I kinda agree with your first point, but AI assistance is so incredibly powerful that it’s foolish not to use it, unless you’re working on some really important logic. And even then, having an AI skim for common mistakes, inaccuracies or inefficiencies is still very valuable.

      And what you’re describing is really “Unix philosophy” and I strongly agree with that. Make a piece of software that does its one thing really well, and have it communicate with a simple API (POSIX).

      In Unix/Linux you generally just “pipe” one program’s output into another program’s input, and can chain them virtually infinitely.

  • TomMasz@lemmy.world
    link
    fedilink
    English
    arrow-up
    47
    arrow-down
    1
    ·
    11 hours ago

    LOC is a terrible metric. The worst programmer I ever had work for me had the highest LOC of anyone on the team, and his code was crap that barely worked.

    • Flamekebab@piefed.social
      link
      fedilink
      English
      arrow-up
      29
      ·
      11 hours ago

      Is this why so many of these fuckheads are keen on LLMs? They’re great at vomiting out reams of code.

      • AA5B@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        8 hours ago

        My biggest objection is unit tests. LLMs can actually be a useful tool for populating out unit tests. But of you let them run amuck, you get vast quantities of tests that add no value but now you have to maintain in perpetuity

        This one junior developer didn’t notice the ai brought in a whole new mocking tool for a few tests and didn’t understand my objection.

        • Flamekebab@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          6 hours ago

          I had a dev add a load of unit tests that mocked values and then tested for the mocked values. I mean… They passed…

    • magic_lobster_party@fedia.io
      link
      fedilink
      arrow-up
      9
      ·
      10 hours ago

      In my project there has been this guy who produced more lines of code than most other. All of his code is a terribly convoluted mess no one can work with. Also buggy and slow as hell. It’s been many years since he left the company, and the negative effects are still seen today.

      Luckily we’ve been able to detach ourselves from the worst parts.

      • aesthelete@lemmy.world
        link
        fedilink
        English
        arrow-up
        12
        ·
        edit-2
        10 hours ago

        It reminds me of the quote, “if I had more time I would have written you a shorter letter”. Terse code is often better, because it is often developed using a process that only adds necessary things or was created by trial and error during the development process that isn’t included in the final output.

        Lengthy code is often written because a person coded their misunderstandings, their ambiguities about the problem space, and their early failures at solving the problem into the code.

          • AA5B@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            7 hours ago

            Complexity or “complexity”? A couple months ago I had to accept a merge from a junior developer that is now flagged as the code with the highest complexity in my code base. It was in Groovy and he must have just discovered closures. Instead of breaking up the code in nice modular testable blocks, it was massive methods hundreds of lines long, and the most egregious use of closures

            • magic_lobster_party@fedia.io
              link
              fedilink
              arrow-up
              1
              ·
              7 hours ago

              Not necessarily closures, but it involved many dynamically generated lists of lambdas passed around through many layers of abstraction.

    • bollybing@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      7
      ·
      10 hours ago

      Takes me back to highscool assignments where a few very keen people would submit like 100 page projects and then ask how long mine was and I’d say 13 pages. They’d look all smug and make comments about how I wouldn’t get a good mark but guess what: I covered all the points in the marking scheme with sufficent detail, while they rambled off topic and repeated themselves. Nobody wants to read in ten pages something that can be adequetely described in one.

      • AA5B@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 hours ago

        Fun story time: I did that in high school. My best friend at the time (and still) and I were in several of the same classes and would do homework together. We’d work out the answers, then write down the “same” ones. But he would always embellish, be much wordier. He got so pissed when I consistently got better grades by writing the same answers but more concisely

    • Wojwo@lemmy.ml
      link
      fedilink
      English
      arrow-up
      8
      ·
      8 hours ago

      I love folklore.org. A long time ago when I was a lowly junior engineer, I read that story about Burrelll Smith and the mustache. So I grew a beard and got a promotion and raise the next week. Had a beard ever since.

  • NickeeCoco@piefed.social
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    1
    ·
    12 hours ago

    I look forward to X, Tesla, and SpaceX switching to Windows (and permanently fucking off)

    • DandomRude@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      6
      ·
      12 hours ago

      Yep, Grok is probably already working on it, or at least getting people excited about it…