Cycle 4, stage 2, day 9:
I am not sure if it is good or bad but I have started refactoring a new major component of my system.
It became so huge that it became hard to make changes in it and to understand everything that it was doing. I am not sure if it is my subconscious mind that is making me drift or I am on something but I decided to take care of it now.
That is the type of work that I consider painful but OTOH, the result is always very satisfying at the same time. I have already extracted 1,500 lines of code that I have placed into new sub modules...
Creating sub modules is like having small building blocks that allows you kinda play with lego blocks. Once you have those building blocks you can more easily reorganize them and reuse them... It also helps to encapsulate complexity... Instead of having a big monolitic blob in front of you, you have bigger functional blocks interacting together. It helps to hide away all the small details and provide a bigger picture in a way that your understanding of how things work goes to the next level.
For one thing, it forces me to review the code and to regain understanding of it. Sometimes it takes me some time before figuring out what was the point of something that I did. This is good because it is an indication that the documentation was deficient. Once I figure out what the code was doing, I write a small comment so that that unpleasant situation never occur again.
I am also catching a bunch of small bugs...
that being said, I must have spent possibly the last 4 days in this effort. It is much more than I was expecting...
In parallel to that effort, the system did continue to run... It did run fine with no issue since 2 days. Once in a while small glitches manifest themselves... I must have fixed 2 of them in the last hours...
So all in all, things are moving in the right direction. It is just my usual complain that things aren't moving as fast as I wish they would...
I am planning to upgrade my system later tonight... Beside few fixes, there is no new functionality but I feel important to test all the refactoring that I have done... It is bit scary to make major refactoring without validating that the code still work fine...
I am not sure if it is good or bad but I have started refactoring a new major component of my system.
It became so huge that it became hard to make changes in it and to understand everything that it was doing. I am not sure if it is my subconscious mind that is making me drift or I am on something but I decided to take care of it now.
That is the type of work that I consider painful but OTOH, the result is always very satisfying at the same time. I have already extracted 1,500 lines of code that I have placed into new sub modules...
Creating sub modules is like having small building blocks that allows you kinda play with lego blocks. Once you have those building blocks you can more easily reorganize them and reuse them... It also helps to encapsulate complexity... Instead of having a big monolitic blob in front of you, you have bigger functional blocks interacting together. It helps to hide away all the small details and provide a bigger picture in a way that your understanding of how things work goes to the next level.
For one thing, it forces me to review the code and to regain understanding of it. Sometimes it takes me some time before figuring out what was the point of something that I did. This is good because it is an indication that the documentation was deficient. Once I figure out what the code was doing, I write a small comment so that that unpleasant situation never occur again.
I am also catching a bunch of small bugs...
that being said, I must have spent possibly the last 4 days in this effort. It is much more than I was expecting...
In parallel to that effort, the system did continue to run... It did run fine with no issue since 2 days. Once in a while small glitches manifest themselves... I must have fixed 2 of them in the last hours...
So all in all, things are moving in the right direction. It is just my usual complain that things aren't moving as fast as I wish they would...
I am planning to upgrade my system later tonight... Beside few fixes, there is no new functionality but I feel important to test all the refactoring that I have done... It is bit scary to make major refactoring without validating that the code still work fine...