You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding additional features to the toolbox seems to become more and more difficult because there is often a need to change the code in many different places. There are mainly two reasons for the latter:
Some pieces of code are repeated a bit everywhere within and also across functions. (e.g., the 2 functions swe_cp and swe_cp_WB contains a lot of code in common that is also repeated several times within functions)
Some functions are tightly coupled with other functions (e.g., the results of clicking on some buttons in the result display involve several functions in the code and modifying one behaviour obliges us to potentially change all of these functions; recently, I found and fixed some bugs for some buttons that, I believe, were likely introduced because some of these functions were not changed in parallel with others)
Also, each time we were adding new features, a lot of functions had increased in size, making harder and harder to maintain them.
Therefore, it seems important to try to refactor the code, at least some parts of it. I would like to do that by splitting the code into more (smaller) functions with fewer responsibilities. To be able to do that confidently, it seems important to first refactor the tests to cover more complex scenarios than those currently implemented. I would also like to make the tests quicker to run, which makes sense if we want to add more tests. I believe that this can be easily achieved by using "smaller brains" composed of fewer voxels for the tests.
The main issue with this refactoring is that this will be quite time-consuming. Nevertheless, this should also help to make any future changes easier to implement. A trade-off would be to focus on refactoring as the implementation of new features progresses to make the code cleaner and cleaner with time.
Adding additional features to the toolbox seems to become more and more difficult because there is often a need to change the code in many different places. There are mainly two reasons for the latter:
Also, each time we were adding new features, a lot of functions had increased in size, making harder and harder to maintain them.
Therefore, it seems important to try to refactor the code, at least some parts of it. I would like to do that by splitting the code into more (smaller) functions with fewer responsibilities. To be able to do that confidently, it seems important to first refactor the tests to cover more complex scenarios than those currently implemented. I would also like to make the tests quicker to run, which makes sense if we want to add more tests. I believe that this can be easily achieved by using "smaller brains" composed of fewer voxels for the tests.
The main issue with this refactoring is that this will be quite time-consuming. Nevertheless, this should also help to make any future changes easier to implement. A trade-off would be to focus on refactoring as the implementation of new features progresses to make the code cleaner and cleaner with time.
@nicholst, can I have your opinion about this?
The text was updated successfully, but these errors were encountered: