by datpuz · 4y ago · 0 comments
Some of the autocomplete was okay in that it saved me some keystrokes at times, but in general, it felt like more of a distraction. I especially hated the suggested comments; these were almost never close to what I intended to write, and it would always give me a pause when they'd pop up, and often forget what I was about to write.
There were a few instances where it magically did autocomplete a surprising bit of code, and I enjoyed the novelty when it would happen, but that wore off quick.
You need to recognize what it's good for, like generating code similar to what you've written but a little bit different.
For example : I had a project in Rust where I would print a sentence describing an error that occured. I had a big match block with my possible error variants. The error enum was declared in the same file.
And so, when I added a new error variant, I just had to place my cursor at the end of the match and watch copilot generate exactly or almost what I needed, a similar block of code that the other cases, but with a different message and using the fields of this varient intelligently.