Suppose I'm doing the print-diamond kata in cyber-dojo in Java. I start with a test I slime a solution as follows now I add a second test and I slime again as follows Like all techniques this approach has a certain style. In this case there is a small but definite asymmetry between the specificness of the tests (one for 'A' and another one for 'B') and the slightly less specificness of the code (an explicit if for 'A' but a default everything-else for 'B'). This is a style that is relaxed about the asymmetry, a style that emphasises this step as merely one temporary step on the path of many steps leading towards something more permanent. A style that recognises that code, by it's nature, is always going to be more general than tests.

But suppose you get hit by a bus tomorrow. How easily could your colleagues tell that this code was work in progress? Code that was not finished?

As an experiment I thought I would try an alternative style. One that is not so relaxed about the asymmetry. One that tries a bit harder to be more explicit about distinguishing code that's a temporary step still on the path from code that has reached its destination.

First I wrote a test that expresses the fact that nothing is implemented. I make this pass as follows The scaffolding, as its name suggests, will have to be taken down once the code is done. While it remains, it indicates that the code is not done. Now I start. I add the diamond_A test (as before) and make it pass I add a second diamond_B test (as before) and make it pass The scaffolding is still there. We haven't finished yet. Now suppose I refactor the slime (by deliberately duplicating) and end up with this The code inside the two if statements is (deliberately) identical so I refactor to this Now I add a new test for 'C' This fails. I make it pass by changing the line to Now I remove the if completely And it no longer compiles.
I have unreachable scaffolding.
Time for the scaffolding to come down.
I delete the throw statement. Now the scaffolding() test fails. I delete that too.
We're green.
The scaffolding is gone.
[null, null, {"document_url": "http://jonjagger.blogspot.com/2012_08_29_archive.html", "unformatted_src": "http://1.bp.blogspot.com/-GRkZvYMlCJc/UD5GWvb6p9I/AAAAAAAABbI/uobjHajpE_o/s200/Scaffolding.jpeg", "src": "http://1.bp.blogspot.com/-GRkZvYMlCJc/UD5GWvb6p9I/AAAAAAAABbI/uobjHajpE_o/s200/Scaffolding.jpeg", "formatted_filename": "Scaffolding", "rendered_width": 200, "rendered_height": 150}, null, null, null, null, null]