This morning I wanted to compare some of the Siboot code — which was modified from the original SWAT code — with that original SWAT code. So in Eclipse I popped open the SWAT directory, then the source code directory, and so on down to the individual Java files. Except they weren’t there! For some reason, Eclipse couldn’t find any of the source code files!
Not to worry — I’ve got backups. Unfortunately, my standard backups didn’t go far enough back to store SWAT from 2008. Again, no problem — I’ll just pull up one of the old hard disks I keep for exactly this purpose. But neither hard drive would mount! Whut the hay-ell! Now I was getting rattled.
So I searched for my DVD backup. That couldn’t fail. But it wasn’t in the usual place. I was starting to sweat. Had I lost all that code? This was a catastrophe! After much searching, I found it in the new place I had set up for all my important backups. With a sigh of relief, I fired up the older Mac desktop (my iMac doesn’t have a DVD drive). I inserted the DVD into the drive and waited for it to mount… and waited… and waited.
This was odd, but not necessarily disastrous. DVDs seldom go bad. So I blew the dust out of the DVD drive with compressed air and carefully cleaned the DVD with radial, not circumferential, wipes. But again, it refused to mount!
Surely this is all just a misunderstanding, I thought. I grabbed another DVD and stuck it in. It wouldn’t mount, either. So my DVD drive was dead. Did I have any other DVD drives?
Well, yes, there is one on my ancient, obsolete, and crash-prone old Mac Pro laptop. There’s something wrong with the case; if you touch it anywhere around the touchpad, it locks up. But I have taped a piece of cardboard over that area and, using an external mouse, the thing can run. So I fired it up and stuck the DVD into the drive. This was my last chance.
Happily, the DVD mounted just fine. I quickly stuck a thumb drive into the USB port and transferred the files to it. Then I mounted the thumb drive into my new Mac and transferred the files there. I was saved.
But before I transferred the files into the Eclipse workspace, a thought occurred to me. So I went back to Eclipse, selected the SWAT project, and applied the menu option “Refresh”. Sure enough, the ‘missing’ files all appeared, right where they should be. I had been fooled by one of the design flaws in Eclipse.
So the restoration of the SWAT files was unnecessary. Nevertheless, it gave me a good scare and induced me to set aside that thumb drive as a backup.
This raises the question, “Why don’t I save these files onto the cloud?” That’s a permanent solution, and a good one because it’s permanent and accessible from anywhere. But I’m still leery of the cloud. Yes, it truly is secure if you use proper passwords. But for now I think I’ll give it some more time to mature.
My reason for wanting to look up the old SWAT code was to see if I could somehow resurrect the old Logger system designed by Facundo Dominguez. It is truly a brilliant piece of work, keeping track of every single significant action taken by the system, yet doing so in such a clever fashion that it does not require gigabytes of RAM. Instead, it recomputes the system up to the point being examine, then shows the results of that point. However, it is much too clever for me to grasp. I was hoping that I could just re-establish the linking into it, but it takes such a tortuous routen through the display code that I simply cannot follow it.
I definitely need to see what’s going on inside the engine. Just now I do this by attaching println statements that show the values of critical values, but this is done on an ad-hoc basis, and often requires several passes to get to the problem.
Another possibility is to simply print out everything that happens as it happens, either directly to the console or to a text file. I don’t need the full treatment that Facundo’s code provides.
Still not sure about how to handle this. I’ve got to do more exploring.