3

Story time!

I spend few hours last Friday debugging piece of code I wrote. It was based on working code, also authored by me. It was stuff for sending some data to transmitter, all in Python, nothing horrible or tough.

I wasn't able to understand, why older piece of code works (e.g. data are transmitted) and newer don't even when function bodies were same (I was desperate, so I copied-pasted my own working function there). Both function were in same file, bot syntactically correct, newer one was definitely running but still no transmigration from there.

And then it came, enlightenment at Friday afternoon. I forgot to actually push my prepared packet to radio. Older one was encapsulated in transmitter function and newer one wasn't. I was so focused on possible error in packet creation I forgot to send it?! Seriously?! Unfortunately yes.

Moral of the story? When debugging something, try step back (or up in my case) for a while.

Comments
Add Comment