Micro Victories
The last few weeks I was frustrated about not being able to write any code for the project I am on at work. My days are filled with email, spreadsheets, documents, discussions and distractions. All important stuff, I'm sure, but none of it has got to do with actual coding.
I tried to write code during the evenings for that project, just to get my kicks. Two things happened:
1. Frustration grew, because I feel that this is the kind of work I should be doing during the day.
2. As I worked the late night hours, I realized I could never get it all done because the blocks of work were simply to large and required too much research to be done during a few evenings.
In the midst of this all, I held a presentation about Coding Quality at work. The presentation was all about taste, caring for a good product, and putting some love and care into your code. That, and the whole [continuous integration](http://clintshank.javadevelopersjournal.com/ci_build_game.htm) and [unittests](http://junit.sourceforge.net/doc/testinfected/testing.htm) stuff ofcourse. During the questions session, the [FindBugs](http://findbugs.sourceforge.net/) plugin for Eclipse came up. This is a plugin I have installed, but I rarely find/make the time for working through the warnings it genereates.
I did a small demo of Findbugs, and it sure worked. There they were, the stupid mistakes in my code, on the beamer, in front of all my collegues. Ofcourse Murphy says that any beamer will always be at it's sharpest and brightest when your slide has an error on it. In my case, even the people in the far back could clearly read the tiniest font in my edit window.
Back home, I knew there is no way I can get these fixed during working hours, so I created a seperate Eclipse installation at home running Findbugs. As I started fixing some of the most humilliating little bugs, I found out that I couldn't stop. I spent the whole evening tinkering with the code, and it fealt great. Today I suddenly realized why.
Findbugs presents me with little things I can do within 5 minutes each, and when done, there is that next one looking at me. Not surprising, this is also the recipe for addictive video games. You can pick the game up and get right in, and you can stop at any time, but you don't want to.
Every 5 minutes, I solve a bug, run unittest, commit to CVS and feel good about having done that. It's a string of Micro Victories which are really thrilling and relaxing at the same time. There's no time pressure, no requirements, just me, my good taste and a good feeling for each little bug solved.