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](https://github.com/mdw-go/testing/blob/main/bowling/bowling_test.go)- This rendition illustrates how to use my own Go testing module.
[[video] The "Bowling Game" Kata, in TCR (test && commit || revert)](https://www.youtube.com/watch?v=qNwvadGPF4k)
- In this rendition I was practicing a new technique: TCR
[[video] The "Bowling Game" Kata in TCR using "Functional Fixtures"](https://www.youtube.com/watch?v=hXiWx50RNKE)
- In this rendition I present a new approach to standard-library Go testing using "functional options".
[[code]
bowling.rkt](https://gist.github.com/mdwhatcott/7f686303be9e9e1dbe42891814e15bb2)- 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: