Fixing a bug

JimKasson

Community Leader
Forum Moderator
Messages
52,283
Solutions
52
Reaction score
59,064
Location
Monterey, CA, US
For the last month, I've been trying to fix a bug in some code I'm using that I wrote about a dozen years ago without success. I've been creating workarounds in the absence of a real fix. Night before last, I woke up about two with what I thought was the answer. The code was fine, but a configuration parameter was set to a default value that had undesirable side effects in some circumstances. Turning that function off fixed things.

7aeab9e9c1444493bbeff8232a4dff8c.jpg

7ff8a406ad1e4681b309015ce939515a.jpg

The offending parameter, with comments added to identify the problem. Programming is a conversation with the computer, and also with your future self.
The offending parameter, with comments added to identify the problem. Programming is a conversation with the computer, and also with your future self.

--
https://blog.kasson.com
 

Attachments

  • 33e98c7e0d784fb89ce506e3c1993dd8.jpg
    33e98c7e0d784fb89ce506e3c1993dd8.jpg
    1.5 MB · Views: 0
Last edited:
very, very cool, Jim.

I wake up a lot in the middle of the night and scribble furiously on a pad I always keep by our bed about whatever book I'm writing at the time. In the morning, sometimes when I read it, I'll think: wow, that's the key to the argument. Most times, however, I'll say: what a bunch of crap!
 
I'd tell you which one I like better but with my luck it might turn out to be the "before the fix", failed one. :-) These are visually arresting, I feel like I'm flying over some exotic forest.

Am I to understand that those images can be created with merely 13 lines of code? Please tell me that's just one function out of a much larger body of code.
 
I'd tell you which one I like better but with my luck it might turn out to be the "before the fix", failed one. :-)
They are both after the fix.
These are visually arresting, I feel like I'm flying over some exotic forest.

Am I to understand that those images can be created with merely 13 lines of code? Please tell me that's just one function out of a much larger body of code.
There are about 5000 lines of code involved in this processing. I posted only the properties for one of the classes.
 

Keyboard shortcuts

Back
Top