1 Thing A Week 1 Thing
A Week

GitHub Copilot Preview

Week 213.0 — 22nd November '21

I was granted access to GitHub's Copilot preview a couple of weeks ago and only just around to installing it to give it a go. It's an interesting concept and it's name is an excellent at describing exactly what it's for.

After my brief play with it for HTML and PHP documents I can see how useful it is but I wouldn't have the confidence to let it run the show which is why it's name is perfect.

For a basic HTML structure, it heavily leaned on Bootstrap, something I've used extensively but rarely by choice. The markup is fine, but not lean enough for my liking. For CSS it came up with some interesting choices like specifying exact pixel values for H1 and H2 elements, but overall the output would definitely be a time saver for someone writing code day in day out.

Screenshot showing how GitHub Copilot tries to autocomplete an anchor tag in HTML

The example above is pretty simple but tries to take autocompletion to the extreme. It's not just adding the necessary tag(s), it's also specifying the values. It works for pretty much any element I tried it with which could be a massive time saver. On the previous project I worked on that used Bootstrap, it could genuinely have saved me minutes a day, hours a week and days a year in development time.

For PHP, I was actually more satisfied with the output even if it didn't always pick the right function or get a functions usage right. It needed a bit more hand-holding through a simple reverse array task, it just seemed to take the function name I chose and did it's best to complete the entire thing, not just the current line. The same was true for JavaScript it's just that my simple example seemed to generate output that was overly complex, in my opinion.

One very nice thing I noticed in the docs was the ability to cycle through multiple options, using the ALT + ] shortcut on a Mac.. shame it didn't work for me. I could hover and choose the 'Open GitHub Copilot' option and see a collection of alternatives and choose the one that suited me best. It didn't always come up with more than one suggestion, but for every line I wrote during my test there was autocompletion available and at least half the time that spanned multiple lines.

I've been an Atom IDE user for the longest time and generally find Visual Studio Code over the top for my needs but I'll be using it for the foreseeable so I can test Copilot out some more.

More from 1 Thing A Week
« My iPad mini review (6th generation) Re-designing my portfolio

Advertisement

Notable

Quick links and commentary on interesting articles, videos and more throughout the week.

  1. 213.5 – Friday
    1. Ornament animal scene plant pots   £26.90 WeWayShop on etsy.com

Jump to notable items for Week #212 , view the notable archive or my favourites.

About 1 Thing A Week

A website curated by @cchana bringing you 1 Thing A Week, delivered every Monday morning.

You can find a list of all articles in the archive, or read the most popular.

Find out more about 1 Thing A Week or read the privacy policy.

Market

Visit the market and support 1 Thing A Week.

You can find 1 Thing A Week on Twitter, Facebook, Instagram & Reddit