News for hackers. Stuff that matters.
Re:Developer accidentally deletes 3 months of work with Visu... by sashagim on Friday August 18, 2017 @04:36AM (#15044526)
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.
Re:Developer accidentally deletes 3 months of work with Visu... by yoz-y on Friday August 18, 2017 @04:46AM (#15044567)
I think the question is more likely: should an operation like this be possible at all? VSCode already gives you a big warning (as shown in the issue) that "discarding changes" is irreversible but it does not explain what "discarding changes" means.

When people empty their recycle bin they kind of understand what is going to happen. Discarding changes speaks to me but evidently not to this person. Personally I tend to put my code in Dropbox in early stages as git commits do not make much sense (of course one can squash everything and do a rebase but that is advanced git already).

Re:Developer accidentally deletes 3 months of work with Visu... by nailer on Friday August 18, 2017 @05:22AM (#15044719)
There's a bug out for not deleting files that haven't been added to the repository when discarding changes:

https://archive.is/GisMJ

Re:Developer accidentally deletes 3 months of work with Visu... by Xoros on Friday August 18, 2017 @10:44AM (#15046614)
I was surprised when the exact same thing happened the first time I "played" with Code :D ! Discovering this the hard way.

Well not that hard, because of course I tried it first on a copy of the project so haven't lost anything (if not time).

But even if I agree that what is going to happen is unclear for some (included me at the time), and a total wipe of your work is excruciating, you don't "try things" on the only copy of 3 months of work.

Re:Developer accidentally deletes 3 months of work with Visu... by godot on Friday August 18, 2017 @11:47AM (#15047204)
I think the obvious thing that VSCode could've done to avoid this disaster was moving files to recycle bin instead of deleting permanently on discard. You or OP might say why would the behavior of a Linux tool like git move to recycle bin? Well, TortoiseGit on Windows (git client) (or even going as far back as TortoiseSvn) will always move files to recycle bin when you discard changes. If they can, there's very little excuse why VSCode can't. There is also very little maintenance overhead for a user. Once in a while you notice your recycle bin isn't empty and you go and empty it.
Re:Developer accidentally deletes 3 months of work with Visu... by scarface74 on Friday August 18, 2017 @06:06AM (#15044888)
If he has that large of a codebase, he may be a VS Code newbie and/or a git newbie but he isn't s computer newbie.

Anyone who has anything important on a computer should know to back it up somewhere.

Re:Developer accidentally deletes 3 months of work with Visu... by mercer on Saturday August 19, 2017 @06:45AM (#15052695)
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).

Re:Developer accidentally deletes 3 months of work with Visu... by nextweek2 on Saturday August 19, 2017 @04:31AM (#15052343)
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 Visu... by ehnto on Friday August 18, 2017 @05:24AM (#15044731)
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.

Re:Developer accidentally deletes 3 months of work with Visu... by majewsky on Friday August 18, 2017 @05:34AM (#15044768)
> 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 Visu... by ehnto on Friday August 18, 2017 @08:33AM (#15045537)
I would agree. User friendliness isn't a bad goal for any piece of software, but there is a certain level of knowledge we can expect from a professional. Knowledge of their chosen tooling is one of them I feel.
Re:Developer accidentally deletes 3 months of work with Visu... by majewsky on Friday August 18, 2017 @11:14AM (#15046899)
It's not even knowledge of tooling, it's knowledge of practices. How would you feel about an electrician who doesn't properly ground the circuit he's about to work on? That's how I feel about a programmer who doesn't take backups of his code in short intervals (which is a big part of what VCSs do).
Re:Developer accidentally deletes 3 months of work with Visu... by Boothroid on Friday August 18, 2017 @05:45AM (#15044811)
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 Visu... by Boothroid on Friday August 18, 2017 @05:42AM (#15044797)
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 Visu... by Cozumel on Friday August 18, 2017 @10:15AM (#15046355)
>You're blaming the victim.

The victim did it to themselves, it's like playing with a loaded gun then complaining when you accidentally shoot yourself in the face. A bad workman always blames their tools. At the very least they should have learnt Git.