I was lucky enough to get access to the preview of GitHub Copilot, and I’ll rate my experience so far ⭐⭐⭐⭐⭐.
Let’s start from the beginning, sharing the official definition:
Your AI pair programmerGitHub Copilot
With GitHub Copilot, get suggestions for whole lines or entire functions right inside your editor.
I won’t write about Codex, GPT3, OpenAI, etc.; I’ll focus on my experience as a programmer using the tools.
So, 1st feedback:
You need to have a special mindset to work with CoPilot. I mean, you have suggestions all the time, it may interrupt your coding flow, however, once you get this mindset, is a super cool experience.
And, what’s is this ? Let’s take a look at the “Hello World” on copilot, add 2 numbers. As you can see in the video below, a couple of interesting threads are happening here:
- I get a suggestion for the function before I close the “(“, and that function includes parameters.
- Once I get a suggestion, I can also review other suggestions. It may make sense or not, programmers choice.
- OK, so I closed my parenthesis in the function “()”, no parameters. Copilot will ask for these 2 numbers to perform the Add. How cool is this !
- And again, I got several options for this function.
And, how about a more complex Hello World, using 4 numbers
- Like before, CoPilot suggests 2 different versions for the function with parameters. Nice detail here, both options are the same.
- And in a function without parameters, CP also suggest several ways to perform this.
How about real scenarios ? helping with day to day tasks?
So, I’ve been working with threads for +20 years. However, in C# and Python I always need to search for the right syntax for this. Let’s take a look at this.
- The code start with a dummy function performAction(). That’s the function that I want to run in a thread.
- Instead of writing code, I’ll write my goal in a comment. Yes, programmers writing comments !!!
- CP suggest line 7: run performAction() on a new thread. Important, I already have the using as part of the Python file.
- CP suggest line 8: start the thread. And line 9 if we want to join threads. Not today CP, not today!
Now, this becomes handy and useful. Again, that’s my experience in a couple of days using this, mostly to update my Drones and TinyML demos. So far so good.
Bonus: Take a look at code generating in SPANISH !
¿Con ganas de ponerte al día?
En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:
- Si tienes ganas de ponerte al día con Front End (ES6, Typescript, React, Angular, Vuejs…) te recomendamos nuestros Máster Front End: https://lemoncode.net/master-frontend#inicio-banner
- Si te quieres poner al día en Backend (stacks .net y nodejs), te aconsejamos nuestro Bootcamp Backend: https://lemoncode.net/bootcamp-backend#bootcamp-backend/banner
- Y si tienes ganas de meterte con Docker, Kubernetes, CI/CD…, tenemos nuestro Bootcamp Devops: https://lemoncode.net/bootcamp-devops#bootcamp-devops/inicio