this post was submitted on 20 Nov 2024
585 points (97.6% liked)

Programmer Humor

19623 readers
1712 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
585
submitted 14 hours ago* (last edited 13 hours ago) by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[–] Havald 61 points 14 hours ago (39 children)
[–] [email protected] 22 points 13 hours ago (38 children)

I don't know anything about programming, i came here from /all, but it seems to me that a command that's this permanently destructive warrants a second confirmation dialog message reminding the user that the files will be permanently deleted and not undoable

[–] [email protected] 56 points 13 hours ago* (last edited 13 hours ago) (23 children)

Here is the exact warning that a user had to click through in order to get to where they got:

The warning

[–] Semi_Hemi_Demigod 84 points 13 hours ago (1 children)

That's not a very good dialog box. He didn't make any changes, so discarding them doesn't sound like a problem.

There should be a notice when you enable source control that this will permanently delete all existing files with a checkbox (checked by default) that says "Add existing files to source control."

[–] [email protected] 10 points 12 hours ago* (last edited 11 hours ago) (1 children)

~~He wouldn't have seen the "Discard Changes" button at all if source control wasn't already setup (and detected by VSCode).~~

~~No sane program will delete files when you initialize source control either.~~

As I found later, VSCode did have weird behaviors with source control back then. My experience is more with the latest versions.

[–] [email protected] 12 points 12 hours ago (1 children)

My sibling ran into this issue once. I'm not sure if it's a setting or a default, but vscode would assume they were working in a blank repo until they made a commit.

Sounds like this person had the project (without source control) in another IDE, tried out VSCode, and it assumed that it was all 'changes'. I don't use VSCode, do I can't say for certain, but I know my sibling lost ~4 hours of project set up for the same reason (though they immediately realized it was their fault).

[–] [email protected] 8 points 11 hours ago

Reading your comment and #32459, I realize that VSCode source control did have some major issues back then.

It looks like they have improved though, as the latest VSCode I use doesn't auto-initialize repositories anymore.

load more comments (21 replies)
load more comments (35 replies)
load more comments (35 replies)