• MangoCats@feddit.it
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 hours ago

    WTF are you expecting Claude to code in bash?

    I have found Sonnet and Opus to both be very capable in bash, but then, I don’t usually ask bash to do super-complex things - its syntax is just too screwy to think about big applications in it.

    I will say, you might be misguiding the LLM by filling it full of bad examples before starting. Kind of like the advice about not staring at a tree downslope while skiing, if you’re fixated on it you’re MORE likely to hit it.

    • Badabinski@kbin.earth
      link
      fedilink
      arrow-up
      1
      ·
      9 minutes ago

      I gave it no advice, and all I wanted it to do was generate a script to tell me the file type of the newest file in the current directory. It was a very trivial piece of code. Each time it generated something I disliked, I told it “don’t do this, reference this guide for the correct thing to do,” or “don’t do that, do it in such a way that X happens.” It was like 20 lines of bash in the end.

      I was expecting it to write me a bash script because that’s the example that everyone, without fail, says will work well. “I just used Claude to write a little throwaway script to move some files around” were the exact words a colleague used.

      Bash is a shitty, unsafe language. I don’t write large programs in it. I expect “throwaway scripts” to still be written in a way that defends against all of the innumerable shitass foot guns present in the language. Claude was incapable of doing this in a reasonable time frame.

      I also dislike the Python and Go it generated, while we’re at it. It produces overly verbose, overly documented, poorly performing code. It was also fucking dog shit at referencing runbooks and documentation in a local folder when I was on call and responding to alerts.

      It sounds like you’re quite partial to Claude, and I hope it’s been a very good and helpful tool for you. I did not find it to be particularly helpful for me. It was very good at putting me in a sour mood, however.