How do you identify and correct the smell of code:
I have a small scientific computing application that I am writing to be able to handle many variations of the same topic. His internal works are well taken into account, mainly using the template method template and some functions of a higher order. However, indicating how all these classes and functions should be created and used and with what parameters in any given program start is so difficult that I sometimes think that the easiest way to do this is to rewrite main () for each start and recompile it.
Is there a relatively simple and easy way to manage configuration that does not overwhelm a small scientific application? Basically, I just used command line switches and they get pretty bulky.
Edit: The application is small enough that the build time is negligible. I see a slight advantage in binding to the scripting language by simply changing the code in my native language. (The application is written in the programming language D.)
Edit # 2: I was thinking about the idea of a configuration file, and that would help, but I feel that writing a configuration file would be almost as complicated as rewriting main () every time.
design-patterns configuration code-smell scientific-computing
dsimcha
source share