|
|
|
|
|
by zkldi
1542 days ago
|
|
> I wrote a comment outlining exactly what I wanted, and immediately Copilot generated the code I was after. How do you know it was what you were after? Like you said, it could be .toLocaleTimeString or .toLocaleString (or something else). How do you verify that the AI isn't giving you broken/incorrect code? I guess you could check the docs, or run the code yourself, but at that point what's the value add for copilot? |
|
For example I can't draw faces but I can recognize a badly drawn face. If I ask an AI: Please draw me a 35 year old man with receding hair and crooked teeth I can quickly validate the result is fit for purpose. If it is not what I want I can modify the query. I then learn quickly how to prompt the AI to give me what I want.
In the example you give we can assume that the AI has produced a plausible option even if wrong. For example a scenario may be:
The key point is you have to know what you want and be able to recognize a correct result. Validating a correct result is often easier than coming up with the correct result. You have multiple strategies to validate the result.Testcases, compilation, code review, documentation, IDE intellisense
This obviously gets harder the larger the amount of code copilot is being asked to generate. But good software engineering practises still stand. Try to keep your functions and modules small and to the point.