Tag Archives: what the

what’s the london school of tdd?

I’ve been hearing about the London school of TDD, and I’m puzzled. This post by Jason Gorman was helpful, but his examples confused me.

In describing classic TDD (as in TDD by Example), he uses as his example a program to express integers as Roman numerals. Then he gives an example for London school (as in Growing Object Oriented Software Guided By Tests) that is bigger, more complex. I’m not sure how to compare them.

I’m wondering whether London-style TDD provides the same advantages as classic TDD. From Wikipedia:

TDD can lead to more modularized, flexible, and extensible code. This effect often comes about because the methodology requires that the developers think of the software in terms of small units that can be written and tested independently and integrated together later. This leads to smaller, more focused classes, looser coupling, and cleaner interfaces.

I’m just starting to read the second book; I’ll know more as I get into it. But I’m really curious: does London school take the same sort of tiny steps that classic TDD advocates? Does it retain the benefits of TDD? I figure you get test coverage, but do you also get emergent design? Simple* design?

* See the four rules of simple design, as explained by Ron Jeffries.

Ruby shovel operator: What the?!

This is taken from the Ruby Koans. It’s the shovel operator, and it appends stuff to a string.


    original_string = "Hello, "
    hi = original_string
    there = "World"
    hi << there

So I'm totally down with the idea that hi now equals "Hello, World". No problem. But in fact, original_string also now equals "Hello, World". That is totally messed up! :)

But seriously. What is up with that? is there way to not find this just... just... shocking?!