Google invited me to give Bard a try. Bard is Google’s LLM AI model and the design and function is like ChatGPT, yet very different. Which, if you think about it, is no different than human intelligence. I’ll leave that discussion for another time and place (and a couple of beers). Initially Bard wasn’t able to code. But a few weeks ago I got an email announcing that Bard had graduated and could now code. Here’s part of that email:
Code and debug with Bard ?
Collaborate with Bard to help generate, explain, and debug your code. Google Colab users can also export Python code generated by Bard directly to Google Colab to seamlessly continue
Coding Prompt Asset
Bard is always improving ?
Navigate to the new “Updates” page from the left hand menu to see the latest features, product improvements, and bug fixes for Bard.
As an early experiment, Bard won’t always get it right, but with your help and feedback, it will get better every day.
Cool! So I gave Bard the same challenge as ChatGPT. Write a single page website. Let’s see how we did.
can you write html
Yes, I can write HTML. HTML is a markup language that is used to create web pages. It is a relatively simple language
to learn, and it is used by web developers all over the world.
Here is an example of a simple HTML page:
Bard said yes! That was nice to hear. It also provided a basic page template without even being asked for it. Nice. And it followed up with even more!
I can write HTML code to create a variety of web pages, including:
- Web pages with text, images, and links
- Web pages with forms
- Web pages with tables
- Web pages with interactive elements
I can also write HTML code to create web pages that are responsive, meaning that they will look good on all devices, including computers, tablets, and smartphones.
If you need help writing HTML code, I can help you. Just ask me any questions that you have, and I will do my best to answer them.
What else can it do? I took it for a long drive, although not as long as I drove ChatGPT (needs a new name – something like Dave :-). Here’s what I asked:
can you show me the html and css for a responsive single page website using seo best practice
where is the css
can we change the nav menu to display across the top of the page
where is the css
The nav menu is still displaying horizontally
I think the flex-direction needs to be changed to row
Can we move the header to be aligned to the right with the nav menu aligned to the left
the header needs to fill the entire window
The menu still looks bad. build a new navigation header with a horizontal menu left aligned and a header title right aligned
The header title is getting truncated
add a hero section with a responsive image and overlay text
where is the css
the image is not responsive
how to we keep the aspect ratio correct for the image as it scales
Bard was full of wrong answers, or answers that conflicted with previously added CSS or HTML. We had a very difficult time building the header whereas ChatGPT put it together easily and taught me a new css trick (who knows how compatible it is though). Bard didn’t want to give up the CSS with the HTML even though, in many cases, one with out the other was useless. I did a bit of human tweaking to the CSS and we ended up with a page that looks like this (click the image to see the live page):
Over-all a nice start for a single page website and in just 14 questions! Maybe a better driver could have done it in 7 (a new competition?). It is all about asking it the right questions. Unlike human intelligence it doesn’t have the luxury of sight. If I could give it a sketch, or a visual example (URL) that would be powerful and probably produce a better result. None the less, 14 questions! Add some styling to the sections and add a contact form, or just a mailto URL A mailto URL is usually better unless you need to collect specific information, and you have a fully functioning website.
Finally I asked Bard:
now that we built a website how do I publish it
- Use (NetGate) a web hosting service. This is the most common way to publish a website. Web hosting services provide space on their servers for websites to be stored. When you use a web hosting service, you will need to purchase a domain name and upload your website files to the hosting service’s server.
Nice job Bard! Humans added the (NetGate) text to the response.