Live data from Hacker News

Developer accidentally deletes 3 months of work with Visual Studio Code

cc.bingj.com

31–40 of 75 posts

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#31
post #9

I never trust anything but the commandline when it comes to git. Then I know full and well what I'm doing regardless of the editor. When there are too many icons and buttons to click I don't like to have to remember what they all mean, or how well they map to the underlying core git concepts.

I know what you mean, but for all its faults I like Sourcetree here: it doesn't use anything but what git does. You have a staging area, adding, interactive rebasing, everything uses gigs proper terminology. As opposed to the GitHub for Windows app for example which has new words.

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#32

I predict one day we will look back and be horrified that there was ever a time where you can't just roll back an entire system to an arbitrary timestamp to undo accidental changes. In some sense this is already achievable if you just always work inside a Dropbox folder (which keeps a 30 day history of any synced changes). But resources aren't yet cheap enough for all changes to be immutable.

On mac os you have system built-in version control on most text based file by default. I recovered lost work with it in a discard once (discarded on the wrong branch and no stash to reapply). https://support.apple.com/kb/PH18862?locale=en_US

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#34
post #11

He says that it wasn't in a repo, so it's a bit weird that it would delete all his files, it looks more like he had an initialised repo and hadn't committed the files yet. I don't even know how you could work 3 months without committing, even working on a throwaway thing for more than a few hours I make a new local repo, it doesn't cost much. Also the files are not gone, they are still on the hard-drive/SSD it's not…

Exactly, all the deletion does is remove the file system connection to the location of the data on disk. Someone needs to get in touch with this guy and tell him to stop using that drive!

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#35
post #30

Earlier quoted context omitted.

You're blaming the victim. Yes, it's better to know git than not knowing it, but the developer was merely tossing around with the various options of the IDE. It shouldn't be that easy to make an operation with such disastrous results. It is the responsibility of the product designers to prevent this.

Certainly there might be room for improvement. But the warning was pretty clear I feel. At some point you have to take responsibility for knowing your tools. This is a professional.

> This is a professional.

He might know how to write code, but obliviousness towards source control (and backups, for that matter) is a HUGE indicator of him not being a professional.

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#36

The sad part is that he didn't learn his lesson. The problem obviously isn't with Visual Studio Code, but with Git (or whatever version control software he tried out). It seems that he didn't know anything about using git and accidentally checked out a bare repo instead of adding his files to stage. From his post, he says he's using windows and he's used to things going into the recycle bin, something a Linux tool li…

You're blaming the victim. Yes, it's better to know git than not knowing it, but the developer was merely tossing around with the various options of the IDE. It shouldn't be that easy to make an operation with such disastrous results. It is the responsibility of the product designers to prevent this.

Come on though - there are so many ways you can lose data. Having 3 months of work not backed up in any way is foolhardy in the extreme. Hard disk failure, power surge, robbery, data corruption, coffee, fire/flood.. Personally I err on the side of paranoia with these things.

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#37
post #30

Earlier quoted context omitted.

Certainly there might be room for improvement. But the warning was pretty clear I feel. At some point you have to take responsibility for knowing your tools. This is a professional.

> This is a professional. He might know how to write code, but obliviousness towards source control (and backups, for that matter) is a HUGE indicator of him not being a professional.

Yep. Also a quick search of his name reveals a bunch of Quora responses some of which are a bit disturbing. That's not terribly professional either.

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#38

The sad part is that he didn't learn his lesson. The problem obviously isn't with Visual Studio Code, but with Git (or whatever version control software he tried out). It seems that he didn't know anything about using git and accidentally checked out a bare repo instead of adding his files to stage. From his post, he says he's using windows and he's used to things going into the recycle bin, something a Linux tool li…

I think that the first lesson that he should learn is the need for regular backups. In fact, I am not even sure he meant to use git ("I hadn't commited any of them to any repository"). If it that's the case, I would understand why he did such a mistake: * Open the folder in VS Code * Explore around, discover the Git tab on the left, "This workspace isn't yet under git source control", press the button * "Whops, I did…

This is it. I find myself making backups of my source controlled folder just in case something I do with SVN messes things up. The absurdity of this is not lost on me.

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#39
post #17

The original Github issue seems to have been deleted, but here's a fresher cache that includes a response from a VS Code Microsoft employee, including a pic of what the warning dialog looks like: http://archive.is/EZX1O

Thanks, that answer actually adds some very important context!

Re: Developer accidentally deletes 3 months of work with Visual Studio Code

#40
This is a valid complaint. You simply don't design UI that allows to delete a large number of files with a press of a single button. That he didn't have backups is irrelevant. Even accidentally deleting fresh changes is quite damaging. VS Code doesn't say anything about Git, or what Git is. You can't expect anyone who downloads MS software to be a Git expert.
Post reply on HN