Cycle 12, day #3:
As I was working toward completing my Order class refactoring. I got interrupted by a faulty trade generated by my system.
It was caused not really by a bug on my side. This time, it appears to be an exchange malfunction. This did give me the opportunity to add some protection on my side and therefore make my system more robust.
Update:
I did also improve my TradeBook class robustness... It was taking a shortcut by presuming that a book couldn't be empty.
Update #2:
Refactoring is done. It did move out roughly half of the code from the Order class. In terms of functionality, it is more or less the same but the benefit is that it provides a more robust foundation that can be built upon it.
but I am curious about the Tradebook fix effect. It was a nasty bug hard to catch because silent and it could be a factor for having not much trading opportunities detected. Once a pair was in the dreaded state, it was stuck in that bad state until the next reboot. If the server is running for a week non-stop. The odds of stumbling into the problem and that it was unnoticed, is non-negligeable...
Overall, it was a good productive day today...
As I was working toward completing my Order class refactoring. I got interrupted by a faulty trade generated by my system.
It was caused not really by a bug on my side. This time, it appears to be an exchange malfunction. This did give me the opportunity to add some protection on my side and therefore make my system more robust.
Update:
I did also improve my TradeBook class robustness... It was taking a shortcut by presuming that a book couldn't be empty.
Update #2:
Refactoring is done. It did move out roughly half of the code from the Order class. In terms of functionality, it is more or less the same but the benefit is that it provides a more robust foundation that can be built upon it.
but I am curious about the Tradebook fix effect. It was a nasty bug hard to catch because silent and it could be a factor for having not much trading opportunities detected. Once a pair was in the dreaded state, it was stuck in that bad state until the next reboot. If the server is running for a week non-stop. The odds of stumbling into the problem and that it was unnoticed, is non-negligeable...
Overall, it was a good productive day today...