Rubber Duck
Now it can answer
An unexpected benefit of AI chats
I'm a big believer in the Rubber Duck debugging technique (it's just talking through your problems to an inanimate object like a rubber duck), although I've never actually used a rubber duck. For a while my rubber duck were Rick and Morty Funko Pops that lived on my desk. When I was in the office they just served as a reminder to walk through things, but when I went remote I actually could talk it out without appearing like a crazy person.
I didn't do it a lot, but it was helpful from time to time. Then I worked with a team that did a lot more pair programming. I found narrating what I was doing, and more importantly, why I was doing it, immensely useful for writing bug free code.
I think this probably works really well for me because I think in words, narration-like. So the saying "if you can't explain it simply, you don't understand it well enough" (and all similar sentiments) rings very true for me. Putting it into words to explain it to someone else helps me to solidify my understanding.
While I still try to do some kind of interactive programming sessions, the time difference with my current team makes that difficult. So I'm back to more solo debugging. That's why I was happy to find that one of the unexpected side effects of using LLM coding tools was that I would sometimes solve the issue before I even needed to send the prompt.
In trying to accurately describe what the issue was and what I thought the best avenue was to attack the problem I would basically figure out what the issue was. So turns out, LLM prompts can be the new rubber duck. It's a lot cheaper at least.
Bonus: identifying the issue wasn't actually the end; I like to race the LLM. Since I've already typed out what should be enough information to fix it I'll just send it and then try to fix it myself. I can usually beat it, again, when I actually know what the issue is. I like to hope that keeps me sharp, but I'm not naturally an optimistic person.