Showing posts with label cats. Show all posts
Showing posts with label cats. Show all posts

Sunday, February 5, 2012

Alive and Well

I got an email recently from a fan who was worried because I hadn't posted anything about Solitaire Till Dawn for a while. I did warn y'all that it would take some time! And that's still true, unfortunately. But I am still working on it.

I haven't posted because I got stalled for a while. Part of that was just the holidays: traveling, visiting family, and doing Christmas stuff. Part of it was the sad loss of our old and well-loved family cat Freddy, and the subsequent addition of a young mom-cat and two kittens to our household. The new kitties are all sweeties, but they kind of turned the place upside-down for a while.

But the biggest delay was that I got stuck on a nasty bug, something I had to fix before I could move on. There was no progress to report: I've spent the last two or three weeks banging my forehead against my monitor, trying to figure out what was causing the bug and how to fix it. I finally nailed it today, or so I hope. Without going into mind-numbing detail, I'll just say that it was a multi-threading concurrency problem triggered by an intermittent race condition.

That sort of thing can be very difficult to track down, for two reasons. First, it's not trivially repeatable: it depends on subtle timing issues, and you might work the program for quite a while before seeing it happen. It's like that funny noise your car makes whenever you drive it, but never when it's in the shop. And that's why I had to say "I hope" above. I played hours of solitaire today after installing my fix and didn't see the bug again. So I think I got it, but it's still possible that it's just being coy and will re-surface later on.

The second reason it's difficult is that this is a class of problem that a friend of mine calls a "Heisenbug", because any attempt to debug it can make it change behavior or vanish altogether (only to reappear when you stop debugging, of course). But I have to admit that in this case, my problem was the opposite: nothing I tried seemed to affect the bug, until today.

But I got it. (I think.) And that means that I've now tested all the games alphabetically up through Manx. So that's progress, right?