Github Copilot


So a minor announcement: right after the previous post about using qu3e for physics, I decided to pivot and use Bullet Physics instead. No shade on qu3e, it does exactly what it promises, but I was able to get Bullet into my test project as well and decided the additional collision shapes and other functionality were worthwhile given it wasn't too hard to migrate to. (Don't be scared away by all this "PyBullet" stuff, by the way, it gives off the weird impression of being a Python-only library but it's a perfectly normal library.)

I unfortunately wasn't able to get back to this stuff for a couple of weeks due to how surprisingly crowded my social calendar has been lately, but this weekend I'm deliberately taking time for dev work. On an impulse I decided to try out the free trial of Github Copilot, with the associated Visual Studio plugins, and...

I mean...

Well, I have the perfect parallel. It's like a bicycle for your coding mind. In a lot of ways, too: for example, when I started using it I got this weird slightly nauseous feeling like when you're trying to balance on a bicycle for the first time, and then was like oh crap I am moving a lot faster than I expected... and I'm not kidding. In about, I dunno, less than a day of work I had upgraded from the slapdash hacky integration into the test project into having an actual physics world and physics components, which also included a bunch of changes and upgrades to my entity component system even including some SFINAE nonsense.

Copilot doesn't do your work for you, but when you start writing it will do a shockingly good job of guessing what you're trying to do. If you're filling in a bunch of boilerplate it catches on very quickly and runs ahead of you with the autocomplete, sometimes able to write entire code segments if presented with a comment describing what you're trying to do. Also I don't know how much of my code is in its context window, but at the very least it was able to comment sensibly on other parts of the current file when I asked it a question inline. Oh, yes -- you can also chat with it about parts of your code, ask questions, and get context-sensitive responses you can copy and paste, so a step above just asking ChatGPT and then reinterpreting its answers.

Now, Copilot wasn't perfect; its autocomplete suggestions are very aggressive, sometimes getting over its skis when there isn't enough information to guess on. I'd expect it performs better when the task you're working on is one that others have done before, such as, in this case, integrating a physics engine. And it made a few obvious mistakes and got one or two questions wrong that I asked it. But you know who else makes mistakes sometimes and has two thumbs? This guy, and a few human-tier errors right now feels like a small price to pay for this acceleration. I'm gonna keep using it. Three cheers for the future.

Leave a comment

Log in with itch.io to leave a comment.