|Sometimes, I'm almost smart
||[May. 23rd, 2006|01:05 pm]
Yesterday, I was working on a bug in my code where the simulator module was getting stuck, reliably, if I ran it with a particular seed for the random number generator. Tracking down bugs in your own code always makes you feel dumb, because not only do you know you made a mistake, you don't understand what the mistake was while you're trying to find it.
At the end of the day, I had figured out what was wrong (which made me feel smart) and wrote a fix for it. But then I tested it and it was behaving weirdly in a different way, so I said to heck with it (feeling vaguely dumb again) because it was time to go home, and I resolved to fix it today. At worst, I could hack sideways around it.
I got in this morning and looked more closely at the output that the program was generating, and I realized that, hey, my fix did work! It was just continuing on past the point where it was getting stuck, so I was looking at the wrong output yesterday, and if I went back further, lo and behold, it was all correct now! Hooray, I'm smart again! So I tided up and committed the changes and set the simulator running through its little loops while I did other things.
Just now, I got back from lunch and checked in on the output from the simulator -- and it had gotten stuck in the exact same place! WTF?
...And then I realized that, while my fix had, indeed, solved the problem, it doesn't do any good if you're still using the old version of the program!
Back to dumb. I copied the new version of the program over to my simulation directory, and I'm eagerly waiting for the simulator to get past seed number 10219 so I can feel smart again.
UPDATE: 10222! Yay, I can be smart again!