TDD and object-oriented programming workshop

141 visits  

99 Bottles of OOP It is a fantastic book by Sandi Metz and Katrina Owen to explore the principles of object-oriented programming and practices like TDD. The common thread is an exercise around a popular song.

In the WeCode Nacho He made a brief workshop on the book 99 Bottles of OOP. He promised to make a full session in Cylicon, and a Lannister always pays his debts.

In the workshop probably not will give us time to make the exercise of the full book, but we can practice and discuss things as TDD, the premise of the priority of transformation or the Flocking Rules. The morning will be very interactive!


We have to bring the computer, either individually, in pairs or groups of three.

Although the book is in Ruby You can do the workshop in any language. The only thing you have to prepare for the workshop is make sure that you can launch a test in your favourite runtime environment.

1.- Download the code:

to) Ruby:

b) Other:

2.- Check that you can throw test:

to) Ruby:

git checkout exercise
ruby test/bottles_test.rb # debería fallar con `uninitialized constant Bottles`

b) Other: will depend on. For example, must do this with Scala:

mv src/test/scala/B src/test/scala/BeerSongTest.scala
sbt test # Falla con `not found: value BeerSong`

If you have any questions, writes to Nacho via Twitter on @juanignaciosl.

Give me more details!

✔ Events