Live data from Hacker News

Developer accidentally deletes 3 months of work with Visual Studio Code

cc.bingj.com

71–75 of 75 posts

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

#71
post #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.

But it wasn't a single button, there was a warning message: https://archive.fo/EZX1O

See joaomoreno's comment on that page.

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

#72
post #69

Earlier quoted context omitted.

Thanks, that answer actually adds some very important context!

Yeah, I actually got this dialog once and immediately clicked on 'cancel' to make sure I understood what the command did. Personally I think this little detail changes the whole situation. And that's not even taking into account the idiocy of not having a backup and not incrementally adding the project to some form of version control. Hell, even for all but the simplest TOY project I create a git repository and push…

This didn't happen to me and I'd like to think I'm being objective here - the dialog says:

> Are you sure you wish to discard ALL changes? This is IRREVERSIBLE!

Yes, very scary, like many warnings that some systems teach us to ignore.

It doesn't say what "changes" will be discarded. Are those the changes it made since the IDE was installed? Did the IDE make changes? Some kind of project files or directories? Some kind of setup? Is a novice supposed to know this?

Even on the home-grown IDE I use at work, it saves backups in a trash area when you delete files in case you accidentally delete something you don't intend to. (Actually, I got very concerned once thinking I had deleted something I hadn't committed yet... as I recall it was a false alarm, but I was pleased that my concern was misplaced.)

And given that a lot of other people have experienced this, I'd say there is evidence that this is a UX (User eXperience) problem, not necessarily a PEBCAK (Problem Exists Between Chair and Keyboard):

https://social.msdn.microsoft.com/Forums/expression/en-US/b3...

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

#73
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.

The commandline offers just as much opportunity to screw up your repository as a GUI does, if not more.

Here's the description for the man-page for git-clean:

> git-clean - Remove untracked files from the working tree

https://git-scm.com/docs/git-clean

Now I would call that description very precise and readable.

Here's the GUI's warning:

> Are you sure you wish to discard ALL changes? This is IRREVERSIBLE!

What changes? He didn't change anything. Did the GUI change something? Maybe it did. Maybe nothing will happen.

Foolish not to back-up before experimenting? Sure. But GUI's imply friendliness to the inexperienced. This seems like bad UX.

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

#74

Well, that's not very positive... but I can relate. VS Code lost some work of mine on the first day I tried it, so I decided not to continue using it. It wasn't super important so I wasn't angry, but it was a good chunk of code I had just spent probably 45 minutes writing and debugging. You could argue it was my fault because I didn't stage and commit the new file, but there's no reason to close a buffer just because…

Actually you can control this behaviour with "workbench.editor.closeOnFileDelete": false

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

#75
His story is a little funny and a little sad. I had a similar experience but I was much more cautious. I had actually backed up my project through GitHub desktop and committed it before formatting my computer. After cleaning and setting the system back up, I lost a days worth of work. I was 100% sure I had committed it. When I started back where I was and committed my changes, I checked the web Github to ensure that the changes were still submitted and they weren't. There was a bug with Windows 10 and Github that caused it. After that I decided to use Google Drive to backup my Github upon changes. Don't try to use Github folders and Google Drive folders as the same directories. Something weird happens and only one will work. Now I make submissions to Github and have a duplicate folder (using relative paths in my project) in my Google drive. Alternatively, you can submit your changes through the Github website, but it takes forever.
Post reply on HN