As part of Kevlin Henney‘s presentation at Sync Conf he showed a technique of visualising your code using Wordle. In a nutshell you strip the comments from your code (lumping it into one giant file in the process), pop it into Wordle and see what drops out. The theory behind this process is that, once you get past the scaffolding of the programming language, the language of the domain should become apparent. The results are very interesting.
I know there’s problems with our main code base. I work on it daily and the entire team knows about the issues at a near visceral level, but finding ways to express and visualise the problems can be hard. Today I discovered I work in a domain of
null. Not great for an OO language. Even the language scaffolding told a story. The relative size of the
import keyword to the
class keyword show we’ve got a lot of dependency issues.
More surprising was the result from our newer code base. Here the language of the domain started to show through, but it coloured by the unit tests which I’d forgotten to remove. On the plus side
@Test features highly, as does
final. Tomorrow I’ll generate a few more Wordles without the test code and use it to spark some discussion on our new architecture in our retrospective.