Freigeben über


Silence and dreams

This will be the only update this week because I am on holiday - actually, I am taking a break from debugging stuff to work on writing fiction.

I was going to write something from home but the video card on my home PC is very, very unwell so I have popped in to the office briefly to collect my offsite backups. I got in to the habit of keeping copies of ongoing stories after a burglary a few years back. They stole my PC which was not something that I was happy about but they also took my backups so 3 years work was gone in a flash. That wasn't a good day.

Since I have your attention, I thought that I would share with you the strangest debugging experience that I ever had. This was long before I worked for Microsoft. I had been working on a very complex embedded system. It was running on a system designed to test electronic components. The system shared a custom designed bus between 3 separate incompatible processors. It was the only system that I have ever worked on where the software had to allow for speed of light delays between various parts of the hardware. Anyway, there were multiple quasi-autonomous subsystems and they communicated via software implemented queues. I had been pushing pretty hard on the project because it was in the "Deathmarch" stage and we were one step ahead of being closed down by the bank. This is what happened to the company in the end but we were all doing what we could to avoid the inevitable. We had a problem where the system state was always correct under controlled conditions but where we started to see the wrong voltages and measurements when the system was used with live data. Since the system was entirely custom and headless (no UI!), we had no debugging tools to speak of.

I had been living and breathing this architecture for about 11 months and one night, I got home after a very long session of trying to figure out what was wrong. I had a beer or two and headed for bed. That night, I had the oddest dream. I was a packet of data in the system! I was racing along the buses and changing form as the various subsystems altered me. I visualised the queues between the subsystems as big pipes like an outside hamster habitat or very like some of the escalators at Charles De Gaulle airport if you have ever been there. Most of the pipes were stable but one of the pipes wobbled and it was possible to fall out when it moved. I fell (data packets are apparently heavy) and woke when I hit the floor.

After such an odd dream, I rushed in to work even though it was still the night and started looking at the code. Each queue was synchronised to its owner. However, the queue code had been crafted using a RAD technique known as copy and paste with subsequent edits. One of the edits had been missed and the queue was synchronised with the wrong subsystem in that area. When the system was asked to do a single thing, the other system was idle so the queue stayed in the right state. When the system was used for real, the queue could change state while there was a packet in the queue.

 

Sometimes dreams are just dreams. Sometimes they are messages from you to you. I don’t suggest that you try dreaming up solutions to your problems but solutions can come from strange places

Signing off until next week

Mark

Comments

  • Anonymous
    October 02, 2005
    Now, where's that book by Freud that I had lying around :->.

    You're right, sometimes dreams are wierd and solutions come from wierd places. Nice creative solution though.
  • Anonymous
    October 05, 2005
    I used to dream about code a great deal when I was a Dev. I suppose that is a clue that I shouldn't have been coding 18 hours a day.

    Glad that you are enjoying the blog

    Mark