Wednesday, June 16, 2004

Unclosed Tuples
Finding that final unclosed tuples took longer than expected. I should re-read The Mythical Man-Month.

I needed to insert a LOT of logging before I found the missing close statement. I finally found it in the loop that performs subqueries. Subqueries use a tuples as a GIVEN clause for the query, and then take the tuples resulting from that query as the given clause to the next subquery. This continues until there are no more subqueries or the tuples has no elements in it. The final value of the tuples is then the final result to be returned.

The structure of the format for this code misled me into thinking that the tuples would be closed because it was returned. However, I missed the fact that a tuples object was abandoned in every iteration of the loop. This happened when the reference to the tuples was set to the result of the next subquery. Once this was fixed I was able to perform all of my queries with no warnings. There is one more query I should probably do in the morning, but I believe that this won't be testing any new code paths.

Statement Walks
AN had some trouble with the walk statement today. His code is based on my trans code, so he asked me to help for a bit.

I started out by describing some of what I had intended when I wrote the code, as the expression of these ideas may not have been very clear when read in Java. This may not have been as useful for AN as it was for me. It's often difficult to remember exactly what you were doing several weeks ago. I think I got it right on about the fifth attempt. :-)

Most of AN's code was fine, and I think that most of his problem was just due to staring at it for too long (yes AN, I did believe your excuse... this time). He had just started the walk from the wrong place. He also had a pair of column names in the wrong order for some query types. These were both easy fixes, and it wasn't long before his code was working fine and I was abandoned to my itinerant Tuples again.

Witty Worm
Today's Crypto-Gram has an interesting story about the Witty Worm. I've been hearing lots of things said about worms over the years, including the fact that they are always poorly written, that they do not usually spread efficiently, and the ones which are any good are normally not malicious. Witty adheres to none of this. It was just fortunate that it only worked on a BlackICE/RealSecure vulnerability, and not on the myriad vulnerabilities found in most Windows servers.

If this is a taste of things to come, then it's scary. Maybe it will force Microsoft to make sure Windows boxes are more secure, but I'm skeptical. I'm glad I run much more secure systems, but we all suffer from internet slowdown when the majority of Windows computers get infected with something virulent.

No comments: