Deliberate practice with tools
Tuesday, October 26th, 2010In my career I had the luck to hold jobs where I could exchange useful feedback on coding practices with very smart people. I have also held jobs where that is not possible. Back in the not so distant days when I did not use continuous integration and unit tests and such goodies, I was left with learning from experience, painful as it can be. Nowadays however a lot of tools, kindly provided by a wide community, especially for the Java language enable rapid and specific feedback on your work. For the remainder of this post I will stay on the side that I know best with Java.
I have been using static analyzer such as checkstyle, PMD, Findbugs or JDepend for a few years to give me useful information on my code and left it at that. More recently I have used the violations reported by those tools (to which I added Sonar) and started to actively try to reduce the number of violations, focusing on specific ones. The one that yielded the biggest improvement was ‘design for extension’. The package circular dependency analysis also pushed to think more about how packages should be structured where interfaces should go and which classes should be available outside their package. It has been very satisfying to notice how much more liveable my code has become.
To be sure this would not have been possible without a good amount of automated tests and continuous integration and source control management to provide the necessary safety net for experimentation. Next I will work on staying out of the red (I have to admit I originally dismissed this idea when I saw it presented by Joshua Kerievsky) as I am starting to see how valuable it is to leverage modern IDE capabilities and structure the mental processes that underpins refactoring.
How do you do deliberate practice ? What are the tools you would recommend for it ?
