Before now, I thought that reusable module's variety depends on many things. In other words, I thought that too much variety might not be good design. By the way, that thought have changed a little.
For example, I implemented GridLayout function which generates new grid layout. In camera mode, it should made different layout compared with normal mode. My GridLayout function has variety which enables to provide different layouts according to situation. By the way, the function has too complex because it contains many switch statements so when debugging, I took so many time. Finally, I decided to separate each logic. As there are same logic, I made common logic as super class. That was fine.
But I think now that that idea had problem. Of course, someone say the code logic becomes simpler than before. But the module's variety was removed and the another code area should be in charge of that.
So, I recovered that logic to the original code.
My trying took about over two hours and failed. But I think that was a good trying.
'잡담' 카테고리의 다른 글
nowadays' concern (0) | 2013.08.02 |
---|---|
debugging and refactoring (0) | 2013.07.30 |
code complexity and debugging (0) | 2013.07.25 |
as for algorithm programming (0) | 2013.06.21 |
호시우보(虎視牛步) (0) | 2013.06.12 |