Suggestion: ignore this and just read the book.
Slides, totally uninteresting.
Take a look at the branches, there are the steps. Anyway, just read the book.
Really. Read-the-book :D
PS: and thank you very much for attending and for your warm feedback. We all knew that it should've been at least 2-hours long but you were really understanding :)
99 Bottles Kata
Based on 99 Bottles of OOP book by Sandi Metz and Katrina Owen.
I'll follow the Ruby solution of the book, but feel free to checkout
initial branch and make a version for your
language, or pick the tests from the polyglot repo.
We'll assume that you have Ruby 1.9+.
git clone <this repo>.
git fetch origin initial && git checkout initial.
ruby test/bottles_test.rbshould run with
8 runs, 0 assertions, 0 failures, 1 errors, 7 skipsresult.
Before the workshop...
... it'd be great if you did the exercise. This is the way that the authors suggest:
The test suite contains one failing test, and many skipped tests. Your goal is to write code that passes all of the tests. Follow this protocol:
- run the tests and examine the failure
- write only enough code to pass the failing test
- unskip the next test (this simulates writing it yourself)
Repeat the above until no tests is skipped, and you’ve written code to pass each one. Work on this task for 30 minutes. The vast majority of folks do not finish in 30 minutes, but it’s useful, for later comparison purposes, to record how far you got. Even if you can’t force yourself to stop at that point, take a break at 30 minutes and save your code.