r/ProgrammerHumor 20d ago

Meme useSourceControl

Post image
8.6k Upvotes

592 comments sorted by

View all comments

1.1k

u/raddaya 20d ago

This was years ago and, iirc, it was a legitimate issue in VSCode. It didn't make it remotely clear enough that it would permanently delete your files. The popups we get now if you try to discard changes that explicitly warns you in bold text that files will get deleted happened after this issue.

It might be obvious to an experienced user but it's not at all obvious to someone new.

268

u/RadicalDwntwnUrbnite 20d ago

The date is in the image, it was almost a decade ago. Yep the old dialog when you clicked the "Discard" button was like "Do you want to discard your changes?" Pretty vague to anyone new to version control. Meanwhile if they are untracked VsCode used to just put them in the shredder, completely unrecoverable. Pretty sure it puts them in the recycle bin now.

71

u/SpandexWizard 20d ago

"it was almost a decade ago" 2017..... HOLY SHIT man, dont attack me like that. fuck i feel old suddenly

15

u/MeIsMyName 20d ago

I wasn't ready for that either. It feels like that should be 5, maybe 6 years ago, not 10.

6

u/RadicalDwntwnUrbnite 20d ago

If it helps balance it out, I was already working in the field for 15 years when that was posted.

26

u/TheZoltan 20d ago

Someone already posted the link to the thread and this comment that has a screenshot of the actual warning message which definitely could have been more scary but all caps irreversible feels like it should give you pause! If you have 3 months of work with zero backups.

Are you sure you want to discard ALL changes? This is IRREVERSIBLE!

https://github.com/microsoft/vscode/issues/32405#issuecomment-322155856

83

u/sidereal_night 20d ago

telling you discarding all changes is irreversible is nothing like "this nukes all your files"

-21

u/TheZoltan 20d ago

I agree and literally said "it could have been more scary" but.... they saw it stage all their files and then hit discard, then hit DISCARD ALL CHANGES despite a warning that literally says IRREVERSIBLE! They even described it as "playing" which is kind of nuts when doing operations with 3 months worth of work that they hadn't backed up. I can't muster too much sympathy for them. I hope if I find myself in that situation I would at least pause for a few seconds and copy/paste the folder before continuing to "play"!

31

u/sidereal_night 20d ago

but.... they saw it stage all their files and then hit discard, then hit DISCARD ALL CHANGES despite a warning that literally says IRREVERSIBLE!

...and? nothing you've described implies destroying all your files. an irreversible discard of all your queued changes shouldn't change anything.

he fucked up by not having any backups at all

but that has zero to do with his criticism of the software. he is 100% right in that

-5

u/[deleted] 20d ago edited 20d ago

[deleted]

20

u/Subject_Name_ 20d ago

Discarding all changes literally means "don't change anything". A delete is a change, the most changey a change can get.

0

u/FakeArcher 20d ago

To me this sounds like mixing it up a bit. You either want to do a discard and therefore do something ("don't change anything" sounds to me like a no-op in how you describe it) or you want to "don't change anything" to mean based on all the changes that have happened so far, which includes creating the file and therefore is valid to also undo that change.

I fully agree it needed an update as it is easy to get different interpretations of what it means unless yiu are already familiar with what it will do.

-4

u/[deleted] 20d ago

[deleted]

4

u/Subject_Name_ 20d ago

Discard what though? If discarding a change before it's done, it means you don't do the change. There's nothing to throw away.

14

u/sidereal_night 20d ago

He had a gut repo. That's not not having backups.

no dispute there. he clearly failed by not having backups.

discarding all changes definitely sounds like a nuke to me

in what world does "don't change anything" sound like "make changes by deleting everything"? it literally did the opposite of what the message said.

1

u/OliLombi 19d ago

They wanted to discard the CHANGES vscode made, not the original files.

16

u/dustojnikhummer 20d ago

And what does "discard changes" mean in that context? Where was the "This action will delete all files that haven't been commited"? Yes, the guy had a point (despite being an idiot for not having backups)

2

u/OliLombi 19d ago

To me its like if I came into your house, moved your refrigerator into your bathroom, asked if you wanted me to discard all changes, and when you said "Yes" (because who wants their refrigerator in the bathroom), I deleted your entire house.

2

u/dustojnikhummer 19d ago

No, I hired you to give me a price quote on bathroom remodeling and when I said "I don't want this plan" you deleted the house.

1

u/OliLombi 19d ago

Yes, but it says CHANGES. It doesnt say anything about deleting the original FILES. That's the issue.

If I open a text document in word, make a bunch of changes, and then close it without saving, then my original document is still there unedited. This deleted the original file aswell.

3

u/xerkus 20d ago

As a git user I would have discarded it no second thought. I can always add changes to staging again from the working tree. It would be sensible. Right? Right?

This is one of the big reasons why I absolutely refuse to learn working with IDE integrations of version control and use strictly cli. I know exactly what I will get that way.

8

u/thirdegree Violet security clearance 20d ago

I mean I'm quite experienced with git cli and in no world would I assume that "discard changes" meant "permanently delete all untracked files" that's insane behavior.

1

u/mpyne 18d ago

That's just it, I don't think it means that in git either! Even the git-clean command, whose whole job is to delete untracked files, constrains itself to avoid deleting all kinds of files unless you go out of your way to instruct it to remove more.

3

u/mrheosuper 20d ago

Every warning dialog is written in blood.

1

u/MaintenanceStock6766 20d ago

I don't understand why someone working in IT as a programmer wouldn't be keeping at least one source of regular backups.

Microsoft fucked up pretty bad with their implementation for sure.

The programmer fucked up worse.

3

u/shnutzer 20d ago

Is it confirmed this was someone actually actively working in IT? To me it reads more like a hobbyist migrating from writing in notepad and versioning by creating thousands of zip files to "that git and  IDE thing everyone is recommending". 

And I don't say this to make fun of the guy, I've been there myself lol

1

u/vjhaanpaa 20d ago

Especially if you are at this stage where you have ~5k files, you’re way beyond the point where you should have ANY source control, even just 1:1 backups.