Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1549 > unrolled thread
| Started by | Jason Quinn <jason.lee.quinn@gmail.com> |
|---|---|
| First post | 2011-04-09 11:11 +0000 |
| Last post | 2011-04-11 11:06 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Managing your notebooks Jason Quinn <jason.lee.quinn@gmail.com> - 2011-04-09 11:11 +0000
Re: Managing your notebooks David Bailey <dave@removedbailey.co.uk> - 2011-04-09 22:00 +0000
Re: Managing your notebooks ADL <alberto.dilullo@tiscali.it> - 2011-04-11 11:06 +0000
| From | Jason Quinn <jason.lee.quinn@gmail.com> |
|---|---|
| Date | 2011-04-09 11:11 +0000 |
| Subject | Managing your notebooks |
| Message-ID | <inpesv$8tp$1@smc.vnet.net> |
I was curious if anybody would be willing to share there strategy for managing their Mathematica notebook versions. In my experience, Mathematica notebooks are "fragile" because running the code is not cleanly separated from using the code. Notebooks indicate modification after a cell is run even if no changes to the code were made. In practice, after using a notebook for a while, it's easy to forget if changes were actually made that you would want to keep, so when you are prompted to save a notebook, you are left with a dilemma. Staying safe, you save again and again which leads to a proliferation of versions. I am aware you can make cells edit protected but this doesn't solve the problem. I also know about the "Notebook history" feature, which seems to be of very limited value. I always end up with so many "versions" of my notebooks that I forget what the differences between them are. I can't help but feel that I'm missing something. I have no problems managing compiled code or interpreted scripts but notebooks are much more challenging. Is this something you experience as well. Have you too noticed extra difficulty managing your mathematica notebooks? Comments? Suggestions? Jason
[toc] | [next] | [standalone]
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Date | 2011-04-09 22:00 +0000 |
| Message-ID | <inqkte$e7c$1@smc.vnet.net> |
| In reply to | #1549 |
On 09/04/2011 12:11, Jason Quinn wrote: > I was curious if anybody would be willing to share there strategy for > managing their Mathematica notebook versions. > > In my experience, Mathematica notebooks are "fragile" because running > the code is not cleanly separated from using the code. Notebooks > indicate modification after a cell is run even if no changes to the > code were made. In practice, after using a notebook for a while, it's > easy to forget if changes were actually made that you would want to > keep, so when you are prompted to save a notebook, you are left with a > dilemma. Staying safe, you save again and again which leads to a > proliferation of versions. > > I am aware you can make cells edit protected but this doesn't solve > the problem. I also know about the "Notebook history" feature, which > seems to be of very limited value. I always end up with so many > "versions" of my notebooks that I forget what the differences between > them are. > > I can't help but feel that I'm missing something. I have no problems > managing compiled code or interpreted scripts but notebooks are much > more challenging. Is this something you experience as well. Have you > too noticed extra difficulty managing your mathematica notebooks? > > Comments? Suggestions? > Jason > I develop code mostly in package (.m) files. These can be formatted very much like notebooks (but with a few restrictions) - they can contain headings, and text cells - all encoded as comments in the .m file on disk. You can execute cells in a .m file, and obtain output cells, which are not stored to disk, so the front end does not consider such files to be modified each time something is executed. If I really want to save some output, I use a notebook. I normally back up fairly frequently, and I have a command, outside of Mathematica that will copy a file to a special location with a unique index number. Thus, when I need to save a .m file, I simply overwrite what is there already, safe in the knowledge that I can't do much damage even in the worst case! David Bailey http://www.dbaileyconsultancy.co.uk
[toc] | [prev] | [next] | [standalone]
| From | ADL <alberto.dilullo@tiscali.it> |
|---|---|
| Date | 2011-04-11 11:06 +0000 |
| Message-ID | <inunb1$2c6$1@smc.vnet.net> |
| In reply to | #1549 |
On 9 Apr, 13:11, Jason Quinn <jason.lee.qu...@gmail.com> wrote: > I was curious if anybody would be willing to share there strategy for > managing their Mathematica notebook versions. > > In my experience, Mathematica notebooks are "fragile" because running > the code is not cleanly separated from using the code. Notebooks > indicate modification after a cell is run even if no changes to the > code were made. In practice, after using a notebook for a while, it's > easy to forget if changes were actually made that you would want to > keep, so when you are prompted to save a notebook, you are left with a > dilemma. Staying safe, you save again and again which leads to a > proliferation of versions. > > I am aware you can make cells edit protected but this doesn't solve > the problem. I also know about the "Notebook history" feature, which > seems to be of very limited value. I always end up with so many > "versions" of my notebooks that I forget what the differences between > them are. > > I can't help but feel that I'm missing something. I have no problems > managing compiled code or interpreted scripts but notebooks are much > more challenging. Is this something you experience as well. Have you > too noticed extra difficulty managing your mathematica notebooks? > > Comments? Suggestions? > Jason For versioning .m files, I easily developed a GET function (similar to the Get one), which operates like this: GET[file] looks for any file (in my paths) of the form "file-nnn.m", where the n are numbers, and loads the one with the highest number. In this way, while saving my file versions, I simply add a progressive number to the file and I'm sure to automatically load (or reload) only the last one. If I am not happy, I delete the last and get automatically back to the previous. The same concept may be used to change directory. ADL
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web