7 ms·
Slashdot was running this story: http://cc.bingj.com/cache.aspx?d=1462716999241&mkt=de-DE&setlang=en-US&w=xEsMxqoa0KJSwMsTh3p_8w2qryykfDvB http://cc.bingj.com/
by ericfrederich 9y ago
Slashdot was running this story:
http://cc.bingj.com/cache.aspx?d=1462716999241&mkt=de-DE&setlang=en-US&w=xEsMxqoa0KJSwMsTh3p_8w2qryykfDvB http://cc.bingj.com/cache.aspx?d=1462716999241&mkt=de-DE&set...
- deleted 9y ago[deleted]
- outside1234 9y agoThis reminds me of when I was 12 years old, learning to program in BASIC, and my probably 15th program was drawing a star on the screen in ASCII. I named it *.bas, which the interpreter actually ran despite that being a terrible name for anything. Yeah, I lost all of the other programs in the directory. Use backups and source control. Sometimes you need to learn things the hard way, but this one, take it from us. :)
- bennofs 9y agoThat does sound like a bad UI though. Perhaps vscode could stage the files before, so that they end up in Git's objects at least? Or somehow store them in the reflog
- threatofrain 9y agoIf I'm reading the situation correctly, Git was also involved in the problem. This person seemed to have his project under Git version control... but he hadn't committed for 3 months, which implies he viewed Git as an inconvenience at best. Perhaps the company is just passing around some project scaffolding? Any other GUI over your version control software is going to have the option to discard recent changes. Discarding changes sounds like a potentially damaging thing, so it makes sense that you'd want to gate it with a warning dialogue. But they did gate it, and if files are deleted in the process, they do say DELETED in caps, and then they gate you again with another popup by saying IRREVERSIBLE in caps. Adding a third popup gate would be excessive.
- DiThi 9y ago> but he hadn't committed for 3 months I get nervous when I haven't commited for 2-3 days. Since I don't want to commit broken code, I make a patch and send it somewhere for peace of mind. In addition to that I have an editor add-on that saves a copy every single time I save a file. One time it allowed me to recover the work of several days. You don't need backups until you do. Some people learn the hard way.
- ivuicuviudfiv 9y ago> I have an editor add-on that saves a copy every single time I save a file This sounds very useful! Is this addon for vscode? Please educate me :-)
- laythea 9y agoThis sounds very wasteful unless it is doing diffs in the background. In which case, git would be better.
- DiThi 9y agoIt doesn't do diffs and it's no replacement for git, but complements it as one added layer of protection. It's kind of wasteful but my local-history is 100 mb big after some months. And you can tell it to auto purge anything older than X days. I would put 90 days as default instead of 30.
- DiThi 9y agoIt's an atom addon called local-history. It seems there's a VS code addon of the same name with the same functionality.
- TheCoreh 9y ago> I get nervous when I haven't commited for 2-3 days. I get nervous when I haven't commited for 2-3 hours. I can't even begin to comprehend how someone could make 5000+ file changes to a git repo for 2-3 months and not commit once. He probably didn't know about version control, and was working on someone else's project?
- Mad_Mac 9y agoIt's pretty bad UI design, but pressing the discard button does open a confirmation box that says "Are you sure you want to discard ALL changes? This is IRREVERSIBLE!" With that kind of a message, it's amazing how he didn't think twice about discarding them. Especially when he didn't have a proper source control before.
- fzukfzjk 9y agoHe most likely didn't have a proper source control because he didn't even know what it is. For someone like him your proposed warning wouldn't be effective, because according to his belief he didn't change anything yet.
- josteink 9y ago3 months of code work and no version control... You have to wonder if he actually learnt a valuable lesson or just ran away blaming Microsoft...
- Vinnl 9y agoI'm not hopeful: > I don't need to explain why I don't have a private repo with my stuff. It is the software's concern NOT to destroy the integrity of a computer like a damn virus. You come here, see my despair and berate me for something that was not my fault, and has happened to a lot of other people? Fuck you.
- DiThi 9y agoWhile I think he should have learn his lesson before, also I think it should show the list of files it would delete.
- kbenson 9y agoLOL. I mean, it sucks to be that guy, but you have to consider that a project editor has the possibility to overwrite your files with gibberish at any time. I would never load some new software that was supposed to manage a project on my project of 5000 files without having a real good backup first. The same way if I was a video editor and was switching to new video editing software, I would make sure to have a good copy of the originals as well as the work up to that point saved so that I could recover any unexpected weirdness of the new software. None of that helps this guy. I understand that. Maybe Visual Studio Code could have worded it better. This guy played fast and loose with the safety and integrity of his work and he was bit by it. I do feel for him, but more in the way I feel for anyone that does a stupid thing they should have thought more about first, but this is more a problem of him not understanding what he was doing and the category of software he was giving control of all of his files to. If you plugged your weirdly formatted USB drive (but usable by your other systems) into a computer and it said "We can't read this! Should we reformat?" you probably shouldn't click yes if you don't have backups of what was on that USB drive.
- EugeneOZ 9y ago> but you have to consider that a project editor has the possibility to overwrite your files with gibberish at any time You really need to use other editors if you think so. Removing 15k files without any warning is a pretty lame move from editor developers.
- imtringued 9y agoThe warning looks like this https://web.archive.org/web/20170817134400im_/https://user-images.githubusercontent.com/240625/29264526-c8a1b354-80dd-11e7-82d7-76e7b0066998.png https://web.archive.org/web/20170817134400im_/https://user-i...
- Asooka 9y agoThis doesn't tell me what changes it's going to discard. The word "uncommitted" should probably be in there somewhere, and I would use "delete" instead of "discard" for a file operation. As in "Delete all uncommitted files and file contents and set them to the last git commit?". Plus a list of changes that will be made, like: - delete a.txt - delete b.txt - delete 123 changed lines from c.txt As it's worded it's quite vague what's going to be discarded from where and how. Presumably if you know which button you clicked, it's more clear, but if you mis-click and don't know what you clicked, you can quite easily make the same mistake. Finally, he's right that programs shouldn't be deleting files without a way to recover them in 2017. That operation should require the same level of directed intentionality as launching a nuclear missile.
- caconym_ 9y agoHonestly if you have three months of work not in version control and not backed up and you're willing to click a button labeled "discard" anywhere near your files without taking any precautions then you have only yourself to blame. Also, I feel bad saying it, but I haven't laughed this hard in a while.