It is often the case sometimes we write some functions that turns out to be handy and we would like to reuse them later. My current solution is to keep them in a single notebook and copy them to every project. Clearly this is bad for version control. I also thought about using package but every time you want to make some change you have to dig into the package folder and reload everything. I'd appreciate any idea on this, thanks.
Modified 3 years, 10 months ago
Viewed 91 times
NotebookEvaluate[...path...]it's almost like using a package with a little less overhead, and slightly easier than copying the code. I use that for a few odds and ends I don't feel the need to write into a package. Though this is a practice, I think calling it "best practice" would be a stretch :) $\endgroup$
Get. Best practice is definitely just making a package out of it. $\endgroup$
LocalObjectto do this, although the exact incantation escapes me at the moment. Then you can do
ResourceFunction["myfunc"]and use your function anywhere locally. $\endgroup$
ResourceFunctionfor that - you can just use