jducoeur: (Default)
[personal profile] jducoeur
One of the basic rules of debugging: before ripping your hair out trying to figure why that method isn't doing anything, first check whether anything is actually *calling* it...

I'm reminded of a tale...

Date: 2009-02-07 03:03 pm (UTC)
From: [identity profile] hudebnik.livejournal.com
When I was in college, I spent several hours trying to figure out why a particular function wasn't doing its job. I put "print" statements at the beginning and end of the function, and they didn't print. I put "print" statements just before and after the call, and they didn't print. I moved the "print" statements farther afield before and after the call. It turned out that there was a "/* ... */" comment several lines earlier, and the close of the comment was in character positions 74-75 of the line. No big deal, except that the compiler had originally been written in a punch-card world in which character positions 73-80 were reserved for serialization numbers, so the compiler ignored them and commented out the next twelve lines or so of source code.

Been there, done that...

Date: 2009-02-07 04:43 pm (UTC)
From: [identity profile] malvinareynolds.livejournal.com
...and Richard found the debug message that was never going to get called. That was more than a quarter century ago, but the feeling of embarrassment is still with me.

Not sure what that says...

Profile

jducoeur: (Default)
jducoeur

June 2025

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags