Jump to Content
Application Development

How generative AI fits into the entire software development lifecycle

October 18, 2023
https://storage.googleapis.com/gweb-cloudblog-publish/images/org_chart.max-2500x2500.jpg
Megan O'Keefe

Staff Developer Advocate

Priyanka Vergadia

Head of North America Cloud Developer Advocacy

At Google Cloud, we recognize that building great products for your customers isn't just about writing and shipping code. It's the messy whiteboard sessions, the hallway conversations and email threads, deciding what to build and how. And after you launch, making sure your application is resilient, secure, and has a meaningful impact on your customers.

It's been a fast-moving year for generative AI. With so many tools hitting the market, you might be asking whether all these new things can actually be useful in real life. After all, people — not machines — are at the heart of great software.

With that in mind, let's walk through a day in the life of a Google Cloud developer using Google AI assistance to get from idea to production.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/2-sdlc.gif

Imagine that I'm a software engineer at Cymbal Superstore, a grocery retailer.

https://storage.googleapis.com/gweb-cloudblog-publish/images/3-superstore-app.max-2200x2200.png

Our website runs on Google Cloud, and I've been tasked to add a new products page showcasing the latest snacks. It's 9AM on Monday, I've got my coffee — let's do this.

Design together

The feature request has landed in my inbox. I use Gmail's help me write feature to quickly respond.

https://storage.googleapis.com/gweb-cloudblog-publish/images/4-gmail.max-2200x2200.png

Then, I hop into a meeting room with my teammate, and we start brainstorming the implementation on a whiteboard.

https://storage.googleapis.com/gweb-cloudblog-publish/images/5-whiteboard.max-2200x2200.png

I head back to my desk, and clean up the whiteboard diagram using the Google Cloud Architecture Diagram Tool.

https://storage.googleapis.com/gweb-cloudblog-publish/images/6-arch-diagram-tool.max-2200x2200.png

Now I'm ready to write a design doc. My teammate has to run to a meeting, but I want to bounce around some questions about our architecture. I open Bard, and use Google Lens to upload my architecture diagram. Bard reads my architecture diagram, and I have a quick chat with Bard about any potential risks with my proposed implementation.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/7-bard.gif

From there, I export my Bard conversation to Google Docs to start the design doc. I use Google Docs Help me write to generate an outline. This time-saving feature lets me focus on the tricky design questions, like how we might cache Firestore queries on the backend.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/8-docs.gif

By midday, I've sent my design doc to my team for review. Meanwhile, the UX team has been working on a frontend mock for the New Products page.

https://storage.googleapis.com/gweb-cloudblog-publish/images/9-figma.max-2000x2000.png

By the time my design doc is approved, I have a frontend page ready to start testing against. Let's get coding.

Code (with help)

Writing code can be a solitary thing. And although I'm a seasoned TypeScript engineer, I'm fairly new to Google Cloud, and I often find myself with fifty tabs open — documentation, StackOverflow, calming music — just to write 10 lines of code. Let's explore how Duet AI for Google Cloud can help me out.

I launch my development environment from Google Cloud Workstations and open a code editor. First, I use Duet AI in Apigee to auto-generate an OpenAPI spec for the new REST API endpoint. Then, I use a swagger generator to auto-create TypeScript stub code from that spec.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/10-apigee.gif

Now I'm ready to implement the business logic. I use Duet AI's code generation to prompt, via code comment, the Firestore query I want. I press tab to accept Duet AI's code suggestions.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/11-duet-code-completion.gif

Then, I test my code locally — uh oh. I see an error.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/12-error.gif

I'm not sure what the error means, so I open Duet AI chat from within my IDE. Duet AI is trained on Google Cloud documentation and sample code, and can help me figure out not only what the error means, but how to fix it in my code — no frantic Googling required.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/13-debug.gif

Once I fix the error, I can use the same Duet AI chat thread to help me write a test case for the new endpoint. Duet AI can tailor its response using the contents of my open test file, generating a test that uses the same framework and format as my other tests.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/14-test.gif

With Duet AI's help, I can get to a working prototype faster because it requires less context-switching out of the IDE.

Operate with confidence

I commit my code to source control, then work through a code review with my teammate. I merge in the new feature, and the New Products page rolls out to production. Hooray. But the software development lifecycle doesn't end here.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/15-feature-goes-live.gif

As an app developer who will be on-call for this production service, the first thing I want to find are the service logs. I use Duet AI's console chat feature to help me navigate the Cloud Run console.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/16-findlogs.gif

Then, I work with the SRE team to create some service-level objectives for the Inventory service. In Cloud Monitoring. I use Duet AI's help me modify feature to create complex queries on my service health. As a non-expert in PromQL, this feature can save me a ton of time looking up the right syntax.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/17-metrics.gif

What about security? Let's say that last week during a debugging session, I granted my teammate a temporary, permissive IAM role in my Google Cloud project. Security Command Center can pick up on this. With Duet AI's AI-generated summaries, I can quickly understand the issue, and work with the security team to remediate.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/18-security-summaries.gif

Share the impact

A week goes by, and the product lead has asked me to present a few slides at the upcoming all hands. I work with my business analyst colleague to prepare. We want to understand the impact of creating a new products showcase — did those new products sell better after being featured on their own dedicated page?

We start by creating a to-do list in Google Sheets, using the help me organize feature.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/19-sheets.gif

Then, we dive into the sales data, using Duet AI in Spanner's SQL code completion feature to query the raw transactions data from the last few weeks.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/20-spanner.gif

We gather more data from the sales rollup tables in BigQuery. As the business analyst writes SQL queries with expert ease, I use Duet's code explanation feature to better understand the data we're gathering.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/21-bigquery.gif

From there, I jump to Google Slides and use Duet AI's "Help me visualize" tool to generate supporting imagery for the impact report.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/22-slides.gif

The all-hands goes well, and I have some new ideas on how to improve the feature's performance. All in an (AI-assisted) day's work.

To recap, we used Google's AI assistance features — from Duet AI in Google Workspace and Google Cloud, to Bard — to bring an idea to life. Generative AI tools helped us collaborate, helped us debug when we got stuck, and automated tasks to free up our minds to help tackle the hard stuff. This story only scratches the surface of what Duet AI can do. And there's much more that we would love for you to explore.

Learn more

Posted in