• xthexder@l.sw0.com
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      7 hours ago

      The best refactors always remove more lines than they add. This is a horrifying ratio if no new features were included.

    • mcv@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      7 hours ago

      Yeah, adding that many lines does not sound like a cleanup to me. Unless it’s mostly adding unit tests.

    • lengau@midwest.social
      link
      fedilink
      arrow-up
      3
      ·
      2 hours ago

      Ive done a few of those, but they were all preparatory refractors, pulling out bits of code to turn them into standalone functions that are only used once because my next PR uses them, and then adding unit tests for those new functions. -100 or so lines of code, +300 or so when you take into account the new docstrings, etc.

      (The secret to doing these preparatory refractors is to actually do them after writing the “next” PR so you’re not unnecessarily refactoring stuff you’re going to touch.)

  • kibiz0r@midwest.social
    link
    fedilink
    English
    arrow-up
    72
    arrow-down
    1
    ·
    17 hours ago

    It is wild that Anthropic decided to go with “Claude”, as in “Claude Shannon”, as in the guy who formally proved that information degrades every time it passes through a channel that can’t represent it in a mathematically reversible way.

    If you can’t theoretically produce the original code, given the “refactored” code… congratulations, you have lost information.

  • hansolo@lemmy.today
    link
    fedilink
    arrow-up
    22
    ·
    15 hours ago

    If the movie Tron were true, or The Matrix, and code was alive and sentient, things like this would be horror on the level of the Star Trek: TMP transporter accident.

  • Gyroplast@pawb.social
    link
    fedilink
    English
    arrow-up
    60
    ·
    19 hours ago

    Perfection is achieved, not when there is nothing more to add, but when there is nothing more to take away. — Antoine de Saint-Exupére

    +55653, -937? That is not beauty, even if it all “worked”.

    • regdog@lemmy.world
      link
      fedilink
      arrow-up
      32
      ·
      19 hours ago

      I would say a few new lines are OK if they at least improve the readability of the code.

      But given that AI was doing the work, I would say it is even less readable now.

      • Gyroplast@pawb.social
        link
        fedilink
        English
        arrow-up
        29
        ·
        19 hours ago

        Slinging random quotes at Jr. devs works best if you have one for every rebuttal:

        Everything should be as simple as it can be, but not simpler. — Albert Einstein