Yesterday I went to Software Craftsmanship Conference 2010 at Bletchley Park.
The program consisted mainly of hands-on type sessions with occasional time out to visit the rebuild of Colossus and look at some of the history of computing they have exhibited there.
Here are the sessions I attended:
Refuctoring Master Class
This was a humorous take on refactoring based around the idea of ‘mortgage driven design’. First we looked at making the worst possible ‘Hello World’ code we could. I paired with Ivan Moore and we created a monstrosity using reflection that was brittle enough that even adding a comment would stop the unit test from passing. Then we had to take the role of an honest programmer trying to add functionality to the code that was created. The person trying to do that to the code we’d created was stuck with treating what we’d done as a black box and doing a search and replace on our output to add the new functionality.
For me the big lesson here is that bad code doesn’t just come from bad programmers, it actually corrupts future programmers. Even with the best will in the world, the programmer who came after us actually made the code even worse by working in it.
Using the Game of Life
The Game of Life is a simulation based on extremely simple rules that can give rise to interesting emergent behaviour. Because it’s so simple, it provides a nice exercise for coding. Some pairs did it using immutable structures in F#, I was in a pair that created it using processing.js, while others used scala and java and c#. At the beginning a one line implementation of it in APL, a functional vector language was shown. At the end people presented what they’d done.
Call to Action
Jason Gorman gave an impassioned plea for craftsmanship in software. Here’s what he said (remixed via my brain):
“In 1943 there was one electronic computer in the world, and it was right here at Bletchley Park, the Colossus. Now they are in our cars, and our pockets, and there are 20 billion of them worldwide. That’s much more than there are humans. In twenty years, they’ll be like dust, swimming through our blood stream, deciding which cells to kill and which to leave alive, and who will have written the software they’ll be running? A VB programmer? The idea terrifies me. We are the thread on which the future is hanging.”