testing

Testing Groovy code with assert, Spock, and JUnit.

Python Test Driven Development: Red-Green-Refactor Workflow

Python TDD, short for test driven development, means you write the test before the code. You watch the test fail, write just enough code to make it pass, then clean up. This post teaches the Red-Green-Refactor cycle by building a real password validator one tiny step at a time, so you feel the rhythm instead of just reading about it. “Make it work, make it right, make it fast, in that order.” Kent Beck, TDD By Example Last Updated: July ... 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

Python Sets: Operations, Math Sets, frozenset

Complete Python set tutorial covering creation, set operations (union, intersection, difference), methods, frozenset, and real uses. Tested on Python 3.14.6 with set theory visualized. “Sets are the hidden powerhouse. Most beginners reach for a list when a set would do the same job ten times faster.” Luciano Ramalho, Fluent Python Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Beginner | Reading Time: 18 minutes A Python set is the built-in collection for storing unique items with no ... Read More