DjangoCon US 2016 - Rub-A-Dub Rubber Duck: Don't be Afraid to Debug! by Anna Ossowski
Everyone of us knows this scenario, it's part of the daily life of a programmer: You build something and it doesn’t work. You run into a bug, you find a problem, you break your code - and then you have to figure out how to fix it again. This can take 5 minutes, several hours, sometimes even several days. Sometimes you get really frustrated and are about to give up but when you finally find the solution it's the greatest feeling in the world. Do you want to learn how to proceed when your code doesn’t work? Do you want to learn how you can become a better problem solver? Do you want to learn how a rubber duck can help you? Then this talk is for you :) In this talk I will present strategies on how to proceed when you run into a bug or other coding problems. I will also talk about what you can do in order to prevent frustration and how you can learn to be more confident when encountering bugs. My goal is to show that bugs are nothing to be scared of, that you can fix (almost) everything and shouldn’t be afraid of breaking things, and that debugging can be easier than you think it might be if you approach it the right way. Breaking things is the first step to learning how to fix them! This talk is inspired by a blog post I wrote a while ago, which you can find here().
Introduction - Who am I? What is this talk about? (2 minutes) What is a bug?/What is debugging? (5 minutes) Why breaking things is great - Don’t be afraid to break things (3 minutes) Why a rubber duck? - Debugging strategies (10 minutes)
Reading error messages the right way How Google can help Rubber ducks, hypothesis, testing different approaches/solutions Reproducing bugs Breaking your code down into smaller pieces Drawing diagrams of code/writing pseudocode Reading documentation Debugging tools like the django-debug toolbar What to do when frustration kicks in (3 minutes)
Where/how to get help (2 minutes) Q&A (5 minutes)