I can take a little solace in that my family has never dumped an animal off at a shelter at least. And now I feel pretty petty for coming to post this, but I will anyway.
I made an extremely amateur mistake last week while coding up a profiler for this DSP. So, while I knew the unoptimized version of this code was taking about 290 million cycles to complete, I was misled to believe that I had reduced that time to about 8.5 million cycles. An astronomical improvement, which was plausible given the changes I made (caching intermediate results in a very fast SRAM instead of writing them back to external memory every time).
Yes, well, I discovered my mistake today. Instead of reducing the running time by a factor of 34x, I actually increased the running time by about 5%. How was I so grossly misled?
An uninitialized counter at the start of the profiling code. It just happened to pick a number that looked plausible. Oh, no, normally when you do this you get something like -199 (negative time makes no sense), or an extremely high value that's absurd, or an extremely tiny value that's likewise nonsense. Nope, this time, it picked a number that looked like it might be okay, but it wasn't. The code runs inside a debugger and so fast that I can't tell the difference between 0.008 and 0.29 seconds, so I intuitively had no idea it was wrong.
Now, normally I'd just be frustrated and conclude that my optimization attempt was a bust and try something else. Oh, but I already told my research advisor I got those numbers, and he may have already sent them as part of a proposal for a grant. So, my extremely amateur mistake may have falsified data (unknowingly at least), my advisor thinks I'm a god at this stuff, and I'm back to square one. After weeks of fighting this thing.
Well, okay, that's pretty annoying. But, to put the icing on the cake, I was supposed to meet with my advisor at 3:15 this afternoon. As usual, he's nowhere to be seen. I can't remember the last time we scheduled a meeting and it actually happened remotely close to when it was supposed to.
So I guess he'll just get the bad news in an email, and I get to walk back home swearing to myself for making such a stupid mistake and not being anywhere closer to getting a publication or finishing my Ph.D.
I've known for a while now why something like 80% of students drop out of the Ph.D program, but I still don't like being reminded of why.