From the course: Beyond Vibe Coding with Google Gemini: Become a Deliberate Developer
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Debugging strategies - Gemini Tutorial
From the course: Beyond Vibe Coding with Google Gemini: Become a Deliberate Developer
Debugging strategies
- [Instructor] Previously, we learned how to collaboratively troubleshoot a clear, visible error, a key error with a full trace back. But some of the most challenging bugs are the silent ones, the ones where the code runs without crashing, but the result is just wrong, or bugs that only happen sometimes. These situations require more than just fixing a line, they require a strategy. As deliberate developers, our goal is to identify the right methodology for the problem. So we'll use Gemini as a sounding board and a knowledge base to choose the right tools and techniques for specific, complex debugging scenarios. Let's start with a common problem, a logic error. Check out this code. It's supposed to figure out the best discount for a shopping cart, but in some cases, we get the wrong final price. The intent is to give the best discount to somebody. If they're a member they get a 10% discount, but if they have a coupon, they can get $20 off. When we call the apply_discounts function…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.