Programming
- Programming6 min read
Test-driven development
Test-driven development explained with a worked example: the red, green, refactor cycle, writing the smallest failing test, triangulation, how TDD shapes design, a complete kata in Python, TDD with mocks and outside-in, when TDD helps and when it does not, and common misconceptions.
- Programming4 min read
The builder pattern
The builder pattern for objects with many optional parameters: the telescoping-constructor problem it solves, a complete Java builder with validation, immutability, Lombok and records, the Python equivalent, and when a builder is overkill.
- Programming5 min read
The four pillars of OOP
Encapsulation, abstraction, inheritance and polymorphism, explained with one running example in Java and Python, why each matters in real code, and the mistakes interviewers listen for.
- Programming6 min read
Threads explained
What a thread is and how to use threads safely: threads versus processes, creating threads in Java and Python, thread pools, shared memory and race conditions, locks, atomic variables and thread-safe collections, deadlocks, and Java's virtual threads.
- Programming6 min read
Unit testing
What makes a good unit test and how to write them in any language: what a unit is, the arrange-act-assert structure, examples in Python with pytest and JavaScript with Vitest, test doubles (stubs, mocks and fakes), testing edge cases, designing code that is easy to test, the testing pyramid, coverage, and the habits that keep tests fast and trustworthy.