Design Pattern
I got one feature request recently in work.
This is one command feature. Previously we already have several function to do the work, but we need to utilize those function to support another new command.
Because previously functions are for only one command, thus not much structure flexibility. And because I have not enough experience in this feature, I prefer to get the thing done in the ugly way and try to earn more time for refactoring later.
This lead to one question. How much effort we need to put into decide a good structure before start solving the problem? We all want to get the thing done first, but once the thing is done, there may have not much time to perform refactoring.
But the problem is, due to tight deadline, we may prefer fast solution other than perfect solution. And there exist no perfect solution, a.k.a. no silver bullet.
I have cough yesterday. And when I went to doctor, I told him that I got cough and want some suggestion. He said he will give me some pill, but the best way is to get more exercise other than take the pill.
Yeh, I always know that there exist no silver bullet, no matter which part of life. We just look for it all the time and want to find a better solution.
Because I believe in practical way, so I think I will try my best to get the thing done and quick review to see what pattern is good for me to use in refactoring.
Hope everything works fine. No matter which solution I use.
- Kala Kuo