Bug Hunting

When you’ve been chasing a multi-threaded software / hardware interaction bug for three straight weeks (the sort of bug which is triggered perhaps only once every 3 days, which you’ve instrumented with asserts and port pin toggling so you can see what’s going on with an oscilloscope since your JTAG debugging tools are rather poor, and which you’ve eventually gotten to be reproducible within 30 seconds by rigging up a FET and signal generator to create the proper noise conditions) and you’ve finally convinced yourself that you understand exactly why the problem is happening (your theory explains all of the weird behaviors you’ve seen over the last three weeks, after all), and you implement a solution and it seems to solve the observed issue only to uncover another even less explainable issue… well, let’s just say you’d probably be ready for the weekend too.