
- By Brian Hoang
- ·
- Posted 16 Aug 2023
Practical React Testing 101
Test driven development (TDD) is a tried and tested way of working in software development, which focuses on writing tests for a desired behaviour,..
Remember when it was the norm to go into the office, daily, and we were able to to easily talk out loud to the person next to us?
My husband got me a cat. Now I love cats but my husband is a dog person. He insisted on getting me a cat. Why? Because I would read to him, out loud, content that I’d written, as a way to get feedback. The idea was that when he was away on business, I had our cat, Princess, that I could read to, instead, and sort out my thoughts.
Now, not everyone has the option to go and get a cat to talk to and it’s not always convenient to take your cat to work in order to proof your content or code, so in those cases, all you need is to try out Rubber Ducking.
Rubber ducking or rubber ducking debugging is a technique where you explain your thought process or problem to an inanimate object, such as a rubber duck, as a way of finding solutions or to give yourself clarity.
The origin of the term, 'Rubber Ducking' is unclear, but it came to prominence through the book "The Pragmatic Programmer" by Andrew Hunt and David Thomas (1999).
The key here is to speak out loud and take the process seriously, just as if you were speaking to a real person.
It is the actual act of speaking out loud that is key here because it helps bring clarity and focus to your thoughts. This, in turn, leads to improved problem-solving and deeper understanding.
Rubber ducking isn't just for debugging, it can be used for non-programming applications by talking through a personal or work-related issue, brainstorming ideas, or reflecting on a situation.
The simple act of talking out loud forces you to organise and articulate your thoughts in a way that makes sense, which can help you see things more clearly and identify areas of confusion or uncertainty.
Not convinced? OK, try this.
Go get your cat, teddy or toy. So not your favourite mug. It has to be something that you can talk to as though it's another person.
Take something that you have written and then read it out loud. The first thing that you notice is whether or not you have put enough punctuation in. When you read out loud, you put natural pauses and spaces for breath, into your work.
Next, anything that wasn't fully formed will sound 'off', when you hear it out loud. It might be something as simple as mixing two words up such as affect and effect or missing an ‘a’ or ‘the’ because you typed too quickly.
It seems so crazy that something as simple as speaking out loud to an object can do all this, but honestly, it works. There is even a website dedicated to it.
Simple answer? No. What you choose to talk to needs to be something that you can relate to as representing a person.
Meet Spike. Spike belongs to Angela Channer, Principal Software Craftsperson at Codurance.
Angela uses Spike as her 'rubber duck'. Spike is invaluable to Angela and he has both an AirTag (for GPS Tracking) and a dog tag (in case he wanders off) to make sure he is available when needed.
It's all about being able to talk out loud to your chosen 'rubber duck' without feeling self conscious (OK, you might for the first few times but it does pass).
So, go on, get out your rubber duck, Spike or pet and talk to them.
Cat Tax - Princess rubber ducking with me
Test driven development (TDD) is a tried and tested way of working in software development, which focuses on writing tests for a desired behaviour,..
The advent of Git brought a new era to software development. As a consequence, new approaches to developing applications were discovered. One of them..
Owing to the popularity of the blog, we've created an e-book which you can find and download from the banner image below. Is AI About to..
Join our newsletter for expert tips and inspirational case studies
Join our newsletter for expert tips and inspirational case studies