Wednesday, July 06, 2005

Bad brain! Drop it!

This morning at about 4:30, I awoke to the persistent nagging of my brain.

Before going to bed, I'd been doing some pretty intense Java review - since I haven't been doing that much hands-on in the coding realm lately, and I need to stay loose technologically (especially since I'm one of the largest advocates for the Java re-implementation of our current legacy code base).

During that though, I was drafting up and illustrative example of one of the principles I really wanted to make sure I had down solid: and it utterly refused to work. For probably the better part of 40 minutes I off-and-on wrestled with the problem and the environment, tweaking both in a vain attempt to get it functional, and researching online to see what might be contributing to the behaviour I was seeing and couldn't reconcile based on my own experience.

Eventually I gave up, and decided to come back to it later. My brain decided that "later" meant 0430 hours on July 6th 2005. I refused to wake all the way though, and held on to the minor groggy delirium I believed was somehow still capable of contributing to the accrual of rest. Inside that fog I couldn't get the code out of my head - it was played back in most of the various iterations I had attempted, all with the identical undesired outcome.

Finally, it pointed out one little miss-placed word. Something that should have been a common error and easily resolved, but was overlooked because the byte code compilation worked without a hitch. It was being exposed in error-form as a fairly generic message, free from the actual context because of the nature of the misplacement (which was attempting to descend into a non-existent client method). Upon recognizing this, I immediately knew the solution and quickly fed that back into cerebral playback loop.

Which it simply accepted and added to its own feed and still wouldn't let me go.

I could have woken up enough to go downstairs and try it out in an effort to pacify myself. Heck, I could have logged onto the wifi with my Palm from the bed and done it via ssh. I refused to be that awake though, and still clung to that stupor as a refuge from consciousness until I managed to drift off for 1/2 an hour more sleep before getting up at 6.

Whereupon I promptly went downstairs, verified the corner condition that produced the error through an independent test, implemented the visualized correction (which worked) and was satisfied with a job well done.

Odd, though; I hadn't thought the unsolved problem to be that important. Maybe the duration of concentration had something to do with it?

Either way, next time I'm just going to go to the stupid computer and fix it. I'll probably get more sleep that way (assuming I go back to bed afterward, properly purged, and haven't [via the new solution] opened up so many creative possibilities that I end up with massive brainstorms). Weird stuff, that.

No comments: