3 ms·
I am so confused. When I write code, I think "Okay I want to write a for loop that does xyz." How is it hard to know if copilot did or didn't do what you wanted
by mucle6 2y ago
I am so confused. When I write code, I think "Okay I want to write a for loop that does xyz." How is it hard to know if copilot did or didn't do what you wanted?
- serpix 2y agoThis is how I've used it: "I want to write a function that reduces a map of customer data to a list of their phone numbers from their primary addresses only or contact address if there is no primary address" and then you look at the resulting flatmap, filter, reduce blob of AI generated code and figure out if what it does is correct for about a minute.
- alecthomas 2y agoThis was an illuminating comment because I think I finally understand why people have wildly varying experiences with CoPilot. I think if you regularly use CoPilot to write entire functions or use its prompt mode, you will spend more time verifying its output is accurate than it would save writing the code manually. If instead, you use it iteratively via autocomplete to write small fragments of code, a line or two at a time, its trivial to verify its correctness, and it will save you a good 20-30 seconds at a time, adding up to large savings over time. I exclusively do the latter, so I find it incredibly useful. The few times I've tried using the prompt mode, or comment-driven code generation, it's been very average or awful.
- mucle6 2y agoThis makes sense. I just can't imagine how most people hate the autocomplete. If you like a suggestion you hit tab. If not you keep typing.
- serpix 2y agoI use combinations of the two. Sometimes it really is worth it to write a comment on what one is trying to achieve and just let it autocomplete the entire thing. And sometimes just for autocompleting a 'for loop' - a small block of code that one already has in their minds.