this post was submitted on 20 Nov 2024
478 points (100.0% liked)

Programmer Humor

427 readers
15 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 2 years ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] mox@lemmy.sdf.org 104 points 3 months ago* (last edited 3 months ago) (1 children)

In case anyone else is wondering, or simply doesn't like reading screen shots of text, this is apparently a real report:

https://github.com/microsoft/vscode/issues/32405

[–] Maven@lemmy.zip 4 points 3 months ago

This link was included in the post but I realize that "source" was probably not the best label for it. Updated to make it more clear.

[–] AnAmericanPotato@programming.dev 85 points 2 months ago (8 children)

I feel bad for this kid. That really is a bad warning dialog. Nowhere does it say it's going to delete files. Anyone who thinks that's good design needs a break.

Half the replies are basically "This should be obvious if your past five years of life experience is similar to mine, and if it isn't then get fucked." Just adding insult to injury.

[–] Omega_Jimes@lemmy.ca 44 points 2 months ago (3 children)

I'm not great at English, but "discard all changes" shouldn't ever mean "Delete".

[–] Michal@programming.dev 28 points 2 months ago (3 children)

In the context of version control it does. Discarding a change that creates a file means deleting the file.

load more comments (3 replies)
[–] stebo02@lemmy.dbzer0.com 4 points 2 months ago (1 children)

I'm pretty sure vscode shows a confirmation dialog when discarding changes will permanently delete a file. I've done that recently with temporary files that were no longer needed.

load more comments (1 replies)
load more comments (1 replies)
[–] cocobean@bookwormstory.social 26 points 2 months ago (1 children)

Also, why not send them to the recycle bin? I never really thought about it before, but that does seem a reasonable UX improvement for this case

[–] murtaza64@programming.dev 3 points 2 months ago

I wonder if there's already a git extension to automatically stash the working tree on every clean/reset/checkout operation...

[–] JackbyDev@programming.dev 4 points 2 months ago

It's so fucking infuriating that so many devs act like this. "This should've been obvious!" Fuck off, that's an unhelpful statement. "You should've been using version control! No backup, no sympathy!" Fuck off, they were literally trying to begin using version control for backups.

Even half the comments on this very Lemmy thread are disparaging this dev. I wonder how many actually read the thread and found that there was a bug discovered causing this feature to delete files not even associated with git?

But, congratulations to them, I suppose. Congratulations on making fun of someone. I hope it makes them feel powerful. 🙄 Devs can be so toxic.

load more comments (5 replies)
[–] _____@lemm.ee 68 points 2 months ago (5 children)

let's turn this into a constructive angle for future devs and current juniors: just learn git cli, I promise you it is much simpler than it seems.

all those memes about git having like a thousand commands are true, but you really will only use like 7 at most per month.

learn push, pull, merge, squash, stash, reset, im probably missing like one or two

I promise you again: it is much simpler than it seems. and you won't have to use these stupid git GUI things, and it will save you a hassle because you will know what commands you are running and what they do

short disclaimer: using git GUI is totally fine but low-key you are missing out on so much

[–] sour@feddit.org 38 points 2 months ago

im probably missing like one or two

commit. Lol

[–] TechieDamien@lemmy.ml 7 points 2 months ago
[–] Piatro@programming.dev 6 points 2 months ago

The main draw to the CLI for me is portability. I've been a dev for ten years now and used tons of different editors on different platforms and while each one had a different way to describe the changes, how to commit, or how to "sync" (shudder), the CLI hasn't changed. I didn't have to relearn a vital part of my workflow just because I wanted to try a different editor.

[–] Cethin@lemmy.zip 5 points 2 months ago* (last edited 2 months ago)

Personally, I'm pretty good with the CLI version, but sometimes I just use the Code VC interface. For some tasks (basic commit, pull, push) it's pretty fast. I don't know if it's faster than CLI, but I switch between them depending on what I'm doing at that moment. Code has a built in console, so using either is pretty seemless and easy. If you only use the GUI you won't ever understand it though. I think everyone should start with CLI.

Honestly, this is true for almost everything. GUIs obfiscate. They don't help you learn, but try to take control away so you can't mess up, and as an effect can't do everything you may want.

load more comments (1 replies)
[–] joyjoy@lemm.ee 43 points 3 months ago (3 children)

Say you don't know how to use git without saying you don't know how to use git.

[–] ChaoticNeutralCzech@feddit.org 24 points 3 months ago* (last edited 2 months ago) (2 children)

That's what happens when people stumble across that website called GitHub, get hooked and now have unrealistic expectations for the real git.

"I just installed Git for Windows. Where is the drag-to-upload box?"

— A statement dreamt up by the utterly deranged

Real git involves a lot of sweat, requires you to clean up any mess you make, and communicate with any partners about their preferred techniques instead of rawdogging it and waiting for issues. The pushing and pulling will come naturally but you need to know how and when to release, and be clear about how you wish to commit. Nightly is an option but good luck getting everyone on board. People might judge you for using the word "master" but it should be alright in private.

[–] BearOfaTime@lemm.ee 7 points 3 months ago (1 children)

People might judge you for using the word "master" but it should be alright in private.

I snorted. It was my inner 12-year-old's fault. (Also because of recently some idiots getting up in arms about these terms in technology.)

load more comments (1 replies)
[–] 4am@lemm.ee 6 points 2 months ago

involves a lot of sweat, requires you to clean up any mess you make, and communicate with any partners about their preferred techniques instead of rawdogging it and waiting for issues. The pushing and pulling will come naturally but you need to know how and when to release, and be clear about how you wish to commit. People might judge you for using the word "master" but it should be alright in private.

Don’t talk about my mom that way

[–] bjorney@lemmy.ca 11 points 2 months ago (3 children)

