The buzz about artificial intelligence (AI) started in earnest not that long ago, even though AI has been around for many years. It seemed like everyone was discussing these incredible tools capable of answering your questions, doing your homework, or even simulating a conversation with a historical figure on a screen.
I'm no stranger to AI, having built a program to recognize numbers using AI before I even got my Software Engineering degree. But what was new to me was the idea that this "thing" that might take my job one day was already here and accessible to anyone who could afford a yearly fee of 100 dollars—cheaper than a basic Netflix subscription.
Suddenly, you could find news articles everywhere declaring that tech-related jobs were among the first to be replaced by AI. They claimed the world would no longer need developers, testers, or code warriors of the virtual world. Meanwhile, tech people were being inundated with AI tools promising to simplify their work, GitHub Copilot being one of them.
For me, the question was straightforward: Why would I spend $100 to train an algorithm that could potentially replace my job? But before long, I was investing in training my replacement - a useful VSCode GitHub Copilot extension designed to simplify our work. It's crucial to understand your competition, isn't it? Here's my experience so far:
GitHub Copilot can’t replace a developer... at least for now
Humans are still needed for an AI tool to be as effective as you need it to be. Here are three things to remember while using VSCode GitHub Copilot:
1. Mind the language
I do a lot of WordPress development, which involves using Javascript, PHP, CSS, and HTML, among others. Although GitHub Copilot is proficient in Javascript, using PHP can be a bit confusing. It may even suggest JS for PHP, which can be problematic.
As a developer, you need to ensure that you write accurate code and avoid adopting bad practices from other coders, a common issue with many WordPress plugins.
2. Bad training
Do you recall when news outlets reported claims that ChatGPT was becoming lazy? It's interesting to ponder why that might be.
Here's perhaps the most valuable advice I can offer about using GitHub Copilot: if you accept every suggestion it makes, you'll end up with very poor code. This may be the primary challenge AI faces today: inadequate training. So before you press tab to accept the first suggestion, make sure to read it fully and take time to enhance the code even after the suggestion. As users of GitHub Copilot, we would all greatly appreciate it.
3. If you don't know it, don't suggest it, Copilot.
As a WordPress developer, I often extend the functionalities of plugins and reuse functions from other plugin classes. These function files are available to me and GitHub Copilot, thanks to WordPress being open-source. However, despite these files being visible, my Copilot tends to use similar but made-up function names from existing classes.
Considering the tool has access to this code, I believe there’s room for improvement in this area.
A remarkable assistant, that can't bring you coffee or wish you a nice day
Before writing this article, I asked GitHub Copilot to prepare some coffee for me. Imagine if it had actually placed an order at the nearest coffee shop - that would have been quite the surprise!
Although that didn't happen, it's still worth highlighting some of its advantages.
1. Excellent assistance with dummy data
Creating dummy data is one of the most time-consuming tasks when building a solution. You might quickly code a complex function, but filling an HTML table with just five rows of dummy data can be challenging. However, good dummy data is crucial, especially when demonstrating your solution.
I've tried GitHub Copilot with fairly complex structures, and it performs excellently.
2. You usually get what you ask for... if you are consistent
If you're an experienced developer who uses the correct nomenclature, writes clear comments in your code, and maintains a proper file structure, you'll reap the benefits of GitHub Copilot. It will mimic your coding style, apply templates you used in previous folders, and even comment in the way you prefer.
The fact that it can't bring you coffee doesn't matter, right?
3. You can chat with it about code
One of the notable features of GitHub Copilot is a highly useful chat that performs really well. It can explain selected code, provide insights on a file's contents, or even use the internet to answer your coding questions. Additionally, it can write test code for automation and identify bugs.
For more information about this impressive feature, visit the GitHub Copilot Chat section.
A great tool to have, as long as you maintain control
GitHub Copilot doesn't operate well in gray areas. If you mistakenly accept incorrect code, it takes some time for the tool to learn not to suggest that code again. This is particularly true for languages and frameworks it hasn't been trained on.
After a bit of experimentation, I've transformed GitHub Copilot into a reliable and useful assistant that suits my preferences. It provides excellent suggestions while always following instructions. Truly worth the $100 spent….it's a real co-pilot.
The Dura Digital Takeaway
The journey with GitHub Copilot has been illuminating, proving that AI tools can be invaluable assistants when used correctly. However, remember that these tools are here to help us, not replace us. Make sure to use GitHub Copilot as a tool for improving your efficiency and not as a substitute for your skills and creativity. So, keep coding, keep learning, and most importantly, keep control of your work. Don't shy away from experimenting with AI tools. Embrace them, learn from them, and use them to your advantage.
Contact us to unlock the power of GitHub Copilot. Visit Dura Digital's Copilot Studio today.