Thursday, April 10, 2008

3000 Lines of Code a Day

I've been in a productive spell lately. Ok, maybe 3000 lines of code a day is an exaggeration. But I have definitely been on a roll. Usually I code small modules and test along the way. But since the project I've been working on is largely distributed that would have required too much additional work. So I coded the entire thing and now begin the testing. Somewhere along the way I picked up an uncanny ability to write large chunks of code and have them 'just work'. I believe it's because I build my checks into the code from the beginning .. Usually before I have written the significant bit of the code. My methods often begin with a series of sanity checks. If anything important fails the check, I throw an exception. This allows me to isolate most of the silly programming mistakes very quickly. It was a tough lesson to learn, but has saved me time and again.