When I write small projects in Mathematica, I run into such problem: I know ways to implement the functionality of small parts, but having problem selecting the most Mathematica-style way to group them together, to be specific, it may concern the efficiency/connivence/convention about the styles. However, these question may fall into "too broad", "too localized", "opinion based" etc, that's why I'm asking.
For example, I am developing a program that analysis a large set of data, some possible questions about design could be:
Should I load the large data into a global variable, or make an object to access like
Should some settings about analysis written and initialized first at the beginning at the notebook, or make them options for specific function?
Should I use a traditional algorithm, or use an one-line pattern matching to do some operations?
Should I make all the code inside
.mfile, or leave some certain code in the
To what extent should I preprocess my data (preprocess takes more time/memory in advance while process at function results in redundant calculations)?
(Of course I will describe questions more clearly in practice.)
My past attempts are "ask an approach I don't know how to write, and hopefully someone will suggest another method", and a successful example is: How to prevent substitution in a part of an expression? ,where Leonid gave me both. I imagine if I asked "what is generally a good way to write a parser for scheme in Mathematica?", and it will be closed. But I believe if I present the brief description of whole project, it's easy for others to get my intention.