• douglasg14b@lemmy.world
    link
    fedilink
    arrow-up
    30
    arrow-down
    1
    ·
    1 day ago

    None of this actually proves that they aren’t writing slop. It just proves that the slop that they’ve written passes your tests.

    • Caveman@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      I never understand why you wouldn’t want to read the code. I prevent a massive amount of correct slop by just skimming. The LLM will 10 times out of 10 never ask “this code will be a massive duplication of exact same behavior, do you want to refractor it?” because it’s trained to finish a task without asking if possible.

      Uncle Bob now writes code for his tests instead of tests for his code. I know it’s TDD but it always seemed backwards to me.

      Unit tests for logic, integration tests for outside apis, e2e for features is the sweet spot IMO.

      • GoatSynagogue@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        17 hours ago

        Claude and most other of the top coding agents will check the codebase for existing patterns and functionality specifically so it doesn’t duplicate behaviours etc. Have you used any of them recently? That’s one of the first things it does before even writing a line of code.

        • Caveman@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          16 hours ago

          I use Claude/Codex, if it finds a thingy that’s reusable it’ll use it but it’ll never create it or ask if it should be created in my experience. I find that it doesn’t create new components but just replicates the existing one.

          Within same file is a different story though, it does write helper functions to share logic which is proper.

      • Zannsolo@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        18 hours ago

        I generally only use ai to write code I know what it should look like but don’t want to type it all out.