Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. What would you do?

What would you do?

Scheduled Pinned Locked Moved IT & Infrastructure
helpquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cosmogon
    wrote on last edited by
    #1

    Hi, A question for any programmers here: Imagine you have written a backup program. In this program you can set up profiles, each profile has a source folder and a destination folder. When you run the profile, the files in the source folder are copied to the destination folder according to what options you have chosen for that profile. One of these profile options is called "Exact Copy". This means that the destination folder will be exactly synchronized with the source folder: if you add files to the source, they will be added to the destination folder, if you delete files from the source folder, files with the same name will be deleted from the destination folder. This means that if you accidently delete some files in a source folder, the backup of these files in the destination folder will be deleted also when the profile is run. So far so good, the program cannot know which files in the source folder that are deleted intentionally and which may have been deleted accidently, and therefore cannot warn you next time the profile is run. The only one that can prevent accidental deletion of files is you, by being aware of what you are doing. Now imagine a user tells you that he has discovered that if he uses Exact Copy in a profile, but accidently has deleted the source folder itself for that profile, all files in the destination folder are deleted also next time the profile is run. In other words, the program acts just as if the files in the source folder all have been deleted. Do you think there is a problem here, and if, what would you do to fix it? -- Rich

    P P C 3 Replies Last reply
    0
    • C cosmogon

      Hi, A question for any programmers here: Imagine you have written a backup program. In this program you can set up profiles, each profile has a source folder and a destination folder. When you run the profile, the files in the source folder are copied to the destination folder according to what options you have chosen for that profile. One of these profile options is called "Exact Copy". This means that the destination folder will be exactly synchronized with the source folder: if you add files to the source, they will be added to the destination folder, if you delete files from the source folder, files with the same name will be deleted from the destination folder. This means that if you accidently delete some files in a source folder, the backup of these files in the destination folder will be deleted also when the profile is run. So far so good, the program cannot know which files in the source folder that are deleted intentionally and which may have been deleted accidently, and therefore cannot warn you next time the profile is run. The only one that can prevent accidental deletion of files is you, by being aware of what you are doing. Now imagine a user tells you that he has discovered that if he uses Exact Copy in a profile, but accidently has deleted the source folder itself for that profile, all files in the destination folder are deleted also next time the profile is run. In other words, the program acts just as if the files in the source folder all have been deleted. Do you think there is a problem here, and if, what would you do to fix it? -- Rich

      P Offline
      P Offline
      Perspx
      wrote on last edited by
      #2

      Yes I think there's a problem with that model - I wouldn't be too pleased if I accidentally deleted a folder and all the files from the backup copy (which acts as protection for a mistake such as that) were also deleted. I think a way around that problem would be to prompt the user, or have a setting for being prompted when the program is about to reflect changes on either the source or destination folder, possibly with a list of files that will be added/deleted so that the user knows what changes are going to take effect. A similar alternative would be for there to be a list of files in the destination folder, and when updates are made, any files that are going to be deleted are greyed out in this list but aren't actually deleted. Then the user can select to not delete these files, and then the changes/deletions are made on exit. Regards, --Perspx

      "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia Introduction to Object-Oriented JavaScript

      C 1 Reply Last reply
      0
      • P Perspx

        Yes I think there's a problem with that model - I wouldn't be too pleased if I accidentally deleted a folder and all the files from the backup copy (which acts as protection for a mistake such as that) were also deleted. I think a way around that problem would be to prompt the user, or have a setting for being prompted when the program is about to reflect changes on either the source or destination folder, possibly with a list of files that will be added/deleted so that the user knows what changes are going to take effect. A similar alternative would be for there to be a list of files in the destination folder, and when updates are made, any files that are going to be deleted are greyed out in this list but aren't actually deleted. Then the user can select to not delete these files, and then the changes/deletions are made on exit. Regards, --Perspx

        "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia Introduction to Object-Oriented JavaScript

        C Offline
        C Offline
        cosmogon
        wrote on last edited by
        #3

        Perspx wrote:

        Yes I think there's a problem with that model - I wouldn't be too pleased if I accidentally deleted a folder and all the files from the backup copy (which acts as protection for a mistake such as that) were also deleted.

        Exactly.

        Perspx wrote:

        I think a way around that problem would be to prompt the user, or have a setting for being prompted when the program is about to reflect changes on either the source or destination folder, possibly with a list of files that will be added/deleted so that the user knows what changes are going to take effect.

        There are different ways to do it yes. Basically the program should cancel the copying (= deletion) proces for that profile and then give the user a warning in some way, depending on how the program is structured in general. Now, the user is actually me, and the program in question is SecondCopy http://secondcopy.com[^], a very well written, pretty advanced and very popular program that has won lots of awards. I've always been very satisfied with the program, except for when I by accident discovered this flaw. Over the last two years I've written three times to the company that makes the program about the problem, trying to make them fix it, but with no luck. Last time (some months ago) it seemed as if they finally understood what I was trying to tell them, nevertheless all they've done is adding a comment to the log file "Warning: source folder does not exist" which is pointless for you won't see that before after the files have been deleted, and I think most people don't even read the log file anyway. My reason for writing here is mainly to get some qualified responses from other programmers that I can refer to, in the hope that that will make them listen. So any comments, short or long, are welcomed. -- Rich

        1 Reply Last reply
        0
        • C cosmogon

          Hi, A question for any programmers here: Imagine you have written a backup program. In this program you can set up profiles, each profile has a source folder and a destination folder. When you run the profile, the files in the source folder are copied to the destination folder according to what options you have chosen for that profile. One of these profile options is called "Exact Copy". This means that the destination folder will be exactly synchronized with the source folder: if you add files to the source, they will be added to the destination folder, if you delete files from the source folder, files with the same name will be deleted from the destination folder. This means that if you accidently delete some files in a source folder, the backup of these files in the destination folder will be deleted also when the profile is run. So far so good, the program cannot know which files in the source folder that are deleted intentionally and which may have been deleted accidently, and therefore cannot warn you next time the profile is run. The only one that can prevent accidental deletion of files is you, by being aware of what you are doing. Now imagine a user tells you that he has discovered that if he uses Exact Copy in a profile, but accidently has deleted the source folder itself for that profile, all files in the destination folder are deleted also next time the profile is run. In other words, the program acts just as if the files in the source folder all have been deleted. Do you think there is a problem here, and if, what would you do to fix it? -- Rich

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          So basically, you want an exact copy that's NOT an exact copy? I assume that it's expected to have a telepathic interface to know that you didn't actually mean to do this. Computers are dumb beasts, so you have to be clever - if you stray over the line into dumbville, then the computer will be only too happy to help you. Of course, a better architecture would be to have some form of transactional facility where the delete/update happens, but you have the option to roll it back at a later stage (obviously, the timescale here would be fairly tight so that you don't end up with huge transaction files).

          Deja View - the feeling that you've seen this post before.

          My blog | My articles

          C 1 Reply Last reply
          0
          • C cosmogon

            Hi, A question for any programmers here: Imagine you have written a backup program. In this program you can set up profiles, each profile has a source folder and a destination folder. When you run the profile, the files in the source folder are copied to the destination folder according to what options you have chosen for that profile. One of these profile options is called "Exact Copy". This means that the destination folder will be exactly synchronized with the source folder: if you add files to the source, they will be added to the destination folder, if you delete files from the source folder, files with the same name will be deleted from the destination folder. This means that if you accidently delete some files in a source folder, the backup of these files in the destination folder will be deleted also when the profile is run. So far so good, the program cannot know which files in the source folder that are deleted intentionally and which may have been deleted accidently, and therefore cannot warn you next time the profile is run. The only one that can prevent accidental deletion of files is you, by being aware of what you are doing. Now imagine a user tells you that he has discovered that if he uses Exact Copy in a profile, but accidently has deleted the source folder itself for that profile, all files in the destination folder are deleted also next time the profile is run. In other words, the program acts just as if the files in the source folder all have been deleted. Do you think there is a problem here, and if, what would you do to fix it? -- Rich

            C Offline
            C Offline
            ChandraRam
            wrote on last edited by
            #5

            Doesn't the Windows Briefcase already implement something like this? You might want to take a look at the interface when you try to "sync" the briefcase...

            C 1 Reply Last reply
            0
            • P Pete OHanlon

              So basically, you want an exact copy that's NOT an exact copy? I assume that it's expected to have a telepathic interface to know that you didn't actually mean to do this. Computers are dumb beasts, so you have to be clever - if you stray over the line into dumbville, then the computer will be only too happy to help you. Of course, a better architecture would be to have some form of transactional facility where the delete/update happens, but you have the option to roll it back at a later stage (obviously, the timescale here would be fairly tight so that you don't end up with huge transaction files).

              Deja View - the feeling that you've seen this post before.

              My blog | My articles

              C Offline
              C Offline
              cosmogon
              wrote on last edited by
              #6

              Pete O'Hanlon wrote:

              So basically, you want an exact copy that's NOT an exact copy? I assume that it's expected to have a telepathic interface to know that you didn't actually mean to do this.

              I don't think you have understood the issue correctly. Try reading my post again. Programs need to be foolproof, even experts make mistakes sometimes. A program that deletes your data because you make a mistake which the program easily can detect you have made obviously has a serious flaw.

              P 1 Reply Last reply
              0
              • C ChandraRam

                Doesn't the Windows Briefcase already implement something like this? You might want to take a look at the interface when you try to "sync" the briefcase...

                C Offline
                C Offline
                cosmogon
                wrote on last edited by
                #7

                ChandraRam wrote:

                Doesn't the Windows Briefcase already implement something like this? You might want to take a look at the interface when you try to "sync" the briefcase...

                Thanks for the suggestion, but it doesn't have all the features Second Copy has and which I use.

                1 Reply Last reply
                0
                • C cosmogon

                  Pete O'Hanlon wrote:

                  So basically, you want an exact copy that's NOT an exact copy? I assume that it's expected to have a telepathic interface to know that you didn't actually mean to do this.

                  I don't think you have understood the issue correctly. Try reading my post again. Programs need to be foolproof, even experts make mistakes sometimes. A program that deletes your data because you make a mistake which the program easily can detect you have made obviously has a serious flaw.

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #8

                  Nope. You didn't read my answer properly. I read your post and your follow up, and in neither case did you demonstrate that the original program behaved in a poor fashion. If you reread my post, you'll see that I advocate a design where it does what you want 90% of the time where it deletes the information without bothering you, and provides the ability to rollback the change if it's not what you want. And in this case, believe me, I really do know what I'm talking about because my company provides software that does just this. The last thing you want as a user is a program that should work without no interaction, stopping working because it's waiting on the user noticing that there's something they need to do.

                  Deja View - the feeling that you've seen this post before.

                  My blog | My articles

                  C 1 Reply Last reply
                  0
                  • P Pete OHanlon

                    Nope. You didn't read my answer properly. I read your post and your follow up, and in neither case did you demonstrate that the original program behaved in a poor fashion. If you reread my post, you'll see that I advocate a design where it does what you want 90% of the time where it deletes the information without bothering you, and provides the ability to rollback the change if it's not what you want. And in this case, believe me, I really do know what I'm talking about because my company provides software that does just this. The last thing you want as a user is a program that should work without no interaction, stopping working because it's waiting on the user noticing that there's something they need to do.

                    Deja View - the feeling that you've seen this post before.

                    My blog | My articles

                    C Offline
                    C Offline
                    cosmogon
                    wrote on last edited by
                    #9

                    Pete O'Hanlon wrote:

                    Nope. You didn't read my answer properly. I read your post and your follow up, and in neither case did you demonstrate that the original program behaved in a poor fashion.

                    Well then let's try another way: You're not supposed to delete the source folder, as it is the very core of the profile. So if you do, there's obviously something wrong. So the program needs to notify you that there is a problem, and in a way that makes sure you get the notification (it already does in case of other problems). It doesn't do that however. All it does is putting a note on top of the logfile (why there btw, when other error messages are put at the end of the file, and in red text?) that the source folder has been deleted, which most users probably don't see. And even if they do, it's too late anyway - their files are gone. The program has the ability to make copies of deleted files so you can rollback, but if the files are the size of several GB each (some of mine are are 20 GB or more), this is a bad solution as it requires a lot of extra diskspace (which simply may not be available) and takes a lot of extra time. It's much simpler not deleting the files, and notify the user of the problem so he can correct the situation. If nothing else, then include the option so users can choose whichever solution they find most appropriate to their situation.

                    Pete O'Hanlon wrote:

                    The last thing you want as a user is a program that should work without no interaction, stopping working because it's waiting on the user noticing that there's something they need to do.

                    It does not to have to stop working (I assume we're talking about scheduled backup of multiple profiles). It can simply skip running that particular profile so the backup files do not get deleted (they're not supposed to be deleted in this case anyway, remember), and continue with the rest of the profiles, and then set a flag in the program window and a tray icon notification as it does with other errors, so the user gets notified about the problem and can fix it.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups