Skip to content

Using GPT as a rubber ducky

Posted on:January 16, 2024 at 11:42 PM

Why

I bet you’ve experienced this phenomenon at least once: as soon as you attempt to explain the issue you’re having to a friend or a colleague, you suddenly realize how to solve it. Well, that’s just how our brains work, nothing mysterious or magical about it. Talking through problems has always been a great way to figure out possible solutions, so it’s always a good idea to discuss an issue with someone: even if they can’t help you solve it, you may stumble upon a solution just by explaining what you’re dealing with.

Somethimes, though, you don’t have anybody around that would listen to you. Not because you’re a terrible person (well, not necessarily because of that) but because everyone’s busy, you’re busy, or perhaps the issue is maddeningly, embarrassingly simply and you just need to solve it yourself. That’s when rubber duck debugging is the way to go.

What??

Yep, it’s an actual thing. I mean, it has a Wikipedia page so it’s real (these are the rules, sorry). Anyway, I can’t count how many times I’d typed a Stack Overflow question or a lengthy message in Slack only to have an “aha!” moment, delete it all, and resolve whatever it was that needed resolving. Sure, it doesn’t work every time, but it certainly works, like, a lot.

If you have an actual rubber duck toy, good for you. Cherish your friendship and all that. And while it’s true that you don’t have to use specifically a rubber duck toy, again, the rules are such that you take it, put it in front of you and pour your soul to it: what you’re trying to do, how you’re doing it, why this way in particular, what’s not going right, what you’ve already tried, and so forth until either you find a solution, realize that you’ve tried everything, or the duck toy starts to respond in a tiny voice. In this last case, please, seek medical attention, otherwise, that’s the entire technique.

It makes me sad and cringe, but I guess I’m a techbro at heart. Why use an outdated tech using my hands when I could use a chat bot? Well, I mean, there are multiple reasons why a rubber duck toy is better than a chat bot, but for the purposes of this post, let’s just assume it’s not. Trust me, bro, so to speak.

Anyway, I’ve found it very helpful to chat with an LLM the way I’d chat with a rubber ducky. It could be literally any LLM of your choice; for historical reasons, I have a ChatGPT account and that’s what I’ve been using.

How

I’ve covered the basics of it a few paragraphs back, but there area few things to keep in mind:

I know it may sound basic, obvious even. I bet there’re thousands of engineers who’re using GPTs as their rubber duckies. For me, it was kind of a breakthrough: I explain stuff in the chat window, generalize it, add relevant details, and oh, fuck, of course, that’s it. Half of the time, as with actual real Slack messages, I don’t even have to send my message to ChatGPT.

Just remember that everything you tell these GPT may and will be used to produce responses to other people’s questions. Be careful about what you’re asking your Techbro Rubber Ducky™. 🐤