Track
There’s been a rise in open-source models lately, and, when it comes to code editing, players like Cursor AI and GitHub Copilot let users try their AI code assistants for free, but we quickly hit the paywall when using them to build any real project.
Gemini Code Assist, Google's AI code assistant, just got its own very generous free tier. It comes in the form of Visual Studio Code and JetBrains extensions.
In this tutorial, we learn how to set it up on Visual Studio Code and how to use it with several practical examples.
Develop AI Applications
What Are AI Code Assistants?
AI code assistants use AI to help developers code more efficiently by suggesting code snippets, automating repetitive tasks, and providing real-time corrections in coding environments like Visual Studio Code. This lets developers spend less time on routine tasks and more on complex and creative work.
While chatbots can assist with coding tasks, they can be cumbersome to use because they require switching back and forth between the IDE and the AI platform, involving a lot of copying and pasting of code.
AI code assistants integrate directly into the coding environment. This allows them to be aware of our coding context and avoid having to explicitly provide code snippets when we ask questions. This also gives the code assistants the ability to directly modify the code, making it much faster to integrate changes.
How to Install Gemini Code Assist?
In this tutorial, we'll use Gemini Code Assist together with Visual Studio Code. Gemini Code Assist is a Visual Studio extension, so we can install it as we would any other extension:
- Click on the extensions tab on the left panel.
- Type "gemini code assist" in the search box.
- Click the "Install" button.

Once installed, the Gemini tab will appear on the left panel. To start using the code assistant, click on that tab with the Gemini logo and sign in to your Google account.

Testing Gemini Code Assist
To test Gemini Code Assist, I decided to analyze a recent dataset of Spotify songs using Python. The dataset I used was from Kaggle and is available here.
To get started, create a folder and extract the songs.csv file into that folder. Then open the folder in Visual Studio Code. The plan is to start with no code and have Gemini Code Assist write everything for us.
Getting started
The first prompt I sent asked to create a Python function that loads the data into a pandas DataFrame.

Usually, the code assistant works by modifying existing code and showing us a diff with the new changes. Since there's no code yet in this case, we can ask it to create a new file with the proposed code by clicking the last button at the top right corner of the code close in the chat window.

We then rename the file to songs.py.
Running the code
We can run the code using the integrated terminal in Visual Studio Code with the command:
python songs.py
In this case, we get an error:
ModuleNotFoundError: No module named 'pandas'
This is because the songs.py script is trying to use pandas, which isn't installed. This is a perfect opportunity to check if Gemini Code Assist is aware of the terminal inside Visual Studio Code or not.
I asked it to explain how to fix the error in the terminal. Unfortunately, it gave a generic answer showing that it didn't have the ability to access the terminal output. The alternative is to copy and paste the error text into the AI chat, which is a bit more cumbersome. But sure enough, doing so we get the correct answer that we need to run the command pip install pandas in the terminal.
This is an unfortunate limitation because, as a software engineer, asking questions about an error I see in the terminal is one of the most common cases where I use AI.
After installing pandas, we can successfully run the code.

Asking generic questions
Gemini Code Assist isn't limited to coding questions. We can also ask generic questions or data-related questions. Let's try to get an idea of the data we have in the songs.csv file by asking it to list all columns:

In the answer, it created a function that lists the columns, but it also showed a list directly in the answer:

Often, when using Gemini Code Assist, it seemed like it had some trouble distinguishing when I was asking a generic question that only warrants a textual answer from when I wanted it to write code. This is a minor problem because we can ignore the code part, but it does clutter the chat quite a bit.
Asking for new functionality
From the previous answer, we see that there's a track_popularity column. Let's ask Gemini Code Assist to implement a new function that gets the most popular song.

When Gemini Code Assist writes code in the answer, the function doesn't automatically get integrated into our code. To do so, we click on the double arrow button "Diff with Open File." Make sure that, before clicking, the file to which the changes belong is the currently opened file in the editor; otherwise, the changes will be merged into the wrong file.

After pressing the button, we're presented with a diff. On the left we see the current state of the code and on the right the new state. Lines highlighted in red represent lines that will be deleted or changed while lines highlighted in yellow are the additions or changes.

We can look at the scrollbar on the right to locate these changes. Often, several locations in the file require changes, and it's important to take a look at all of them before accepting the changes.

By hovering over a change, we see an arrow in the middle:
![]()
I find the icon unintuitive, but clicking this arrow will specify that we don't want to include that specific change. After deciding which one we want, we can incorporate the new code by clicking the "Accept” button at the top.

