Live data from Hacker News

Developer accidentally deletes 3 months of work with Visual Studio Code

cc.bingj.com

61–70 of 75 posts

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

#61
It may be victim blaming, but having 3 months of work and it only exists on one hard drive on one computer isn't very bright. He learned the hard way. I mean honestly, disk drives fail. PCs break. The code should never be in only one place regardless. Also, coming from VSS to Git has been, and still is, one of the hardest things I do as a windows dev. I hate git. It is non-intuitive and I have accidentally deleted my work before also, the difference being that I have it stored else where to get it too.

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

#63
post #48

its always sad to see people learn the lesson of source control the hard way.

This is more of a backup lesson.

I would call it a UX design lesson, primarily, although all undesirable changes are also backup lessons.

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

#64

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…

Excessive automation considered harmful: even if you want something to happen 99% of the time, it should still be a manual operation. Otherwise, it will bite 100 of your 10,000 users at least once.

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

#65

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…

Excessive automation considered harmful: even if you want something to happen 99% of the time, it should still be a manual operation. Otherwise, it will bite 100 of your 10,000 users at least once.

If it's a destructive operation, yeah. I was really, genuinely surprised that their editor works like that. As you say, it's not something that will bite you often, but when it bites, it could be pretty painful.

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

#66
As a product developer, when a user of my software "makes a mistake" my first response is to ask myself "What could I have done to avoid the user making this mistake?"

As Jeff Attwood says:

"a well-designed system makes it easy to do the right things and annoying (but not impossible) to do the wrong things."

https://blog.codinghorror.com/falling-into-the-pit-of-succes...

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

#67

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…

This is one of the reasons I'm happy to have Time Machine on macOS. I've had times where I accidentally removed files due to a careless rm -rf in the terminal, as well as lost file changes due to mistakes with git. If you have local backups enabled, it's easy to recover reasonably recent files and changes. Admittedly, it hasn't happened to me in a fairly long time... But knowing you have some kind of safety net is reassuring.

A lot of our tooling and operating systems were designed for a different time, and their age is really starting to show in cases like these. Fault tolerance is incredibly important, and it has taken a backseat position for far too long.

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

#68

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.

The victim failed the first rule of using a computer, backup your work.

A three month project without backup or version control shows a lack of basic training.

I wish schools and universities would teach version control on day one of CS courses.

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

#69
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!

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 it to gitlab!

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

#70

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.

One of the earliest lessons I learned using a computer is that you don't toss around with options unless you have backups and/or already use form of (distributed!) version control.

Even most of my relatively computer-illiterate friends and family members do rudimentary backup for their stuff (usually in the form of emailing themselves or just creating a copy).

Post reply on HN