The bowling game kata is odd.I think it's good to revisit the Bowling Game Kata for a reminder on the "strong style" TDD (if that is even a thing). #tdd https://t.co/pPXQ4FXwRd— Henrik Ebbeskog (@henebb) February 20, 2019
I've never seen Uncle Bob demonstrate the kata himself; so I can't speak to its presentation or its effectiveness beyond the written description. It has certainly inspired some number of readers, including myself at various times.
But....
To me, TDD is a tiny software development ritual that makes me more effective at balancing all the demands put on me as a programmer. I get well-designed code, with tests included.— Ron Jeffries (@RonJeffries) February 20, 2019
10/12
I'm becoming more comfortable with the idea that the practice is just a ritual... a meditation... bottle shaking....
In slide two of the Powerpoint deck, the first requirement is presented: Game must implement a specific API.
What I want to call attention to here: this API is not motivated by the tests. The requirements are described on slide #3, followed by a modeling session on slides #4-#9 describing some of the underlying classes that may appear. As of slide #52 at the end of the deck, none of the classes from the modeling session have appeared in the solution.
Furthermore, over the course of writing the tests, some helper methods are discovered; but those helper methods remain within the boundary of the test -- the API remains fixed.
All of the complexity in the problem is within the scoring logic itself, which is a pure function -- given a complete legal sequence of pin falls, compute the game score. Yet the API of the test subject isn't a function, but a state machine. The scoring logic never manages to scape from the boundaries of the Game object -- boundaries that were set before we had any tests at all.
If you want to lean to think the way I think, to design the way I design, then you must learn to react to minutia the way I react. -- Uncle BobWhat the hell are we driving here? Some logic, I suppose.