Troubleshoot and improve code readability with Gemini Code Assist
Skills:
AI-Assisted Code Review80%
Key Takeaways
Improves code readability with Gemini Code Assist
Full Transcript
have you ever found yourself so deep in a coding session that comments became an afterthought it happens to me all the time and I always think I completely understand this code I can write those comments later unfortunately I usually forget to add the comments and while my code is legible it can take me a while to translate the code into understandable comments luckily Gemini code assist can now help Gemini code assist provides code Transformations which allows me to troubleshoot code with issues improve code readability make code more efficient and most helpful for me generate comments in this video I will use Gemini cesis code Transformations feature to understand code I wrote when I was revisiting data structures in this file I was learning how to create a binary search tree in Java you can tell I was learning because I creatively named my file solution. Java I remember being so excited that I started writing code that had nothing to do with binary search trees but I don't remember why I chose specific implementation decisions for example I don't remember why I have two different methods name contains maybe Gemini cotsis can jog my memory I'll request that it explain this ha that's why the public contains method checks whether a given value exists in the binary search tree and it relies on the private contains method to recursively search the tree I love that Gemini Cod assis goes beyond that and comprehensively explains the code including adding an example and summarizing with key points as I continued to evaluate the code I noticed something interesting I added a comment on line 118 when I first wrote this code I wonder if Gemini cesis can determine whether my comment was correct I was concerned that Gemini cottoy might think I was asking it about the entire file but I love seeing that it shows the code block it analyzed before providing the analysis look at that my comment was inaccurate better yet Gemini codacy has recom recommendations for me to fix the code I'll be sure to address those in another video after a series of print methods I noticed that I created a file formatter this is where my excitement got the best of me and I started writing code that was completely unrelated to the assignment because of that this section is confusing to me it requires too much Contex switching to figure it out now so I'll ask Gemini for help whoa this is different from the prior suggestion Gemini Cod assist essentially went line by line and explained both the method and many of the individual lines as I continued scrolling through the file I noticed another instance where I added a comment in this case however it was a to-do I vaguely remember this I recall that my logs were written to files that did not follow my preferred naming Convention of treel log.txt instead the files include a numerical suffix like Tre log.txt do1 when I wrote this Gemini cotsis did not exist so finding the answer was quite the challenge clearly so because I never figured this out thankfully I have Gemini Cod assist so I asked it to explain this entire Tri block and will follow up with another request help me resolve the to-do comment interestingly Gemini CODIS just educated me on how the file Handler class works it appends a number to the original file name and Gemini cotsis just exceeded my expectations by giving me two ways to resolve the underlying issue either delete the existing file or use a different file name now that Gemini code assist helped me understand the code I want to transform it in this instance I've asked Gemini cotsis to help me add comments something I should have done when I first develop this code Gemini code assist made the changes and they look great my code now includes comments that's how Gemini Cod assist code Transformations feature can be used to examine code I wrote years ago Gemini code assist helped explain the code added comments validated the accuracy of existing comments and helped me Resolve an outstanding to-do if you have code you need to revisit and transform click the link in the description to learn more about Gemini cusis code Transformations feature and get started today [Music]
Original Description
Code with Gemini Code Assist → https://goo.gle/4cORwFi
Learn how to use Gemini Code Assist to make code more efficient. From troubleshooting code with issues to generating comments, watch along as Luis Urena, Developer Advocate at Google Cloud, demonstrates step-by-step how to ask Gemini Code Assist’s Code Transformations to understand code he wrote when he was revisiting data structures. Check out the power of generative AI for developers by clicking on the link above.
Chapters:
0:00 - Intro
0:55 - Ask Gemini to explain code
2:00 - Ask Gemini to evaluate comments
2:35 - Ask Gemini to explain a file formatter
3:10 - Ask Gemini to resolve a TODO comment
4:24- Ask Gemini to transform code
4:54 - Learn more
Watch more Gemini for Google Cloud → https://goo.gle/Gemini4Cloud
Subscribe to Google Cloud Tech → https://goo.gle/GoogleCloudTech
#Gemini #GoogleCloud
Speaker: Luis Urena
Products Mentioned: Cloud - AI and Machine Learning - Cloud Natural Language
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Google Cloud Tech · Google Cloud Tech · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
I’m going for it #GoogleCloudCertified
Google Cloud Tech
I had to get #GoogleCloudCertified
Google Cloud Tech
Be better overall at what you do #GoogleCloudCertified
Google Cloud Tech
Cloud Monitoring on our radar #Analysis #Uptime
Google Cloud Tech
Introduction to Generative AI Studio
Google Cloud Tech
How to use Github Actions with Google's Workload Identity Federation
Google Cloud Tech
Introduction to Responsible AI
Google Cloud Tech
Networking updates and CDMC-certified architecture
Google Cloud Tech
Create and use a Cloud Storage bucket
Google Cloud Tech
How to digitize text from documents
Google Cloud Tech
Faster analytical queries with AlloyDB
Google Cloud Tech
Next ‘23 sessions and FaaS Wave
Google Cloud Tech
Introduction to Assured Open Source Software
Google Cloud Tech
BigQuery Cost Optimization: Storage
Google Cloud Tech
BigQuery Cost Optimization: Compute
Google Cloud Tech
BigQuery Cost Optimization: Select Queries
Google Cloud Tech
Remote Field Equipment Management with Manufacturing Data Engine
Google Cloud Tech
Supercharging your applications with Cloud SQL Enterprise Plus
Google Cloud Tech
Vector Support on our radar #GenAI
Google Cloud Tech
Architecting a blockchain startup with Google Cloud
Google Cloud Tech
Kubernetes and multitasking updates!
Google Cloud Tech
GKE: Using Kubernetes Events
Google Cloud Tech
How to configure firewall rules for Cloud Composer
Google Cloud Tech
Vertex AI Embeddings API + Matching Engine: Grounding LLMs made easy
Google Cloud Tech
Geospatial analytics on our radar #EarthEngine #BigQuery
Google Cloud Tech
Ensuring requests are set in Kubernetes
Google Cloud Tech
Cloud Next 2023, Google research program, and more!
Google Cloud Tech
How to migrate projects between organizations with Resource Manager
Google Cloud Tech
How to run #MySQL in Google Cloud
Google Cloud Tech
#GenerativeAI for enterprises and #Next2023
Google Cloud Tech
How Google Photos scales to store 4 trillion photos and videos
Google Cloud Tech
Google Cross-Cloud Interconnect (Demo 2)
Google Cloud Tech
GKE Cost Optimization Golden Signals: Introduction
Google Cloud Tech
GKE Cost Optimization Golden Signals: Workload Rightsizing
Google Cloud Tech
GKE Load Balancing: Overview
Google Cloud Tech
GKE Load Balancing: Best Practices
Google Cloud Tech
Disaster Recovery in GKE
Google Cloud Tech
How to configure IP masquerade agent in GKE Standard clusters
Google Cloud Tech
Enable and use GKE Control plane logs
Google Cloud Tech
Compliance in Australia with Assured Workloads
Google Cloud Tech
Creating budgets and budget alerts in Google Cloud #FinOps
Google Cloud Tech
Cloud SQL Enterprise Plus on our radar #mySQL
Google Cloud Tech
What's Next for Google Cloud?
Google Cloud Tech
How Loveholidays scaled with Contact Center AI
Google Cloud Tech
What is fleet team management in GKE?
Google Cloud Tech
Troubleshoot VPC Network Peering
Google Cloud Tech
Introduction to DocAI and Contact Center AI
Google Cloud Tech
Cloud Run Direct VPC egress explained
Google Cloud Tech
Database deployment options in GKE
Google Cloud Tech
Analyze cloud billing data with #BigQuery
Google Cloud Tech
Tips to becoming a world-class Prompt Engineer
Google Cloud Tech
Serverless is simple. Do I need CI/CD?
Google Cloud Tech
Accelerating model deployment with MLOps
Google Cloud Tech
How Hawaii's Department of Human Services scaled with CCAI
Google Cloud Tech
Pricing API on our #Radar
Google Cloud Tech
How Recommendations AI for Media can boost customer retention
Google Cloud Tech
Troubleshooting: Node Not Ready Status
Google Cloud Tech
One weekend until Cloud Next 2023!
Google Cloud Tech
#GoogleCloudNext starts tomorrow!
Google Cloud Tech
#GoogleCloudNext will be demand!
Google Cloud Tech
More on: AI-Assisted Code Review
View skill →Related Reads
📰
📰
📰
📰
DeepMind’s Hassabis says a STEM degree makes you 10x better with AI
The Next Web AI
The Math Behind Every AI Agent: A Beginner’s Guide to LLM Intelligence
Medium · AI
The Math Behind Every AI Agent: A Beginner’s Guide to LLM Intelligence
Medium · Machine Learning
I Used AI for 30 Days Instead of Google. Here’s What Actually Changed
Medium · ChatGPT
Chapters (6)
Intro
0:55
Ask Gemini to explain code
2:00
Ask Gemini to evaluate comments
2:35
Ask Gemini to explain a file formatter
3:10
Ask Gemini to resolve a TODO comment
4:54
Learn more
🎓
Tutor Explanation
DeepCamp AI