News for hackers. Stuff that matters.
Re:Try Out Rust IDE Support in Visual Studio Code by bennofs on Friday August 18, 2017 @03:45PM (#15049163)
That 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
Re:Try Out Rust IDE Support in Visual Studio Code by threatofrain on Friday August 18, 2017 @04:45PM (#15049593)
If 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.

Re:Try Out Rust IDE Support in Visual Studio Code by DiThi on Friday August 18, 2017 @06:13PM (#15050173)
> 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.

Re:Try Out Rust IDE Support in Visual Studio Code by TheCoreh on Friday August 18, 2017 @09:32PM (#15051093)
> 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?

Re:Try Out Rust IDE Support in Visual Studio Code by DiThi on Saturday August 19, 2017 @07:59AM (#15052901)
My changes tend to be small, slow but profound. I think a lot on most problems I solve. In other areas of development it would probably be 6-8 hours. I get nervous because the hard disk can break at any moment, but it's unlikely enough that repeating 6-8 hours worth of work every 2-3 years is an acceptable risk to me.
Re:Try Out Rust IDE Support in Visual Studio Code by fermuch on Friday August 18, 2017 @10:57PM (#15051398)
Git stash is a great tool to keep unfinished work, IMO. You _stash_ your changes if you need to work on something else, and then you pop it from the stash to continue working on it. No commits, no branches. Just stash and pop.
Re:Try Out Rust IDE Support in Visual Studio Code by DiThi on Saturday August 19, 2017 @08:01AM (#15052909)
I use stash all the time. That's not the problem. The worry is losing the whole repo because of hard disk failure.
Re:Try Out Rust IDE Support in Visual Studio Code by antaviana on Saturday August 19, 2017 @02:34PM (#15054865)
I use an AWS instance for development (on Windows, I suppose that Linux could also have a similar setup).

This setup allows me to use AWS snapshots to have the disk backed up (crash consistently) once a day (but it could be once an hour or even less). I shut down the AWS instance when I do not use it because it starts up again in seconds when I need it.

When I do not have a fiber connection at hand, I can use my 4G phone as a personal hotspot with 60-80ms latency to AWS Ireland from my country, which gives a great experience with RDP, has been a game changer when in the move.

Since RDP traffic is about only 10MB/hour, even if you work 160 hours a month using the 4G phone you are at 1.6GB/month, which costs about EUR 7/month.

I happen to use various Macs as client machines, but their role is mostly a thin client with occasional web browsing.

This VDI approach allows the Mac specs to be quite low (one of my Macs was bought in 2009). In any case, if I ever need to upgrade because of software becaming heavier, I just need to change the AWS instance type.

Re:Try Out Rust IDE Support in Visual Studio Code by ivuicuviudfiv on Friday August 18, 2017 @07:33PM (#15050556)
> 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 :-)

Re:Try Out Rust IDE Support in Visual Studio Code by DiThi on Saturday August 19, 2017 @08:03AM (#15052924)
It's an atom addon called local-history. It seems there's a VS code addon of the same name with the same functionality.
Re:Try Out Rust IDE Support in Visual Studio Code by laythea on Saturday August 19, 2017 @05:17AM (#15052484)
This sounds very wasteful unless it is doing diffs in the background. In which case, git would be better.
Re:Try Out Rust IDE Support in Visual Studio Code by DiThi on Saturday August 19, 2017 @08:09AM (#15052952)
It 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.
Re:Try Out Rust IDE Support in Visual Studio Code by Mad_Mac on Friday August 18, 2017 @03:55PM (#15049241)
It'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.

Re:Try Out Rust IDE Support in Visual Studio Code by josteink on Friday August 18, 2017 @04:47PM (#15049606)
3 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...

Re:Try Out Rust IDE Support in Visual Studio Code by Vinnl on Saturday August 19, 2017 @05:54AM (#15052576)
I'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.

Re:Try Out Rust IDE Support in Visual Studio Code by DiThi on Friday August 18, 2017 @06:17PM (#15050193)
While I think he should have learn his lesson before, also I think it should show the list of files it would delete.
Re:Try Out Rust IDE Support in Visual Studio Code by fzukfzjk on Friday August 18, 2017 @04:27PM (#15049462)
He 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.