error handling

Strategies for handling errors gracefully in Groovy applications.

Python: Polymorphism, Method Overriding & Duck Typing

Think about the power button on a TV remote, an AC remote, and a car key fob. You press the same button on each one, but a completely different thing happens every time. The TV turns on, the AC starts cooling, the car unlocks. Same action, different result depending on what you are pressing it on. That is Python polymorphism in one picture: one name, many behaviours. “If it walks like a duck and it quacks like a duck, then ... Read More

Python: 20 Most Common Error Messages, What They Mean & How to Fix

These are the 20 Python common errors you hit most, each explained with its exact error text, what causes it, and how to fix it. A scannable reference for every Python developer. “The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.” Brian Kernighan Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Beginner | Reading Time: 20 minutes Here is the good news about Python error messages: they repeat. Every Python developer ... Read More

Python: Debugging & Basic Testing with pdb, breakpoint(), assert

Some bugs announce themselves with a loud crash, while the sneakier ones just hand you the wrong answer and let you ship it. Python debugging is how you hunt down both kinds on purpose, and the good news is it comes down to a few small tools you can pick up in an afternoon. This post covers pdb, breakpoint(), and assert, the debugger commands worth memorising, and a calm, repeatable process for finding and fixing bugs. “Debugging is twice as ... Read More