• CXORA@aussie.zone
    link
    fedilink
    English
    arrow-up
    283
    ·
    edit-2
    1 day ago

    People who share the size of a codechange as a mark of how effective ai coding agents are truly missing the point of code changes.

    • Klear@quokk.au
      link
      fedilink
      English
      arrow-up
      44
      ·
      21 hours ago

      I’m just a hobbyist, but I’m always more proud of commits that remove stuff.

      • sqw@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        6 hours ago

        i refactored some web code i wrote ten years ago and it’s more elegant and a tenth the size with new features because of language advancements. feels great.

      • traxex@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        24
        ·
        16 hours ago

        Removing shit and it still working perfectly the same is absolutely a goal everyone should have. Less code means less to maintain.

      • CorrectAlias@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        40
        ·
        22 hours ago

        In college, on the first day of orientation, someone in my class bragged that they wrote 50,000 lines of code for a game that was similar to tic tac toe, emphasizing that he “wrote a lot of code”. A TA told him that it wasn’t a sign that his program was decent and that it really didn’t seem like it should take 50k lines of code to make something as simple as his game.

        He dropped out after the first week of intro to programming.

      • KairuByte@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        45
        ·
        1 day ago

        And yet I experience it so often. That or “effort points” as the metric being used to determine who all stars are.

        Either as a metric just encourages gaming of the system:

        • Why write one line when I can write the same thing in 20?
        • Why take this one effort point task I think will take three when I can just skip it and grab these one effort points I think will take 20 minutes?

        I’ve been on teams that on the surface didn’t have these metrics matter, but the top effort points achiever got bonuses on the DL.

        • Valmond@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          21
          ·
          22 hours ago

          What did you do?? You refacted the code and now it’s better organized but you overall got rid of lines?

          I’ll set up a PMD meeting to help you out of this problem, but fair to say don’t expect a raise or a bonus this year.

      • ViatorOmnium@piefed.social
        link
        fedilink
        English
        arrow-up
        14
        arrow-down
        1
        ·
        1 day ago

        I wouldn’t say PR size is a bad metric, you usually just need yo read it the opposite of how sloppers do it, i.e. the most productive PRs are short and focused.

          • KairuByte@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            1
            ·
            8 hours ago

            Yeah, I’ve been guilty of coming up with “cute” solutions that are extremely optimized and concise, but you needed to take a hundred times as long to work through what was going on.

            Usually I would put an explanation comment, but sometimes a less optimized solution is the better option for readability sake.

          • ViatorOmnium@piefed.social
            link
            fedilink
            English
            arrow-up
            16
            ·
            edit-2
            23 hours ago

            I’m not saying it’s a good individual metric. In fact, applying individual metrics to developers (or most workers really), will only land you in Goodhart’s hell.

            But as part of holistic operational health tracking, it’s a useful team level metric, as there is ample evidence that shorter PRs tend to result in less operational issues. And, of course, this is only valid if you don’t try to tie financial rewards to it, otherwise people will forget that PR size is a proxy measure for how easy changes are to review and rollback.

          • Shayeta@feddit.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            16 hours ago

            Hah, if those pesky devs think that they can play the system by just rolling up the code into a single line they got another thing coming - we’re actually tracking PR character count, NOT LOC like some other companies!

    • Ech@lemmy.ca
      link
      fedilink
      arrow-up
      4
      ·
      23 hours ago

      Might as well be bragging about pictures they’ve taken of their bowel movements.