Google’s Bard can now help users write code as the search giant claims it is responding to one of the top requests from users.
Bard users can easily export Python code to Google Colab without having to utilise copy and paste. The Google chatbot can also assist with writing functions for Google Sheets.
It can do more than just generate code
Bailey went on to add that Bard can also explain code snippets for users. “This is particularly helpful if you’re learning about programming for the first time, or if you need some additional support to understand what a block of code might output.”
In addition, the chatbot can also help users debug external codes and codes that were written by Bard itself. If the chatbot provides a user with an error message or an incorrect code, the user can simply tell Bard, “This code didn’t work, please fix it,” and they can sit back and watch Bard debug the code.
It’s not yet perfect
Bard is still an early experiment and Google notes that it may sometimes, “Provide inaccurate, misleading or false information while presenting it confidently.” And as for the chatbot’s coding capabilities, Google says Bard may provide users with, “Working code that doesn’t produce the expected output, or provide you with code that is not optimal or incomplete.”
The search giant further urges users to double-check the chatbot’s responses and to test and review generated codes for errors, bugs and vulnerabilities before putting it to use.
Google is seemingly late to the AI code generation party as OpenAI’s GPT-4 has been helping users write code and create games ever since it launched in early March. But Bard’s new ability to write code, create test cases, or update APIs is a fine addition to the chatbot’s capabilities and is a feature that many users will find useful.