Google gives Bard the ability to generate and debug code
In addition to being able to generate code, Bard can now provide explanations for code snippets. It could be especially useful if you’re just starting to learn programming, as it will show you why a particular block has the output it does. And yes, Bard can now also help you debug code that isn’t working the way you want it to.
Google admits that at this point, Bard could spit out code that “doesn’t produce the expected result” or code that is incomplete. The tech giant advises to double check and test your answers first. In fact, Bard can debug its own output if it finds that it’s returning an error; just write “this code didn’t work, please fix it”. Finally, if you are not a programming beginner but still need help, you can ask the chatbot to optimize your code by making it faster or more efficient.
The tech giant opened up access to its AI chatbot in March, though it still has a ways to go to catch up with the popularity ChatGPT enjoys today. To note, ChatGPT also has the ability to write and improve existing code in various programming languages, so Google giving Bard the ability is perhaps inevitable. Google has been constantly improving Bard in other ways as well, and previously rolled out updates driven by a new language model called PaLM. A few days ago, the company created an “experiment updates” page where you can see all the changes Bard has gone through as it adds even more features and makes bug fixes.