Git doesn't automatically recursively add all files in the directory to the repository though - VSCode decided that should be the default behavior, while other editors (intellij) ask if you want to add newly created files to version control

load more comments (3 replies)
[–] Kaeru@slrpnk.net 8 points 3 months ago (1 children)

Alright you convinced me its time to pick up this skill. How does one best learn git? Just play around with it and break things?

[–] LordPassionFruit@lemm.ee 5 points 3 months ago

That's basically how I did it.

To properly learn it using this method, create a directory that contains only text files and sub directories and treat it like a real project. Add files, delete them, play around with updating the repository. Try and go back a few updates and see how the things react. Since it's not a real project there's no risk of loss, but you'll still get to see the effects of what you do.

[–] onlinepersona@programming.dev 40 points 3 months 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

[–] Zagorath@aussie.zone 24 points 2 months ago

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".

[–] CosmicTurtle0@lemmy.dbzer0.com 10 points 2 months 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.

[–] rothaine@lemm.ee 13 points 2 months ago (2 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.

load more comments (2 replies)
[–] dragonfucker@lemmy.nz 3 points 2 months ago

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

[–] RobotZap10000@feddit.nl 37 points 2 months ago (4 children)

5000 files

0 backups

Someone's got their priorities mixed up.

[–] TheNSFWConnoisseur@lemmynsfw.com 15 points 2 months ago (1 children)

having 5000 backups of 0 files is also kinda pointless.

load more comments (1 replies)
[–] QuazarOmega@lemy.lol 9 points 2 months ago

You have to lose it all to know what matters (speaking from experience 😭)

load more comments (2 replies)
[–] JackbyDev@programming.dev 34 points 2 months ago

I fucking HATE when abstractions over git use cutesy names that git doesn't use.

[–] jlow 28 points 3 months ago (2 children)

Backups, backups, backups.

load more comments (2 replies)
[–] GammaGames 21 points 3 months ago

Screenshots of git issues are one of my favorite genres of meme

[–] computerscientistII@lemm.ee 18 points 2 months ago

No backup, no sympathy.

[–] sabreW4K3@lazysoci.al 18 points 3 months ago (2 children)

Doing a git clean is a dick move.

[–] BatmanAoD@programming.dev 13 points 3 months ago (1 children)

The user clicked an option to "discard" all changes. They then got a very clear pop-up saying that this is destructive and cannot be undone (there's a screenshot in the thread).

[–] Peer@discuss.tchncs.de 20 points 3 months ago (1 children)

I very much understand how one can think this would revert any changes done to files under version control but not delete the ones that are not. I believe this dialog has since been updated to explicitly state that fact.

[–] BatmanAoD@programming.dev 7 points 2 months ago

Yes, the dialog was changed, as part of this linked issue (and maybe again after that; this whole incident is very old). After reading some of the comments on that issue, I agree with the reasoning with some of the commenters that it would be less surprising for that menu option to behave like git reset --hard and not delete tracked files.

[–] astrsk@fedia.io 5 points 3 months ago

Yeah, real developers do git clean -dxf.

[–] Bougie_Birdie@lemmy.blahaj.zone 15 points 3 months ago

Often times, people learn that the stove is hot by touching it.

It's easier to blame the stove than the person who touched it. But if you laugh when you watch it happen, you're probably not laughing at the stove.

[–] Artyom@lemm.ee 14 points 2 months ago (1 children)

If you ever happen to have 5000 uncommitted files, you shouldn't be asking yourself if you should commit more often. You should be asking yourself how many new repos you should be making.

load more comments (1 replies)
[–] MystikIncarnate@lemmy.ca 12 points 2 months ago (1 children)

While I have some sympathy for anyone who loses months of work, as an IT administrator by day, all I have to say about their lack of backups, and lack of RTFM before messing with shit is:

HAHAHAHAHAHAHA HAHAHAHAHA. you got what you deserved fucker. GL.YF.

load more comments (1 replies)
[–] joewilliams007@kbin.melroy.org 8 points 3 months ago

please fix uwu

[–] MonkeMischief@lemmy.today 7 points 2 months ago (1 children)

Man I get paranoid about synchronization programs for this very reason. There's usually some turnkey easy-mode enabled as soon as you first launch that's like:

"Hey you wanna back up your entire NAS to your phone?! That'll be fun, right?!"

And you're like "...No."

And then it wants to obliterate everything so it's all "synchronized", often it's not easy to find a "No, stop, don't do anything at all until I configure this." Option.

iTunes was SO BAD about this.

Syncthing is the least-bad sync software I've ever run. It's got some footguns but it's still brilliant.

I would imagine there's still ways to back up version controlled software right?

load more comments (1 replies)
[–] PanArab@lemm.ee 6 points 2 months ago* (last edited 2 months ago)

So VS Code isn't just slow and bloated, it also deletes your files. So glad I was turned off by its excessive memory consumption and deleted it before it deleted my files.

Edit: also why I only ever used git from the command line, I never found a git UI that is easy to understand, and never trusted them.

[–] josefo@leminal.space 4 points 2 months ago (1 children)

Fuck around things you don't understand, find out. Why even go near the source control area and start clicking stuff if you don't know jack shit about it.

[–] rothaine@lemm.ee 21 points 2 months ago (1 children)

It seems like he was trying to learn though? He clicked it, like "hell yes I want source control, let's figure this out"

"It says all my files are changed? Oh shit why did it change my files? Shit fuck, undo, how do I undo...Do I want to discard the changes? I don't even know what it changed. Yes please undo whatever changes you did to my files"

And poof.

[–] ByteOnBikes@slrpnk.net 3 points 2 months ago* (last edited 2 months ago) (1 children)

Who learns with five thousand files though?

load more comments (1 replies)
load more comments
view more: next ›