Monday 26 March 2007 — This is over 17 years old. Be careful.
I often wake up before I need to get up, and I’ll look at the clock to see what time it is. For some reason, this often happens at 4:00 am. I don’t mean between 3:30 and 4:30, I mean between 3:55 and 4:05. I’ve long wondered what could make me open my eyes at the same time so often.
When it happened this morning, I wondered again, and in my hazy dream-like state, I finally came up with an answer. I decided there is a cron job running somewhere, and it’s a Python script that makes the mistake of overwriting a built-in function or type with a variable (like file=”foo”, or list=[1,2]), so that the next time the script runs, it fails, and that failure is what wakes me up.
The problem with this theory of course, as I realized the next time I floated up to consciousness, is that there is nothing in my bedroom running cron jobs. I forget the details, but I found a rebuttal to that objection too, so that I was pretty satisfied that I had finally found the answer.
In the clear light of morning, of course, the details elude me, though I can’t shake the feeling that I should look through my code for overwritten built-ins...
Comments
I woke up at 4:30 this morning with my brain trying to figure out a solution to one of the questions on a Google recruitment questionaire. This one was something about writing an app that would color each side of a dodecahedron using only 3 colors in such a way that no side ever touched another of the same color... but as that's not possible I must have misremembered the problem which made my brain try and figure out what piece of the problem i wasn't remembering.
I wonder if the 4 am(ish) mental buzzing is a normal geek thing?
That night I drempt(sp?) I debugged the module. It took many many recompiles in my dream, and two sessions in the debugger. The detail was quite something in that dream. The next day I went into work and fixed the bugs I found in my dream. I did not hit compile. I told a co-worker about my dream and we laughed about long hours and impossible deadlines.
I hit compile, and had 0 errors, and 0 bugs.
8 Months later, no bug had been found in the code.
(no clue after that as the project and Canton offices were closed).
This was a singular experience and it has stuck with me these past ~15 years. It is a rare experience where a piece of software I have written (no matter how small or simple) has run on the first attempt, let alone been bug free; which to my knowledge has not happened sense. I have had many dreams of compiling sense then, but nothing like that one extremely memorable dream. I still keep a printout of the code with my notes from that day.
No trains nearby. Occasionally I hear planes, but I doubt they're flying over at 4am.
Or I'll be facing away from the clock talking to my wife, and she'll ask what the time is and it'll be 11:11. It's probably just a coincidence since we're usually going to sleep around the same time, and that's just the times that stick in my mind.
Still, it's always a bit "whoa" whenever it happens! Well, it's almost 10, time to go to bed and wait for 11:11! :)
Of course, I only considered it a problem when I didn't have a challenging problem at work that needed a solution.
Add a comment: