Preston #codejo 7

For the 7th Codejo I was my usual organised self and had @phpcodemonkey remind me about 5 days before the event to send out the invites and get something sorted. Whoops! I suggested we did a BDD session focussing on the Checkout Kata.

Well this went down a storm. After a sleepless night (due to ferrets), @seanhandley offered to help me with the advertised rspec and cucumber, which I gratefully accepted. However then I thought about all of my arguments against using BDD frameworks, recapped on these blog posts:

And decided to spend the first hour doing what BDD does best, having a conversation. Being grilled by Sean en route really helped.

I explained my journey into understanding BDD, gave examples of how not to do it, got the group to question me as a client (or corner shop owner) and after an hour of intense conversation, ideas and questions, we moved onto a Randori.

We attempted the checkout kata using BDD approach without a framework in Ruby (we used Test::Unit). Started off with a test:

def test_buy_an_apple_as_a_checkout_assistant

What pleased me the most about creating this test was that every single person in the room said it was shit. This was brilliant. The hour long conversation and me explaining TDD had worked. No frameworks. No gimmicks. Just conversation and questioning the content, context and quality of this test.

Having attempted to give this talk/workshop a few times now I was incredibly pleased with the results for the very first time. People understood! We then applied our good TDD skills we’d leaned with good failing tests, simplest to green and then refactoring. When we fund a test too difficult to answer simply we threw it away and refactored  until we could add it. All the while questioning the tests we were writing.

What was especially interesting was speaking to @phpcodemonkey. He has a background in mental health, certificates to show how great an active listener he is, and he left it all (after a good few years and an impressive career) to start a software company. He recognised a lot of techniques from his previous career and could really see the potential in having a language that he, clients and developers could use as documentation, a focus and a conversation point.

I really enjoyed that! ^_^ Thanks to all of you who missed the football and came along.

What did you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s