Cycle 4, stage 4, day 29:
Beside the nasty bug that I have mentioned in my last entry... Searching its cause made me find another bug. Today, I have returned to improve my strategy decorator. I had a new improvement in mind but how to do it was boggling my mind... I did put in place a simple decorator system to decorate the order strategies to add some temporary functionality to them...
The new functionality was to be applied to a sequence of strategies... My initial approach I had was to create a new strategy class which would have been the concatenation of all the strategies in the sequence with a finite state machine that dispatch its calls to the right substrategy. It was a complex mess...
I got a ah ah moment where I have figured out that if only my decoration system could:
Stack several decorators
Transfer the decorators when the strategy is replaced to the new one,
this would allow me to only write a new decorator instead of creating a complex mess... I did this today and I am quite satisfied of the result!
However, upon restarting my server, the little devil started to crash... I found another problem. My fault... I must have introduced this bug last week during some refactoring that I did for my new alpha model... The bug needed some very special conditions to show up which did happen this afternoon....
The core dump was making little sense because of optimization.... I have finally figured out what was the problem and I did fix it. As I am writing this entry the system is priming up and should start working in few minutes...
To summarize. 3 bugs fixed and a new feature has been added... Not bad!
Beside the nasty bug that I have mentioned in my last entry... Searching its cause made me find another bug. Today, I have returned to improve my strategy decorator. I had a new improvement in mind but how to do it was boggling my mind... I did put in place a simple decorator system to decorate the order strategies to add some temporary functionality to them...
The new functionality was to be applied to a sequence of strategies... My initial approach I had was to create a new strategy class which would have been the concatenation of all the strategies in the sequence with a finite state machine that dispatch its calls to the right substrategy. It was a complex mess...
I got a ah ah moment where I have figured out that if only my decoration system could:
Stack several decorators
Transfer the decorators when the strategy is replaced to the new one,
this would allow me to only write a new decorator instead of creating a complex mess... I did this today and I am quite satisfied of the result!
However, upon restarting my server, the little devil started to crash... I found another problem. My fault... I must have introduced this bug last week during some refactoring that I did for my new alpha model... The bug needed some very special conditions to show up which did happen this afternoon....
The core dump was making little sense because of optimization.... I have finally figured out what was the problem and I did fix it. As I am writing this entry the system is priming up and should start working in few minutes...
To summarize. 3 bugs fixed and a new feature has been added... Not bad!