Github Copilot is the Killer Dev Tool
March 18, 2023, 4:20 pm
I decided to take github copilot for a bit of a test run recently. It's been very interesting to test its capabilities, and see how it works around my own coding idiosyncrasies.
We worked together to make this tictactoe game today. And it works pretty ok. When working on a fresh project with copilot, it has no preconceived notions of your coding style, and so it just knows some of the absolute junior basics of coding.
As you start working through a project, it starts to learn what you've done, and it gets better not just about what to suggest to you, but about writing in your style. So if your style is "bad" it will be just as bad as you in style. It's very unopinionated in that way. Use a particular case? It will too. Tend to use arrows over functions, it will too. It's very forgiving in this way.
When you give it enough setup and foundation, it can start guessing a lot of what comes next. But if you start with a nebulously named function, it just sits there blinking at you. Even trying to start with a DOMContentLoaded just causes it to leave you room. But if you start with some html structure. And start with some css classes. And start throwing in some initial variables, by the time you need to do actual things, it starts to pick up real fast.
When you have an array called colors, and a function called rand, and you start to type out `const randColor` it is smart enough to guess what you're doing and predict the next bit.
And I think that's the big point about this. Is that copilot isn't the magic dev killer. But it's the killer dev tool that we've all been wishing snippets and intellisense really were. It's the next big evolution. And there is no reason to be scared of it. Because truthfully it's only ever usually right if it's iterating or duplicating, and it's only ever right when it guesses about 50% of the time.
Often it will spit out five lines of stuff that you only want one line of. It tries its best, but it's best is only really middling. It will make wild guesses, and often be close to but completely wrong for what you intended. In fact, it could be considered a senior engineer in knowledge base with a junior engineer's confidence and inference. It knows LOTS of stuff about all the languages you're using, it will even start throwing in dialogue or fakes string lists. But you have to be really good about your naming schemes and your setups for it to be even close to the mark on any first guess.
All told, I like it. I'm going to be using it forever now. It's truly remarkable when it's right, and it's headscratching sometimes when it's wrong. But it certainly does help on a lot of boilerplate, and can really keep you moving in times when you might otherwise sat down and just forgotten all the things you'd written up to that point.
In case it's not clear, this is an endorsement.