I was first introduced to the "Bowling Game" kata/exercise in "Agile Principles, Patterns, and Practices in C#" (by Robert and Micah Martin), which I read more than 10 years ago. Chapter 6 of that book is a 40+ page programming episode presented in dialog between two programmers using TDD to implement an algorithm for scoring a bowling game. Robert Martin has used it to teach TDD ever since. I was drawn to the exercise as a way to begin learning new programming languages or new approaches to testing. Here are a few previous renditions:
- [code]
bowling_test.go
- This rendition illustrates how to use my own Go testing module.
- [video] The "Bowling Game" Kata, in TCR (test && commit || revert)
- In this rendition I was practicing a new technique: TCR
- [video] The "Bowling Game" Kata in TCR using "Functional Fixtures"
- In this rendition I present a new approach to standard-library Go testing using "functional options".
- [code]
bowling.rkt
- A few months ago I dabbled in Racket, a functional programming language descended from Scheme.
I'm currently learning Clojure (a functional language descended from Lisp that runs on the JVM) so I took yet another stab at the "Bowling Game" today: