Skip to main content

Code Katas

// Small challenges, big lessons

Small exercises where I practice design, TDD and refactoring. Each card links out to the GitHub repo.

The word comes from martial arts: a kata is a sequence you repeat until it stops being effort and becomes reflex. In code it is the same, but the moves are design decisions.

Mars Rover built entirely with AI using NestJS and hexagonal architecture. Deploy, move and rotate covered with unit and e2e tests. Comparative write-up against the manual version still pending.

TypeScript NestJS
  • AI-Assisted
  • Hexagonal
  • DDD

Rover on a grid with commands and obstacles. Outside-in iteration starting from the acceptance test.

Java Spring
  • TDD
  • Outside-In
  • Clean Architecture

Same kata in Kotlin, solved outside-in. The inside-out version remains as a pending challenge.

Kotlin
  • TDD
  • Outside-In

Minimal-viable password validation: length, uppercase, lowercase, digit and underscore. A short kata ideal for practicing red-green-refactor TDD with an incremental checklist.

Java
  • TDD
  • Red-Green-Refactor

Roy Osherove's classic solved step by step with red-green-refactor TDD: custom delimiters, multi-line, negative-number exception, and filtering of numbers > 1000.

Java
  • TDD
  • Parsing
  • Red-Green-Refactor

Transform integers to Roman numerals up to 3000, with an exception past the maximum. Strict TDD plus mutation testing with pitest to measure test quality.

Java
  • TDD
  • Red-Green-Refactor
  • Mutation Testing

Seven solutions to the same problem: from plain if/else to a Specification pattern with predicates. A lab to compare styles and see how the design shifts.

Java
  • TDD
  • Refactor
  • Design Exploration

Want to see more or train together?

There is more code on my GitHub. If you fancy a pair programming session, a code review or discussing a problem, drop me a line.