• Ephera ( Ephera@lemmy.ml ) 
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 year ago

      I don’t want to dismiss your point overall, but I see that example so often and it irks me so much.

      Unit tests are your specification. So, 1) ideally you should write the specification before you implement the functionality. But also, 2) this is the one part where you really should be putting in your critical thinking to work out what the code needs to be doing.

      An AI chatbot or autocomplete can aid you in putting down some of the boilerplate to have the specification automatically checked against the implementation. Or you could try to formulate the specification in plaintext and have an AI translate it into code. But an AI without knowledge of the context nor critical thinking cannot write the specification for you.

    • Oh man, I love ChatGPT for one thing in particular: “Hey chatbot, is there some library or standard library function for that very specific, yet still kinda generic thing I’m trying to do, so that I don’t have to write it myself?”

      It does frequently give a helpful answer. That is, it doesn’t give me working code, but a helpful pointer to some manual where I can find good instructions for how to use the thing to solve my problem.