I am always looking to write better, more performant and cleaner code. GitHub Copilot checks all the boxes and makes my life easier. I have been using it since the 2021 public beta, the hype is real!
According to the GitHub Copilot website, it is:
“The world’s most widely adopted AI developer tool.”
While that sounds impressive, the proof is in the features that help the average developer produce higher quality code, faster. It doesn’t replace a human developer, but that is not the point. The name says it all, it’s a tool designed to work alongside developers.
When we look at the stats, we see some very impressive numbers:
- 75% of developers report more satisfaction with their jobs
- 90% of Fortune 100 companies use Copilot
- With 55% of developers prefer Copilot
- Developers report a 25% increase in speed
Day in the Life
I primarily use Copilot for code completion and test cases for ReactJS and JavaScript code.
When typing predictable text such as “document” in a JavaScript file, Copilot will review the current file and public repositories to provide a context correct completion. This is helpful when I create new code or update existing code. Code suggestion via Copilot chat enables me to ask for possible solutions to a problem. “How do I type the output of this function in Typescript?”
Additionally, it can explain existing code, “Explain lines 29-54.” Any developer out there should be able to see the value there. An example of this power comes from one of my colleagues:
“Copilot’s getting better all the time. When I first started using it, maybe 10% of the time I’d be unable to use its suggestions because it didn’t make sense at all. The other day I had it refactor two classes by moving the static functions and some common logic into a static third class that the other two used, and it was pretty much correct, down to style. Took me maybe thirty seconds to figure out how to tell Copilot what to do and another thirty seconds for it to do the work.”
Generally, developers dislike writing comments. Worry not, Copilot can do that! In fact, I use it to write the first draft of every comment in my code. Copilot goes a step further and writes user tests from the context of a file — “Write Jest tests for this file.”
One of my favorite tools is “/fix” – which provides an attempt to resolve any errors in the code. This is not limited to errors visible in the IDE. Occasionally after compilation, there will be one or more errors. Asking Copilot to fix these errors is often successful, even though the error(s) may not visible. The enterprise version will even create commented pull requests!
Although these features are amazing, there are methods to get the most out of it. You must be as specific as possible. This is most important when using code suggestions.
If I ask “I need this code to solve the problem created by the other functions” — I am not likely to get a helpful solution. However, if I ask “Using lines 10 – 150, and the following functions (a, b, and c) from file two, give me a solution that will solve the problem.”
It is key whenever possible, to break up the requests into small tasks.
Copilot Wave 2
The future of Copilot is exciting, indeed. While I have been talking about GitHub Copilot, the entire Microsoft universe is getting the “Copilot” treatment. In what Microsoft calls Copilot Wave 2, it is added to Microsoft 365.
Wave 2 features include:
- Python for Excel
- Email prioritization in Outlook
- Team Copilot
- Better transcripts with the ability to ask Copilot a simple question as we would a co-worker, “What did I miss?”
The most exciting new Copilot feature is Copilot Agents.
“Agents are AI assistants designed to automate and execute business processes, working with or for humans. They range in capability from simple, prompt-and-response agents to agents that replace repetitive tasks to more advanced, fully autonomous agents.”
With this functionality, the entire Microsoft ecosystem will benefit. Using agents, it would be possible to find information quickly in SharePoint across all the sites and other content areas. Agents can autonomously function and are not like chatbots. Chatbots work on a script, whereas Agents function with the full knowledge of an LLM. I.E. a service agent could provide documentation on the fly based on an English description of a problem. Or answer questions from a human with very human responses based on technical data or specifications.
There is a new Copilot Studio, providing a low code solution allowing more people the ability to create agents.
GitHub Copilot is continually updated as well. Since May, there is a private beta for Copilot extensions. This allows third-party vendors to utilize the natural language processing power of Copilot inside of GitHub, a major enhancement jumping Copilot to GPT-4o, and Copilot extensions which will provide customers the ability to use plugins and extensions to expand functionality.
Conclusion
Using these features with Copilot, I save between 15-25% of my day writing code. Freeing me up for other tasks. I’m excited to see how Copilot Agents will evolve into new tools to increase developer productivity.
For more information about Perficient’s Mobile Solutions expertise, subscribe to our blog or contact our Mobile Solutions team today!
Source: Read MoreÂ