Slashdot Mirror


Developer Accidentally Deletes Three-Month of Work With Visual Studio Code (bingj.com)

New submitter joshtops writes: A developer accidentally three-month of his work. In a post, he described his experience, "I had just downloaded VScode as an alternative and I was just playing with the source control option, seeing how it wanted to stage -- five thousand files -- I clicked discard... AND IT DELETED ALL MY FILES, ALL OF THEM, PERMANENTLY! How the f*uk is this s*it possible, who the hell is the d******* who made the option to permanently delete all the files on a project by accident even possible? Cannot even find them in the Recycle Bin!!!! I didn't even thought that was possible on Windows!!! F*ck this f*cking editor and f*ck whoever implemented this option. I wish you the worst.'

26 of 765 comments (clear)

  1. Version Control = Good by brian.stinar · · Score: 5, Insightful

    This is why offsite backups, and revision control, is a good idea...

    1. Re:Version Control = Good by Anonymous Coward · · Score: 5, Insightful

      What kind of idiot only has one copy of 3 months of work?

    2. Re: Version Control = Good by bobbied · · Score: 4, Insightful

      I've seen it delete the .git dir before so unless you also push it to a remote, that won't necessarily help.

      Offsite backups, file system backups, wayback machine? Any of these works with Git... Of course, why use Git if you only keep one repo laying around...

      BACKUP your important stuff or stupid mistakes will cost you..

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    3. Re: Version Control = Good by tk77 · · Score: 5, Insightful

      What? Why not? Git is perfectly fine for a single developer. I use it all the time on personal projects. You can even create multiple local repositories so if you screw up your primary tree you can easily recover it.

    4. Re:Version Control = Good by Gussington · · Score: 5, Insightful

      What kind of a developer doesn't know that Windows programs can permanently delete its own data files?

      I think we know what kind.

      What kind of developer doesn't even know that when Windows deletes a file, the file is still there, only the index is deleted, any data recovery util will get it back.
      It would've taken less time to recover the deleted files than rant about it on the Internet...

  2. So, let me get this straight... by djbckr · · Score: 5, Insightful

    He clicks "discard" and it deletes the files. This seems a reasonable outcome. Did he not have any backups? I'm pretty sure that is the *real* WTF.

  3. This guy is a moron by Anonymous Coward · · Score: 2, Insightful

    What would he have done if his hard drive crashed in that three month span? Who doesn't back up their work daily to something...anything?

    This article should be "Moron developer blames software for his stupidity".

  4. Blaming the victim = bad by Anonymous Coward · · Score: 5, Insightful

    The software redefined the semantics of "discard" without informing the user. In Git, discard means "drop pending changes". In VS Code, apparently, discard means "delete and purge all historical references --force". How the hell can the VS Code devs justify introducing such a dangerous and confusing change?

    Captcha: horror

  5. If he's very very smart by Anubis350 · · Score: 5, Insightful

    If he's very very smart he shut down the machine immediately, mounted the drive read only and recovered the files. The chances are most of them were just unlinked and can be recovered since they havent been overwritten yet

    --
    "goodbye and hello, as always" ~Prince Corwin, from Zelazny's Amber series
  6. The lessons of BACKUP !! by ripvlan · · Score: 5, Insightful

    Now that he's 18 - he has discovered the world isn't fair.

    He goes three months and doesn't have a backup? Even in a ZIP file or on a USB drive, or "insert cloud drive service here"

    An unfortunate mistake and maybe even a poorly implemented feature.

    but I have little sympathy because - well his HD could have crashed or a crypto-worm or... basic data loss could have occurred.

    However - how'd we all learn this lesson? Let others stumble before us or put our own finger in the fan !!!

  7. Re:Guy made a mistake by Jiro · · Score: 4, Insightful

    Just because the user could have navigated the confusing user interface doesn't mean it's his fault. Microsoft created the user interface.

    By your reasoning there is never any such a thing as a user interface problem because the user could always have done something else.

  8. Wait... by roc97007 · · Score: 3, Insightful

    > f*ck whoever implemented this option

    Probably the same guy who put "logout" in tiny text right next to "restart", also in tiny text, in Windows Server 2012, making every logout of production systems a test in fine motor skills. I'd really like to speak to that person for a few minutes.

    But Dude. Seriously. Backups? If your stuff is important, you need to keep a copy somewhere the computer can't touch it. You are demonstrating a rather naive trust in computer technology, which a seasoned software developer should not have.

    --
    Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
  9. Ridiculing idiots = good by Tailhook · · Score: 3, Insightful

    The flaw in vscode should have cost this guy no more than a day or so worth of work. The fact that in this case the consequence of the flaw was the loss of three months of work is entirely the his fault.

    I recommend he ask for his money back and then learn about revision control tools and source repositories and why competent people use them.

    --
    Maw! Fire up the karma burner!
  10. Re:I'm confused too by vux984 · · Score: 2, Insightful

    Forget drive history... the hard drive could fail, or get stolen, or get damaged by lightning or coffee, or deleted by malware.

    Where are the backups?

    Revision control is not backups. NFTS file history is NOT proper backups. A copy elsewhere on the same hard drive or same computer or on another computer via a filesystem mount... is NOT proper backups. An external drive you attach once a week and copy files to is not proper backups. They are better than nothing, and each one is still useful... revision control has lots of uses after all, including recovering from certain messes, but it is not by itself proper backups.

    If you can't survive a ransomware infection and a lightning strike all happening simultaneously with the backups *running* -- then you don't have proper backups.

  11. Re:Bitbucket and 3 copies minimum by nedlohs · · Score: 3, Insightful

    It depends how important it is. There are many things I would be perfectly satisfied with increasing the "I lose this" chances from "I lose my local copy" to "I lose my local copy and dropbox loses it at the same time". None of those things are my livelihood of course.

  12. Re:Guy made a mistake by ShanghaiBill · · Score: 4, Insightful

    ... and it's Microsoft's fault?

    Yes, it is partly Microsoft's fault. Tools should be designed assuming users will sometimes do dumb things, or sometimes accidentally click the wrong button.

    This guy is clearly a moron, but there are a lot of morons out there, and software should be designed with that in mind.

  13. Re:Guy made a mistake by MightyYar · · Score: 5, Insightful

    There may very well be a user interface problem with the product. I don't want to blame the victim.

    However, this guy was going to lose his work someday. Maybe it would be a hard drive failure. Maybe a corruption. House fire. Who knows? The point is eventually he was going to have data loss because he doesn't back up. Microsoft may very well be the direct cause here, but this guy was NOT following any kind of best practices.

    --
    W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  14. A wise man once told me... by internet-redstar · · Score: 3, Insightful

    A wise man once told me: "If it isn't worth to be put in git, then it's not worth to be written". Guess he was right ;-)

  15. Re:3 months no backups... of course blame the dev. by networkBoy · · Score: 5, Insightful

    to add clarity (and my $0.027)
    It is *absolutely* the developer's responsibility, but *not* his fault.

    The software in question really shouldn't do something this drastic without a second window saying "This will erase files from disk. Are you sure you intend to do this?"

    --
    whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
  16. Re:Guy made a mistake by TWX · · Score: 5, Insightful

    I'd agree with this, especially in the context of the way Microsoft has trained users into normally expecting prompts when actions have very serious, arguably permanent results. User bears some responsibility, but when the design mentality of the UI since the beginning of the company has been to use confirmation prompts then there's an expectation that this will continue.

    If I were him I'd immediately boot to some utility that scans the disk for filesystem clusters marked as deleted/available to attempt to undelete them. That is still a thing, right?

    --
    Do not look into laser with remaining eye.
  17. Developer? Sure? by williamyf · · Score: 3, Insightful

    From The Sumary:

      "I had just downloaded VScode as an alternative and I was just ***playing*** with the source control option"[emphasis mine]

    So, you are a ***profesional*** "developer"?
    And you ***play*** with three months worth of important-non-backed-up stuff?
    Without RTFM?

    Sorry, but IMNSHO, that dude is a MORON (all caps intended).

    If you do not believe me, RTFA. I know that is not customary on /. but just try, is quite short...

    I know that bashing all things microsoft is fashionable on ./ (I've done so a few times myself), but this making front page is a new low in clickbait by the editors...

    --
    *** Suerte a todos y Feliz dia!
  18. Developers strike again by smooth+wombat · · Score: 3, Insightful

    It's funny, every time I mention how bad software is I get modded down. Not necessarily any particular software, but software in general. Between clunky interfaces, having to go spelunking to find what you want, bloat, you name it, software today is not a pleasure to work with.

    Now this person, a developer in their own right, is complaining about another developer(s) who apparently couldn't see their way to not destroy file.

    Welcome to my world, where every day it's a war to try and find solutions to the incompetence of software developers.

    --
    We will bankrupt ourselves in the vain search for absolute security. -- Dwight D. Eisenhower
  19. Git out of here, its great. by TiggertheMad · · Score: 4, Insightful

    A single developer shouldn't be using git.

    Why not? I use it for all my projects, if for no other reason than to not be this guy. If I delete all my local code, its on a server and multiple other systems. it is cheap, simple and keeps everything in sync.

    I have had non-coder friends who have heard about git, and asked if it would work for non-code digital assets. (Pictures, e-books, music, etc).

    --

    HA! I just wasted some of your bandwidth with a frivolous sig!
  20. Re:Just tried it by StormReaver · · Score: 3, Insightful

    Did he happen to ignore the popup with the big yellow exclamation mark that says:
    "Are you sure you want to discard ALL changes? This is IRREVERSIBLE!"

    It's perfectly reasonable to interpret that prompt as meaning, "all changes since my last commit." It's a really bad prompt, and should never have been allowed into the program.

  21. Re:3 months no backups... of course blame the dev. by KingMotley · · Score: 5, Insightful

    The software in question really shouldn't do something this drastic without a second window saying "This will erase files from disk. Are you sure you intend to do this?"

    It did actually. He said it came up and warned him "are sure to discard all the changes?" (his words) and he clicked yes. Since he hadn't ever checked anything in, his changes were what he had done in the past 3 months.

    No backups, no source control for 3 months, a guy who doesn't know what source control is or does, and just clicks on warning messages without understanding them is his fault. Regular backups would have saved him. Actually using source control would have saved him. Reading the damn prompt and actually being sure before clicking "Are you sure" would have saved him. Another prompt asking are you really really sure isn't going to save him from himself.

  22. Re:Just tried it by Anonymous Coward · · Score: 2, Insightful

    I think you missed the fact that 'discard all changes' is what he wanted. But it didn't discard all changes. Discard all changes would've undone everything since the moment he last saved or opened a file'. These files were imported into the software, not created there. So the discard state should've been untouched files, not empty the entire directory tree.

    Is the fact that he has no backup hilarious? Oh yes it was. But is this an issue that needs to be fixed? Yes. Most definitely.