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

Programmer Humor

19630 readers
83 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
top 50 comments
sorted by: hot top controversial new old
[–] mindbleach@sh.itjust.works 13 points 1 day ago (1 children)

Fuck all victim-blamers. "Discard" is not how you label a button that permanently erases anything.

[–] ByteOnBikes@slrpnk.net 1 points 21 hours ago* (last edited 21 hours ago) (1 children)

But it didn't erase everything permanently.

We talk about the swiss cheese method in risk management.

This guy hit multiple layers of failure, and he absolutely could recover from it. But instead of getting help, rant about it for all of us to laugh at.

[–] mindbleach@sh.itjust.works 1 points 21 hours ago

User disagrees.

[–] Phoenix3875@lemmy.world 38 points 1 day ago (3 children)

Reminds me of a hilarious bug in early GHC: https://gitlab.haskell.org/ghc/ghc/-/issues/163

The compiler will delete your source file if there's any compile error. And the user complained only by sending a very polite email to report this bug. Simon Peyton Jones mentioned it in one of his talks and I still find it quite hilarious till this day.

[–] fibojoly@sh.itjust.works 10 points 1 day ago

Left the --hardcore compile option on. Easy mistake.

[–] blarg@programming.dev 8 points 1 day ago

Software development: hardcore mode

load more comments (1 replies)
[–] MystikIncarnate@lemmy.ca 22 points 1 day ago (3 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.

[–] voldage@lemmy.world 7 points 1 day ago

Yeah, it's bad enough that it could happen, the fact they allowed that to happen so easily is far worse.

load more comments (2 replies)
[–] MonkeMischief@lemmy.today 18 points 1 day ago (2 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?

[–] mindbleach@sh.itjust.works 4 points 1 day ago

iTunes would stomp all over your hard drive, fucking up every MP3 file it could find, and then refuse to believe you could have one copy of a file. Either it's on your iPod and your computer, or it's getting dragged behind the woodshed.

Give me sync software that only ever increases redundancy.

load more comments (1 replies)
[–] bitwolf@sh.itjust.works 31 points 1 day ago (3 children)

It does warn you it will erase the file when you discard...

[–] JackbyDev@programming.dev 18 points 1 day ago (2 children)

Go read the actual thread. There was a bug someone found that files you have in there that aren't even associated with git still get deleted. I'm not entirely convinced this was the poster's fault.

[–] Scoopta@programming.dev 11 points 1 day ago (1 children)

It's not a bug, it's intentional. They consider changes to be any change since the last commit including in untracked files. They did update it to make this behavior a lot more obvious though.

[–] JackbyDev@programming.dev 7 points 1 day ago (1 children)

This comment in particular does a great job of explaining the UX problem with this. https://github.com/microsoft/vscode/issues/32459#issuecomment-322160461

[–] Scoopta@programming.dev 6 points 1 day ago

Yes, honestly this situation reminds me a lot of the LTT trying Linux and destroying his system by installing steam despite apt warning him in the best way it really could that he probably didn't want to do that. Sure the package shouldn't have been in that state in a stable distro but shit happens. It goes to that point of, users will go through great lengths to achieve the end goal blindly jumping past warnings on the way no matter how dire they might be.

load more comments (1 replies)
[–] kalpol@lemmy.world 15 points 1 day ago (9 children)

Warns you that changes will be discarded....not quite the same words

load more comments (9 replies)
load more comments (1 replies)
[–] AusatKeyboardPremi@lemmy.world 41 points 1 day ago* (last edited 1 day ago) (4 children)

I always found Git GUIs, especially the ones built into IDEs, to be more confusing and clunkier than working with Git on a terminal. It often feels like unlearning what one knows about Git, and relearning it the way that specific GUI demands.

Heck, I am going through the aforementioned feeling as I force myself to use Magit on Emacs. It just does not feel intuitive. But I will not give up until I have made an honest and full attempt.

The only sensible Git GUI I ever used is Sublime Merge[0], after a coworker praised it immensely. Even that is reserved for the rarest of the rare times when the changes in the workspace gets unwieldy and unruly. For every other instance: Git CLI on a terminal.

[0] https://www.sublimemerge.com/

E: typo, and link to mentioned GUI.

load more comments (4 replies)
[–] _____@lemm.ee 122 points 1 day ago (24 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 68 points 1 day ago (1 children)

im probably missing like one or two

commit. Lol

load more comments (1 replies)
[–] lurklurk@lemmy.world 17 points 1 day ago

You get pretty far with just clone, pull, add, commit, push

load more comments (22 replies)
[–] RobotZap10000@feddit.nl 62 points 1 day ago (5 children)

5000 files

0 backups

Someone's got their priorities mixed up.

[–] TheNSFWConnoisseur@lemmynsfw.com 25 points 1 day ago (1 children)

having 5000 backups of 0 files is also kinda pointless.

load more comments (1 replies)
load more comments (4 replies)
[–] hakunawazo@lemmy.world 9 points 1 day ago
[–] AnAmericanPotato@programming.dev 147 points 1 day ago (12 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 72 points 1 day ago (9 children)

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

load more comments (9 replies)
[–] JackbyDev@programming.dev 6 points 1 day 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 (10 replies)
[–] DelightfullyDivisive@lemmy.world 12 points 1 day ago (1 children)

I'm sure that the "three months of work" was completely shit code. Anybody who is unfamiliar with source control (or even backups!) is prone to making stupid mistakes. Republican voters are likely to have a similar experience over the next 4 years.

[–] xorollo@leminal.space 23 points 1 day ago

What a delightfully divisive statement. We do all need to start somewhere though, and losing months of work is very discouraging!

[–] zarlin@lemmy.world 332 points 2 days ago (13 children)

The real issue is already going 3 months without source control.

load more comments (13 replies)
[–] wowwoweowza@lemmy.world 15 points 1 day ago
[–] Anticorp@lemmy.world 11 points 1 day ago

Why are they messing with the source control options when they're not using source control? Perhaps learn about stuff before you start clicking buttons and performing delete operations on your super critical files?

[–] JackbyDev@programming.dev 53 points 1 day ago

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

[–] kamen@lemmy.world 18 points 1 day ago (9 children)

That has the same energy as complaining that a file manager has "Delete" in the context menu.

[–] Swedneck@discuss.tchncs.de 12 points 1 day ago* (last edited 1 day ago)

except that the "delete" in file managers is actually "trash" and that's for precisely this reason. Anyone not using the trash bin for a GUI that is capable of deleting files is either incompetent or malicious.

frankly rm should default to using the trash bin as well, for desktop-focused distros.

load more comments (8 replies)
[–] mvirts@lemmy.world 39 points 1 day ago

Obligatory mention of file recovery as an option if you get in this situation.I recommend testdisk but there are other more gui friendly options.

NTFS takes a relatively long time to destroy the data so chances of recovery are good on Windows.

[–] LovableSidekick@lemmy.world 2 points 1 day ago

note to self: never use "discard"

[–] computerscientistII@lemm.ee 22 points 1 day ago

No backup, no sympathy.

[–] mox@lemmy.sdf.org 169 points 2 days ago* (last edited 2 days ago) (30 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

load more comments (30 replies)
[–] Korne127@lemmy.world 46 points 1 day ago (2 children)

Poor guy basically did a git reset —hard HEAD without even a git repository

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