Last semester was the first time I was introduced to Google Colab, a cloud-based platform for writing and running code. Up until then, I had been using PyCharm to write code locally on my computer. PyCharm is great for structured projects, but Colab immediately stood out for how it integrates with the rest of the Google Workspace apps like Drive, Sheets, and Google Gemini.
For a new coder like me, that integration was intuitive and helpful. I could ask questions, get help with syntax, and experiment all within the browser. Python is mostly like natural language, but with Colab, I was able to blend coding and narrative. This let me write snippets of code, explain each step in text, and save everything in one place. It’s a bit like a digital lab notebook for programming. Here is my research to help me understand the basics of Colab.
What Makes Colab Different
Google Colab is built on Jupyter Notebooks, which combine live code, equations, visualizations, and written explanations in a single interactive document. There is no need to install Python or manage local environments. Instead, Google provides the computing power behind the scenes. Needing to run an interpreter for a programming language on my computer was a new concept for me. This is done remotely when I use Colab.
Each notebook is divided into “cells,” which can either hold code or text. For example, I can create one section to load libraries, another to connect to my Google Drive, and another to request data from an API. This structure helps break complex processes into manageable steps and makes it easy to understand what’s happening at each stage.
Structured Steps
I like how Colab encourages a step-by-step mindset. I don’t know if it is imperative to break components of the process into cells, but it helped me develop a workflow of what I was accomplishing. For example, some tasks, like reading the text in a group of PDFs, had to occur before I prompted OpenAI for a review of the data.
When I first started experimenting, I would outline the process like this:
- Load the necessary libraries.
- Connect to Google Drive.
- Enter the API key (for example, to connect to OpenAI).
- Search a dataset or PDF file.
- Write a prompt for the large language model (LLM) to perform a specific task.
Between each of those steps, I’d add a short text cell explaining what I was doing and why. The habit of documenting the steps helped me understand my workflow and made my notebooks feel more like learning journals than just code documents.
Understanding the Limitations
Because Colab runs in the cloud, it comes with computational limits. Here’s what I learned:
- RAM: The free version offers about 12–15 GB of memory. You can request more (up to around 25 GB) by switching to a high-RAM runtime.
- Session time: Notebooks disconnect after 90 minutes of inactivity or about 12 hours of continuous runtime.
- Storage: Anything stored in the Colab session disappears when it ends, unless it’s saved to Drive.
- Persistent processes: Colab won’t continue running once the browser or runtime is closed, so it’s not suited for background data collection tasks like continuous weather logging. For that, a Raspberry Pi or dedicated server would be more appropriate.
There are paid tiers, Colab Pro and Pro+, that extend session lengths and add faster GPUs, but for most of my learning purposes, the free version is more than enough.
Why Colab Works for Learning
Colab removes a lot of the setup barriers that come with traditional programming environments. There’s no need to install packages locally. You can open a browser and start experimenting immediately.
I can imagine students in a viticulture or horticulture course using Colab to visualize site-specific data like soil analysis or weather trends. It’s a fit for hands-on learning in both education and Extension work. There will be a step learning curve for some students or Extension stakeholders who are timid with computers. Easy examples that show them tangible results could help move past these fears.
For my own sake, Colab was my first exposure to using the OpenAI API. I have employed over API services with websites I developed in the past. This was the first API I felt I was able to break through to another higher power of computing. I look forward to experimenting more with Colab and finding ways to maximize the potential of API use of LLMs.
