2 ms·
For obvious errors (i.e. you get an error thrown) if you feed back the error to the session it's surprisingly good at keeping enough context to then fix the err
by zamadatix 4y ago
For obvious errors (i.e. you get an error thrown) if you feed back the error to the session it's surprisingly good at keeping enough context to then fix the error. E.g. maybe in that specific example it needed to import some library or got confused which libraries are available where and mangled it up so it won't run but if you tell it that happened when you ran it it'll fix just that issue in a rewritten output. I was pretty impressed with what it could "fix" of this type of error in some JS code I was asking it to make. Overall this isn't much worse than a person trying to one shot a code example so I can live with this part fine.
The danger is in the non-obvious errors like semantics ones you don't have intuition or test cases for because you got a block of code given to you. A good example of something that tends to break down quickly is asking it to generate long or complex regular expression matches. They are almost always valid regex but there comes a certain point where it goes from "this is the perfect regex for the question!" to "this regex works 99% of the time and unless you spent about as much time looking it over as you would just making it to have the same understanding you'll not know until it bites you" to "this regex is obviously not going to work" very quickly. This part is much harder to live with, it requires you stick to smaller snippets and integrating them which can be helpful sometimes but obviously isn't the end goal.