Friday, June 23, 2006

Perfection Paralysis

It's taken me more than a month to finally get cracking on a pending project of mine. I've been wanting to get this thing done for months now, but could never seem to get started. The problem? Perfection Paralysis.

Being a bit of a perfectionist (HA!) and I'm always fussing over whatever I do. If I write a couple of classes, I'll spend the next few days/weeks/months constantly refactoring, re-designing and re-structuring them. Invariably, I'll either lose interest in the project before I finish or else trash the whole thing to start from the beginning. I was paralysed by my quest for perfection. It was incredibly frustrating.

In the case of this particular project, I was fussing as usual about the design and the technology to use (Spring? something simpler? JDBC? but I want to use Hibernate! etc...) and I just had enough. I finally just sat down and started to push out code (at my usual blazing rate :-). Viola, 2 days later and I've written some 700+ lines of working, tested code and I'm happy :-D. Every time I sit in front of the code, I get the itch to refactor, but I squash it. There'll be time enough for that when I get this out as Alpha. Right now, I want it DONE and I want it OUT!

So yeah, there's a bit of the ol' copy-paste in there, and I can maybe reduce the code size by 20% or so. There are several egregious instances of global variable use and a few too many static methods. One particular class is ballooning alarmingly and needs to be split up... but I'm consciously ignoring these warts. The code works, and it works quite well and at the end, slightly messy but working code trumps code that's beautifully designed, but which exists only on the whiteboard.

It's painful, but I'm learning to say it...