I suggest you ...

(IDE) Keep backup copies of story file.

4 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    HappyDogHappyDog shared this idea  ·   ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • HappyDogHappyDog commented  · 

        Of course, in the case that I report in my description of the problem, I could have used 'undo' to get back to the previous version.... if I hadn't closed the IDE already (not realising I had overwritten my story file).

        The 'saving constantly and invisible' methodology is absolutely awful if it means the original file is overwritten silently. I will very often open a file (in all kinds of applications, not just Inform) have a tinker, and then close without saving (for various reasons). If the original file were to be modified during this session, then it would be an absolute disaster!

        If, on the other hand, you mean the application stores intermediate backups in a separate file (to guard against crashing - a la Microsoft Word) but only overwrites the original (discarding the intermediate versions) when you explicitly save, then that gives no benefit over how things currently work, except in the rare situation of a crash.

        However, neither case solves the issue I described of accidentally saving when you didn't mean to, and then closing the IDE.

        In terms of the issue about people needing to 'dig into the project guts', we needn't be that secretive about things. Here is a suggested implementation:

        * When you create a new story file it is first saved as "story.r0.ni"
        * Whenever you explicitly save the story file, the revision is incremented, so the next save will create "story.r1.ni", then "story.r2.ni", etc.
        * In the IDE there is an 'old versions' item in the menu, which allows you to view and delete old versions of the file (and possibly an 'auto-expire' setting to automatically remove old revisions).

        An alternative approach would be to use a separate folder, e.g. 'source/old versions/' and to keep the latest version in the usual story.ni. Therefore every time you save, you copy the current story.ini to the old versions foldr (using the appropriate revision ID) before overwriting story.ni with the new version.

        Actually, what I've described is a simplified SCM system, which perhaps might be less necessary if http://inform7.uservoice.com/forums/57320-general/suggestions/834169-ide-make-inform-more-scm-compatible were resolved.

        However I still think it would be valuable for users who can't or won't use SCM for their projects. In particular, it has potential for greater usefulness, such as tagging releases (which are locked and cannot be deleted) so you know exactly which version of the code was used for each version you.

      • Andrew PlotkinAndrew Plotkin commented  · 

        I have mixed feelings about this. (At least on the Mac.) In general Mac applications do not do this kind of one-save backup; in fact apps are moving towards a "just save constantly and invisibly" model. (With infinite undo during a session, of course.) Backups should be handled by a system-level tool.

        It is also the case that if the Mac IDE *does* back up, it should back up the entire project. The typical user doesn't know that a "story.ni" file even exists, and shouldn't have to dig into project guts to take advantage of a backup feature.

        I can't speak to Windows system conventions. On Linux, well, I use Emacs on Linux so this idea is perfectly natural.

      • HappyDogHappyDog commented  · 

        This happened to me a while ago, but I thought I'd log it here.

        When you save your story file in the IDE, the old version should be kept as a backup. For example, when you save it will copy the original "story.ni" to "story.ni~" before making the save.

        I managed to lose about 3 days work when I accidentally pasted one of the examples into my story file for testing, and somehow managing to save it in that state. Luckily I had a backup. Unluckily it was 3 days old.

        User error - yes. My fault - yes. Could the software have helped me to avoid doing this - yes.

      Feedback and Knowledge Base