Back to blog
Back to blog
PythonWeb Dev
Debugging Like a Pro (Even When You Are 10)
Errors are not failures, they are clues. Here is the routine real developers use to squash bugs.
Adam 28 July 2026 4 min read
Every professional programmer writes broken code every single day. The difference is that they have a routine for fixing it.
The four-step routine
- Read the error message out loud. It usually names the line.
- Print the values around that line to see what the computer sees.
- Change one thing at a time, then run it again.
- Explain the problem to a pet, a plant or a rubber duck.
Printing your way out of trouble
python
1total = 0
2prices = [3, 5, "7"]
3
4for price in prices:
5 print("adding", price, type(price)) # the clue is here
6 total += int(price)
7
8print("Total:", total)
Try it yourself
Break your own code on purpose and fix it.
- 1Take a working program and delete one colon.
- 2Read the error carefully and write down what it says.
- 3Fix it, then remove a quotation mark and repeat.
- 4Keep a bug diary: every bug you name you will recognise next time.
Keep going
Python
Learn Python Basics in One Afternoon
Print your first message, store information in variables and make the computer repeat things for you.
Adam20 Sept 2026 · 6 min
Python
Draw Rainbow Art with Python Turtle
Turn a few lines of code into spinning rainbow spirals using Python's built-in drawing robot.
Mia12 Sept 2026 · 5 min
MinecraftPython
Redstone Is Really Just Computer Logic
Doors, traps and secret bases: learn AND, OR and NOT gates by building them out of redstone.
Nora14 Aug 2026 · 5 min