Author Topic: I wish CamBam had an autosave feature, instead of creating backup on each save  (Read 3704 times)

Offline sibianul

  • Wookie
  • ****
  • Posts: 276
    • View Profile
Hello guys, I haven't posted for a while, but today I decided to ask you guys something, as is the second time in a few years, when something is wrong with my UPS, and the PC turned off when the power was lost for a second or less, I will change the UPS anyway, but I never never used the .b1, .b2 or .b3 files that are generated when I save a cb file, I always delete them.

Isn't a better idea to have an option to autosave the file each x minutes ? I think this would be much more useful than the other backup feature that is already implemented (creating another file only when I manually save my project). I just lost a file I worked for more than an hour :(

Thank you.

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 2953
    • View Profile
I think this would be much more useful than the other backup feature that is already implemented.
************************
+1  :D
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1368
    • View Profile
Not me,
I am old and remember when you backed up like crazy because computers were really unreliable. Then they implemented autosave. You get interupted while working and you come back to find autosave has saved the experiment you were doing that you decided wasn’t going to work!  Never ask a computer to figure out what you want. I back up religously what I don’t want to use.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8314
    • View Profile
Gary, thank you!  I also hate auto-save, and faithfully back up what I want to save.  Auto-save tends to obliterate 'versions', when you're not happy with a mod.  When a package uses auto-save, you are forced to create new 'temporary versions', just for the sake of editing.  From my perspective, that's more work than simply remembering to do your job whenever you're happy with a change.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2341
    • View Profile
Lloyd, it depends on how autosave is implemented.
There are programs which create a 'working copy' of a file when it is opened. And do the autosave to that copy. Only when the user explicitly issues a 'File -> Save' command the new content is written under the real file name overwriting the old one.
Upon program exit the 'work copies' are deleted. If there is a power failure or unexpected computer reset the program checks upon start whether such 'work files' are present (not deleted = abnormal program end) and asks whether it should open them.
I therefore fully agree that if 'autosave' automatically overwrites the initially opened file it is not a good solution.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8314
    • View Profile
Fly,
If that were the scheme followed, I'd not be averse to it.  Too many of the softs I run overwrite the original file!

Yes, if only 'temp copies' were auto-saved, that would deal with both the OP's issues and mine.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
If the cb file has not been saved manually then the first autosave would be the 'real' file.

I have a plugin going with a system timer that can be set with 60 to 3600 seconds interval ( this can be changed as required)
There is a form to allow changing of the interval, what else is required to make the autosave useful ?

My thoughts;
1. specify a path to the autosave folder
if no path is specified, what should the default path be ?
2. append the word "autosave" to the cb filename
3. a checkbox to select between "overwrite previous save" or "add a new save file" at each autosave interval
4. if "add a new save file" was selected, append an incrementing number to the filename

I'm proposing we leave deleting of the autosave files to the user otherwise I can see a disaster ahead.
« Last Edit: January 16, 2019, 21:44:13 pm by EddyCurrent »
Made in England

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8314
    • View Profile
Only one question comes to mind right now, Eddy.

If the file has never been saved (as from 'new') how would autosave know what name to give it?

The rest (subject to further review) looks great!  Please, make it compatible with 0.9.8 as well as 1.0! <grin>

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
Only one question comes to mind right now, Eddy.

If the file has never been saved (as from 'new') how would autosave know what name to give it?

Lloyd

"Untitled-Autosave-01.cb", "Untitled-Autosave-02.cb", etc

Say you worked on a file and there were 4 autosaves. Next day you open the 'real' cb file, it looks like autosave needs to start on number 5

It's amazing (although by now I should know this is true, and hence not be amazed) how a simple idea turns into a complicated (complex ? ) task.
« Last Edit: January 16, 2019, 22:23:24 pm by EddyCurrent »
Made in England

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8314
    • View Profile
Yup!  Eddy, thank you for your skills and efforts!

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 3964
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Even on my fastest computer that I bought because I was tired of slow responses save puts all operation in limbo for a few moments on complex files.  On really complex files that can be a few seconds.  If you are working along and your program suddenly becomes unresponsive it can be quite disconcerting.  I often save CB files right before generating code and then have to wait a moment. 

I know how disconcerting those pauses can be.  ViaCAD has an auto save feature. It also pauses program operation during the save and on complex files that can be very noticeable when you are trying to do something and it suddenly stops working.  I wound up turning autosave off and try to just remember to save often when I am at a point to stop and admire my work. 

I am not arguing against an autosave function or even eventually an embedded autosave function.  I just think it needs to be selectable in the options. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 3964
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
In tune with me other post about failed code generation... I think a status bar with a bold message saying "BACK UP IN PROGRESS" would go a long way to mitigate the frustration that occurs when your program stops responding for a moment during an auto save.  

One needs to work out the file path issues of course.




« Last Edit: January 18, 2019, 22:08:37 pm by Bob La Londe »
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
The plugin should be ready tomorrow, just need to do further testing. Time for bed now.
A message appears in the bottom window indicating an AutoSave operation.
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6052
    • View Profile
    • Cambam V1.0 French Doc
Only one question comes to mind right now, Eddy.

If the file has never been saved (as from 'new') how would autosave know what name to give it?


Hello

Maybe in this case, the autosave can just ask for the filename, like with the save menu when filename not exist.

Quote
what else is required to make the autosave useful ?

An enable/disable option for the autosave.  ;D (the only soft where I use autosave is Word)

I don't remember on what soft (SolidWorks I think), but I have also seen an autosave that is not really "auto" ; it just remember to the user that the file as not been saved since xxx minutes.

++
David
« Last Edit: January 18, 2019, 23:26:29 pm by dh42 »

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2341
    • View Profile
One side note: When a new file "Untitled" has been created and not saved if I invoke code generation CamBam goes to the last folder where a .nc file has been created. (In my case I use a single common folder for code generation.) If I give a name and save the file CB goes to its folder for code generation.
I have stated before my wish to have a selectable common folder for code generation.