Maybe I'm not using the best programming practices in Mathematica, but my notebooks usually contain a mixture of "definitions" and "computations" with these definitions. Say,
f[x_] := x^2 (* Definition *) f (* Computation *) g[x_] := f[x] - 1/f[x] (* Definition *) g (* Computation *)
Then each time I open the notebook anew, to ensure that all definitions are in place the easiest way is to evaluate everything. But some computations can be costly, and I do not need their results.
So, is there a way to only evaluate "definitions" or assignments in the notebook, and omit the "computations"? In the code sample above only 1st and 3rd lines must be evaluated, while
g must be ignored.
Or, if the question does not make much sense, what would be good solution to the described problem? Keeping assignments and computations separately does not make much sense to me, commenting out all the computations make notebook look weird and if I do need them some time later, I'll have to do a lot of typographic work removing them.