Google Bard Receives The Ability To Generate And Debug Code: 'One Of The Top Requests'

Google Bard

The AI field was dull and quiet, with ripples that rarely went too far beyond its own realms and fans.

But things have changed since OpenAI introduced ChatGPT. Since that time, big tech companies started scrambling for their own answer. Some opt to equip their arsenal with the OpenAI product, whereas some choose for the more difficult, but challenging effort.

Google, the tech giant of the web and beyond, chooses the latter.

And its answer to ChatGPT, is called the Google Bard.

While it was botched at first, Google managed to fix it before finally readying and publicly unleashing it.

After making the AI a lot smarter with the inclusion of both 'LaMDA' and 'PaLM', Google is stepping things up a bit again, because "Bard now helps you code."

Google Bard
Credit: Google

In a blog post, Google said that:

"Today, we’re updating Bard with the ability to help people with programming and software development tasks, including code generation, code debugging, and explanation."

Since we launched Bard, our experiment that lets you collaborate with generative AI, coding has been one of the top requests we’ve received from our users. As a product lead in Google Research — and a passionate engineer who still programs every day — I’m excited that today we’re updating Bard to include that capability."

What Google is doing here, is making Bard capable of programming and doing software development tasks.

Google launches these capabilities in more than 20 programming languages including C++, Go, Java, Javascript, Python and Typescript.

And to make things convenient, users can easily export their codes to Google Colab, "no copy and paste required."

"Bard can also assist with writing functions for Google Sheets," Google added.

Google Bard
Credit: Google

In addition to that, Bard can help also explain code snippets.

Google explained that the ability is particularly helpful for users who are still learning how to code. This feature should also be useful for users who need some additional support to understand what a block of code might output.

What makes Bard particularly useful, is the ability to debug code, even when that code is written by Bard.

"If Bard gives you an error message or code that doesn't do what you intended, just tell Bard 'this code didn’t work, please fix it,' and Bard can help you debug," Google explained.

"In many cases, Bard can also help optimize your code by making it faster or more efficient. Just respond to Bard’s initial output with 'Could you please make that code faster?' or 'Find error handling clauses you might have missed.'"

Google Bard
Credit: Google

Long story short, Bard, which is Google's AI-powered internet search chatbot, can finally generate and help debug code.

Users can instruct Bard to solve programming tasks and ask it to fix or explain snippets, as well as generating functions to analyze data for Google Sheets.

While Bard is becoming increasingly powerful and useful, "Bard is still an early experiment, and may sometimes provide inaccurate, misleading or false information while presenting it confidently," said Google.

In this case, "Bard may give you working code that doesn’t produce the expected output, or provide you with code that is not optimal or incomplete."

And because it's a generative AI, it can still hallucinate things, and say words or sentences that are out of context.

For this reason, users should always double-check Bard’s responses.

Despite these challenges, Google strongly believes that Bard’s new capabilities can help user.

Published: 
21/04/2023