How I use ChatGPT as my rubber duck
Created by DALL-E

How I use ChatGPT as my rubber duck

Rubber duck debugging is a well-known technique in the software development world where a developer explains their code or problem to an inanimate object (such as a rubber duck) in order to better understand and solve the issue. The name is a reference from a book that is well known in the software engineering circle called "The Pragmatic Programmer". It's a simple but effective way to clarify one's thoughts and approach to problem-solving.

Recently, I've been using a tool called ChatGPT to facilitate my rubber duck debugging sessions. If you haven't heard of ChatGPT (seriously, do you live under a rock?), it is a variant of the GPT-3 language model developed by OpenAI, which has been trained on a large dataset of text and can generate human-like responses to prompts. It is a very close cousin of DALL-E or MidJourney but instead of generating images using prompts, it generates text.

Whenever I get stuck on a coding task that takes me longer than 30 minutes or so, I simply start a conversation with the tool and explain my code or problem to it as if it were a real person. The back and forth conversation with ChatGPT helps me to clarify my thoughts and approach to the problem. It even gives me some examples in the language I tell it to use which is usually TypeScript.

I have found this approach to be better than trying to search for answers with Google. ChatGPT gives me the opportunity to refine and hone in on what it is I am trying to articulate. The feedback it gives me is a good indicator of whether I am explaining the problem correctly. If the suggestions ChatGPT gives me are off topic, then I know that I either haven't articulated it well enough or I don't fully understand the problem.

This is not to say that searching on Google doesn't have its advantages. I have found that Google is great at searching for references such as "name of the React function to create a context". ChatGPT is much better at helping me think through problems that are not necessarily easy to search for on the internet. After some time, I've realized that both tools have their own pros and cons, and by combining them together I am able to take full advantage of what they both have to offer.

In conclusion, ChatGPT has proven to be a useful tool for rubber duck debugging, providing a patient and knowledgeable "partner" for me to bounce ideas off of and helping me to solve problems more efficiently. I know there may be some fear as knowledge workers that AI will takeover and make most of our jobs redundant. This is partially true, however, I see a future where we will have a "partner" that will help us be more productive and efficient. We will be able to get more done in half the time which will give us more time to spend with our friends and families. I know I am being overly optimistic, and maybe even a little naive, but what if...we could have robots and AI do most of the work for us so we as humans can live our lives and enjoy life? Well, I hope at the very least I made you a little interested of the possibilities of this new technology. It's definitely worth trying out and getting a glimpse of what the future may entail for us knowledge workers.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了