AI tools in web development: Our thoughts
With the recent rise in AI across the world, it’s no surprise that industry-specific AI tools are starting to crop up. In fact, our crew has started to use some AI tools to assist in web development, including ChatGPT and GitHub Copilot.
Here, our senior web developer John shares how these tools can be used to complement web development, and where their drawbacks lie.
What is ChatGPT?
Created by OpenAI, ChatGPT is a chat interface that accepts a question or prompt (or a series of them), before using AI to formulate an answer. While it will somewhat understand the context of your conversation and any previous information you’ve provided, this is as far as it goes. ChatGPT is a static model and will not learn from your questions or any information you give.
How we use ChatGPT
I’ve been using ChatGPT since the beginning of this year to help me with my day-to-day tasks. I also ask it technical questions, and am pleasantly surprised at how effective it is at providing answers. While it can require a bit of jostling and adjusting to ensure you get the most out of it, you’re more likely to find the answer you’re looking for quicker than you would with Google. While I wouldn’t expect it to be able to do my job for me or replace me as a developer in the near future, I do see it as a way to enhance a developer’s toolkit and become more efficient.
Drawbacks of ChatGPT
Occasionally, ChatGPT misses the context of a question if you don’t ask it in a certain way. In other instances, it confidently gives an incorrect answer as a solution to a problem.
ChatGPT is a static model, and its knowledge only goes up to the end of 2019. Therefore, there are some instances where it gives outdated solutions, or will refuse to answer at all because it doesn’t know anything about the subject matter. For example, according to ChatGPT, Queen Elizabeth is still the head of state.
What is GitHub Copilot?
Github Copilot is a code editor extension that ‘suggests’ code completion within your editor, similar to the autosuggestions you see when messaging on your phone or in Gmail.
How we use GitHub Copilot
I’ve been using Github Copilot for around 18 months and was part of the beta testing pool of developers in its early conception. Unlike ChatGPT, Copilot is a learning model, and its output will change over time because it utilises a majority of the code that’s publicly available as open source on the GitHub platform. Copilot will also understand the context of your project, the programming language or framework you’re working with, and the code you’ve already written within that project. This makes Copilot especially useful, as it suggests code completions specific to you or your project.
Much like ChatGPT, I don’t rely on this tool to write code for me – I use it as a way to increase the speed at which I write predictable code. This means that in a similar way to ChatGPT, I am a more efficient developer thanks to this tool.
Drawbacks of Github Copilot
It’s important to note that GitHub Copilot does not write perfect code and doesn’t test the code it suggests. The tool can only hold a very limited context, so it may not make use of helpful functions defined elsewhere in your project or even in the same file.
What’s more, Copilot may suggest old or deprecated uses of libraries and languages. When converting comments written in non-English to code, there may be performance disparities when compared to English. It’s for these reasons that the GitHub website disclaims “Like any other code, code suggested by GitHub Copilot should be carefully tested, reviewed, and vetted. As the developer, you are always in charge.”
Finally, there’s some controversy surrounding this tool, with an ongoing lawsuit claiming that Copilot violates the rights of the developers whose open-source code the service is trained on.
The rise of AI is proving helpful for web development in terms of boosting ease and efficiency. However, the tech is still relatively new and certainly not foolproof, and is therefore no replacement for good old-fashioned thinking, testing, and adjusting. As long as you bear this in mind, the likes of ChatGPT and GitHub Copilot make very useful additions to a web developer’s toolkit.
If you want to keep up to date with the crew, don't forget to sign up to our newsletter to benefit from digital marketing expertise, as well as exciting opportunities to improve your business' performance.
Written by Alice MacLaverty
Resident wordsmith Alice is dedicated to creating top-quality content that turns heads, builds audiences, gets clicks, and makes money.