Re:Gitlab AI is going head to head with GitHub Copilot
by SparkyMcUnicorn on Thursday June 29, 2023 @05:23PM
(#36526924)
Using Copilot has taught me how to write better code comments. And the improved comment quality benefits everyone, not just the AI.
Even something as simple as adding a doc block for a method can boost the quality quite a bit.
I could live without it, but I'd also keep paying if the price increased.
Re:Gitlab AI is going head to head with GitHub Copilot
by leothelion_ on Thursday June 29, 2023 @06:32PM
(#36527749)
I agree. It has made me better at articulating what I want to do, what a function does, and something as granular as what a particular loop hopes to achieve
Re:Gitlab AI is going head to head with GitHub Copilot
by aerio on Thursday June 29, 2023 @08:37PM
(#36528930)
At the current price, if it saves me a single hour in the course of a year it pays for itself. And it definitely does.
Re:Gitlab AI is going head to head with GitHub Copilot
by ignoramous on Friday June 30, 2023 @03:09AM
(#36531519)
I sometimes prompt Copilot with if statements and var declarations and it actually ends up suggesting missed corner cases and fixing bugs. Definitely there's an art and form to using it.
I wonder if this quest for the perfect prompt is dumbing me down, though.
I get great results from Copilot, but that's because I do a bunch of things to help it work for me.
One example: I'll often paste in a big chunk of text - the class definition for an ORM model for example - then use Copilot to write code that uses that class, then delete the code I pasted in again later.
Or I'll add a few lines of comments describing what I'm about to do, and let Copilot write that code for me.
Did you try the trick where you paste in a bunch of code and then start writing tests for it and Copilot spits out the test code for you?
A few more notes about how I've used Copilot here:
- https://til.simonwillison.net/gpt3/writing-test-with-copilot
- https://til.simonwillison.net/gpt3/reformatting-text-with-co...
I've also used Copilot to take educated guesses at things - like an inline mini-ChatGPT - with good results:
- https://til.simonwillison.net/gpt3/guessing-amazon-urls
As with so many other AI tools, Copilot is desperately lacking detailed documentation. It's not at all obvious how to get the most out of it.