Autocomplete
So far, we've been interacting with Gemini Code Assist using the AI chat. This is already a much better workflow than having to copy and paste code back and forth between an AI platform and the code editor because everything is integrated in the same window and we see the diff, which makes it easy to see the new changes. However, that's not all Code Assist can do.
While we write code, the assistant will analyze what we're writing and provide code suggestions that can be integrated with the press of a button.
The track_popularity column in the dataset stores the popularity of a track. Let's write a function that displays the popularity of the songs by a given artist, sorted by their release date. We can use the track_album_release_date to sort.
As we write the function, Gemini Code Assist will suggest auto-completions. When we start writing the function signature, Gemini Code Assist will guess what we want from the function name:

To incorporate a suggestion, we simply press the Tab key on the keyboard. Next, we want to create a copy of the DataFrame containing only the songs from the given artist:

Sometimes, the code suggestion isn't what we want. In this case, we still need to manually write what we want or, if it's close enough, accept it and then edit it. In this example, the next step is to convert the track_album_release_date into a date format. However, for some reason, Gemini Code Assist wants to only get the release year, so I wrote the line manually.

Next, I want to sort the songs by date:

Finally, I return the popularity scores:

Targeting specific code
We can target specific code by first selecting it in the editor. When code is selected, a few automatic prompts will be suggested, such as "Explain this" or "Generate unit tests."

Being able to select a code snippet and ask what it does or how it works is very useful when getting into a new codebase. I found that this is often the hardest step when working on a new product with an existing codebase.
We can also ask it to modify the code with a custom prompt. For example, we can ask it to improve the analyze_artist_popularity_over_time() function we just created:

In this case, it improved the function by adding some checks to prevent errors.
Free Plan Limitations
The free plan of Gemini Code Assist for individuals has some limitations when compared to the Standard and Enterprise plans:
- Limited customization and integration: The free plan does not allow you to connect your private source code repositories for customized code suggestions, which is available in the Enterprise plan.
- Feature access: Certain advanced features in Gemini for Firebase and Apigee, as well as advanced AI-assisted automation in Application Integration, are available only in the Standard and Enterprise plans.
- Security and compliance: The free plan lacks enterprise-grade security features and management tools, as well as IP indemnification, which are included in the Standard and Enterprise offerings.
- Operational limits: The free plan offers a daily limit of 6,000 code-related requests and 240 chat requests, which may be sufficient for individual use but could be limiting for larger team projects.
- Enterprise features and support: Enterprise context features for API creation and advanced app quality analysis is not available in the free plan.
For more details, check out Gemini Code Assist’s website.
My Impressions On Gemini Code Assist
I found Gemini Code Assist works quite well overall. In my experience, it performed similarly to its main competitors, Cursor and Copilot. It's really impressive for a free tool. The free tier supports up to 6,000 code-related requests and 240 chat requests every day. This should be more than enough for most programmers.
Another interesting feature we didn't cover here is their GitHub integration. Gemini Code Assist for GitHub helps by reviewing pull requests to find bugs and style issues and suggesting code changes and fixes automatically. This allows developers to focus more on writing code. If help is needed, users can ask Gemini by leaving a comment in their pull request.
One issue I found is that it seems to struggle a bit with past requests. I often found myself asking for some changes and then deciding to go in a different direction. However, in later iterations, it would keep wanting to integrate those changes. One such example was the function we wrote to display the popularity of a track over time. Initially, I wanted to make a plot with this data and then changed my mind. However, the code to plot that data kept being added to future unrelated requests, which was a bit annoying.
Dangers Of Code Assistants
Recently, I’ve seen more programmers express concerns, such as in this Reddit thread, about how using code assistants like Cursor or Copilot is slowly making them forget how to write code.
There’s no doubt that these tools provide incredible productivity boosts and not using them is putting us at a disadvantage relative to our peers. However, I think everything in life requires a balance, and when it comes to AI coding tools, it’s easy to fall into the trap of blindly accepting the code we’re given. At a minimum, we should take the time to read and understand what it generates.
Using code completion also seems like a better middle-ground because we at least need to start writing something to help retain muscle memory and prevent programmers from relying too much on AI tools. Code completion also tends to provide smaller chunks of code, making it easier to digest.
Conclusion
AI tools keep evolving, with costs decreasing and accessibility expanding. Gemini Code Assist exemplifies this trend by offering a robust AI code assistance tool for free.
This initiative from Google lowers the barrier to entry for developers, allowing virtually anyone to use powerful AI assistance in their coding tasks. It's particularly commendable that Gemini Code Assist provides features that are on par with, or even competitive with, paid services such as Cursor and Copilot. With up to 6,000 code-related requests and 240 chat requests available daily, it offers more than enough support for individual developers or small projects.



