Matching Numbers; Fixing Bugs in Greek Engine (cont.)
Today I was able to really get some good data for the comparison of my Greek Engine and the legacy tools and things are really lining up. The problems that remain are really in the area of how to handle pre-open quotes and trades, and how to handle the close. I've been through this all before, and I knew it'd be tricky. It's not horrible, it's just methodical. You have to look what the legacy code is doing, and then try to emulate that in your code with some eye towards the future. Just takes time.
At the same time, I found a few really amazing bugs in the code. Things I should have seen a lot earlier, but were looking right over far too many times. One is the extraction of the symbol name from the SecurityID - a 128-bit number that packs a lot of information about the instrument in those 128 bits. An uninitialized SecurityID will appear to be a stock with a symbol name of no length. I was treating that as an error rather than dealing with it and returning an 'empty' name.
But even more amazing is that the error I was trying to log had a hex dump method that didn't support empty data sets. This, coupled with the fact that I was trying to convert the SecurityID to a (uint8_t *) and the compiler was turning it into a std::string, with zero length, and it was just a mess. I had to fix the hex dump code, the symbol extraction, and things started acting much better.
Days like this are really pretty nice. I get a lot of things done, they all impact the bottom line of user experience, and it's nice to get a lot of "things" done. Good day.