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

Programmer Humor

19663 readers
265 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
902
submitted 2 days ago* (last edited 2 days ago) by [email protected] to c/programmer_humor
you are viewing a single comment's thread
view the rest of the comments
[–] onlinepersona 51 points 2 days ago (2 children)

The reactions here are why people don't join forums, don't ask questions, or choose to learn alone. "duh, I knew that". Yes, the dude didn't, which is exactly why he's frustrated. I think too many have forgotten what it's like to be a beginner and make a fatal mistake, which would explain the mocking responses here and things like recommending new linux users Arch.

Anti Commercial-AI license

[–] [email protected] 37 points 2 days ago (1 children)

I understand the impulse to be empathetic and kind. But it's very hard to respond in good faith to someone who just made a post where more than half the words are "fuck you".

[–] [email protected] 29 points 2 days ago (1 children)

A feature that permanently deletes 5000 files with one click without warning deserves a fuck you.

[–] BatmanAoD 20 points 2 days ago (4 children)

It had a reasonably clear warning, though; a screenshot is included in this response from the devs. But note that the response also links to another issue where some bikeshedding on the warning occurred and the warning was ultimately improved.

[–] [email protected] 14 points 2 days ago (3 children)

I disagree that that warning is reasonably clear. Even the comment that included it has the line of thought, where the user, not knowing what terms git uses thinks that they just did an action that is going to change each of their files. It makes sense that they'd want to discard those changes. That user then goes on with some snark about not wanting to learn any more about what they are playing with and that other programs would do the same, but "discard changes" seems like it would have a clear meaning to someone who doesn't know git.

The warning says it isn't undoable but also doesn't clarify that the files themselves are the changes. Should probably have a special case for if someone hits discard changes on a brand new repository with no files ever checked in and hits discard on a large number of files instead of checking them in. Even a "(This deletes all of the local files!)" would make it clear enough to say what the warning is really about.

[–] BatmanAoD 2 points 1 day ago (2 children)

Well, yeah, that's why the linked ticket led to a massive improvement:

[–] [email protected] 2 points 1 day ago

That's way better. His sacrifice benefited others in the end.

[–] BatmanAoD 1 points 1 day ago

(I haven't checked what the warning says today.)

[–] [email protected] 8 points 2 days ago (1 children)

Even if you know git, you wouldn't assume that "discard all changes" affects untracked files. It's bad design all around

[–] BatmanAoD 1 points 1 day ago

That depends on what you map "discard" to in your mental model. Whoever designed the VSCode feature chose to associate it with reset+clean, rather than just reset. Presumably that's why they called the menu option "discard" rather than "reset". (But I agree that this is a surprising choice, and that they managed to make an already-famously-bad UX even worse.)

[–] GetOffMyLan 4 points 2 days ago

My git gui has a tick box on that prompt to specifically include added files. I now see why haha

[–] [email protected] 18 points 2 days ago

OK this is hilarious

When you sell hammers you'll likely have people using them to hit their own heads, which, understandably, they will put the hammer at fault. Now, we already put a big don't hit this on your own head label on our hammer. Should we actually prohibit people from head hitting with our hammers? Probably not, since some users still want to hit heads with it. It's just how hammers work.

[–] [email protected] 2 points 1 day ago (1 children)

"Discard changes" is usually equivalent to "cancel" or "quit without saving". Not shift+delete files lol.

[–] BatmanAoD 1 points 1 day ago* (last edited 1 day ago)

Well, yeah, that's why they updated the warning pop-up. It's still the case that the user didn't bother to find out what the warning meant before choosing the inherently destructive option.

Here's the revised pop-up, according to the linked ticket:

I haven't checked the current behavior (this whole incident was seven years ago).

[–] [email protected] 4 points 2 days ago (1 children)

If you have no idea what Git is, that warning message is not telling you you’re about to delete 5000 files.

But I wonder if this person maybe does know about Git because they used the word „stage“.

[–] BatmanAoD 1 points 1 day ago

If you don't know what git is, you should probably avoid choosing the "confirm" option when you're warned that an operation is dangerous.

That said, I think the change they ultimately made in the linked issue, which words the warning differently and, more importantly, provides an option to only discard changes to already-tracked files, is a vast improvement.

[–] [email protected] 8 points 2 days ago (2 children)

There is a difference between someone who is new and experiences something like their IDE deletes a file that was unexpected and asking a question about why it did that.

Then there are arrogant assholes who believe their shit doesn't stink and that they couldn't have done anything wrong and it was the IDE's fault for not knowing what they wanted to do versus what they commanded it to do.

The OP is the latter.

[–] [email protected] 20 points 2 days ago (1 children)

I mean, not entirely, and he says he lost months worth of work. Like imagine you know nothing of git:

  • Click buttons in the IDE to add source control.

  • IDE says a bunch of files have been changed.

  • But I don't want to make changes to the files, I want to source control them.

  • Attempt to undo the changes. Click "discard changes" thinking it will put them back to how they were before clicking add source control. Get a warning dialog that this is not undoable, but that's fine because I don't want whatever changes it made to my files anyway.

  • All files are deleted and unrecoverable.

Like that experience sucks balls and it's reasonable that a person wouldn't expect "discard" == "delete". Also, from reading the GitHub thread, apparently at that time VSCode was doing a git clean when you clicked this. Which like...yeah why the hell would it do that lol? I don't think I have ever used git clean in my entire career.

[–] [email protected] 1 points 1 day ago (1 children)

Months worth of work. Going an entire day without committing should never happen. Also, rawdogging it without a backup?

Nope, dude learned a hard lesson. No sympathy. He thought that the rules of data storage don't apply to him and he got boned.

[–] [email protected] 3 points 1 day ago

He did learn a hard lesson, but it sounds like this was exactly what he was attempting to rectify. "This project is pretty important to me. I should probably figure out how to use source control and put it on GitHub" but then by doing so, and due to some arguably poor UX decisions in VSC, destroyed the project.

If someone's trying to learn how to do something you can't just be like "well you should've already known how", you know what I mean?

Well actually, let's qualify that: there are cases where people try to jump right in the deep end. "I'm just learning woodworking! Step 1: build a new deck for my house", like yeah bro what are you doing, let's start with a birdfeeder or something.

But that's not what happened here. He tried to use the built-in GUI, which many would assume would be easier to learn than jumping right to the CLI, and it burned him in a way he didn't even realize was possible.

[–] [email protected] 5 points 2 days ago

He's right, his shit doesn't stink. His decision making was reasonable for a new programmer.