Why I’m Not A Developer
I spent over a hour today trying to debug a piece of code I’m writing in Perl (used via Asterisk’s nifty AGI interface), and I couldn’t figure out for the life of me why a certain function call was being made. It was being executed as part of a while loop, and it kept going one increment past my exit condition. And then it hit me: I was calling the function as part of a logical AND statement that formed the conditional for the loop. And it just so happened to be the first portion of the AND conditional, so simply swapping places allowed what was the second conditional to short circuit the AND statement once the exit condition was reached.
And that is why I never want programming to be my full time job. I’ll take troubleshooting crashing daemons and quirky IOS configuration issues over this kind of thing any day.