Micro Challenge #33 – Using a rubber duck to debug a programme

19 June 2020 - 3 minute read

Welcome to the thirty-third of Altitude Foundation’s #MicroChallenges2020

Today’s challenge will show you how you can use a rubber duck to debug a programme

What’s a Micro Challenge?

These challenges are short activities to help you develop, revise or refresh your coding skills, posted every Monday, Wednesday and Friday.

Micro Challenge #33

Today’s challenge is to debug a programme. Debugging simply means to find issues and fix them, and one technique for doing this uses a Rubber Duck. 

Put really simply, Rubber Duck debugging is when you try to find an error and a solution by explaining the problem in terms a Rubber Duck can understand. There are two elements to this: one is that it forces you to explain what the issue is. The second is that the Rubber Duck can’t ask complicated questions or give advice. All it can do (metaphorically) is say: What does that mean? 

By breaking down the problem this way, you will often find out exactly where the problem arises.

The Challenge:

Today’s challenge is to debug a programme. You can use a programme you are working on independently, or you can use the programme that our Youth Engagement worker, Marie, created yesterday: Boolean Ball Game. 

If you are using this code, one of the bugs that needs fixing is: there is a response in the If/Then/Else If loop which does not work. How can you fix it?

For the challenge, please write up the questions you use to find the solution. If you want a virtual Rubber Ducky to help you out, you can find one here: Talk with a Duck

Review it:

  • Does the code work now?
  • Are there other issues you have seen? How might you troubleshoot those?


  • Could you programme your own Rubber Duck? 
  • Alternatively: Could you draw a Rubber Duck for others to use for their debugging conversation?

Win a micro:bit!

Don’t forget: If you submit your response to Challenge #32 via the Share It options below before the 30th of June, you will be entered into a prize draw for one of 5 micro:bits.

  • The giveaway is open to any young person aged between 14 and 18 based in the UK. 

Share it

We would love to see what you have created! Please send any pictures, videos, or files of your activities to us – either via Facebook, Twitter or Instagram  using #MicroChallenges2020 or to challenges@altitudefoundation.org. If you are emailing them to us, please let us know if you are happy for us to share your stuff on our social media platforms (with credit, of course). 

Sign-up here to receive a weekly email with Micro Challenges top tips and solutions:

Leave a comment

Leave a Reply