Rubber Duckies aren’t only for Bathtime – how to solve problems.

When you are stuck with a problem it usually helps to talk through what is happening. Often, simply talking through the problem will make a solution come to light. It’s technique that has been around for a long time, but often the credit goes to The Pragmatic Programmer book that I mentioned a week or so ago. The technique in the book is called rubber duck debugging.

If the problem is with a program that you are writing, simply talk through the code line by line outloud to an inanimate object. A person would also work, but that’s not often possible or the easiest solution. As you talk through each line and explain them you will often realize that the code might not be doing what you were planning for it to do – thus finding the problem and guiding yourself to a solution.

I’m going to post a link to an article that goes into a bit more detail about the psychology at play: https://www.thoughtfulcode.com/rubber-duck-debugging-psychology/

Talking about your problems with a rubber duck will often lead to a solution even if it seems a little foolish.

A Pragmatic Post…

While this book has been around for over 20 years, it wasn’t until this year that I finally managed to read it. I always assumed that since I was writing code on my own I didn’t need to follow any guidelines. I was wrong.

The book covers a ton of territory – some of it didn’t pertain to me – but much of it did. In fact, many of the ideas presented would be helpful for even non-programmers to pay attention to. Though, programming and software development are the focus many of the ideas are transferable to any project. Simple things like the importance of continuing to educate yourself – even if it doesn’t pertain to your current project is just one of the many useful ideas the book puts forth.

The book manages to cover a lot of potentially heavy topics with a distinctive lightness and humor. There was never a point in reading the book that I felt bogged down. In fact, it was one of the few programming related books that I had a hard time putting down.

If you are a programmer, or thinking of jumping into programming or any related field, I highly recommend picking up a copy of this book and reading it. I won’t teach you how to code, but it will help you with every project you pursue after reading it.

The Pragmatic Programmer book cover
The Pragmatic Programmer book has been influencing developers for over 20 years. Click on the book if you want to purchase it. I am not selling it, nor do I get any compensation for the link.