this post was submitted on 20 Nov 2024
854 points (97.4% liked)

Programmer Humor

19735 readers
230 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
[–] zarlin@lemmy.world 326 points 1 week ago (2 children)

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

[–] Mixel 102 points 1 week ago (7 children)

I have heard things from another apprentice who just does not use version control at all and the only copies are on his laptop and on his desktop. He is also using node.js with only 1 class and doesn't know about OOP (not sure if you even use that in js no clue 😅) and has one big file with 20k lines of code I have absolutely no clue how he navigates through it

[–] e8d79@discuss.tchncs.de 85 points 1 week ago (4 children)

I know the type. Usually the kind of confident know-it-all who refuses to learn anything but delivers changes really quickly so management loves them. I had the misfortune to fix such a project after that 'rock-star' programmer left the company. Unfortunately the lack of professional standards in our industry allows people like that to continuously fail upwards. When I left the project they rehired them and let them design the v2 of the project we just fixed.

[–] RagingRobot@lemmy.world 25 points 1 week ago

My company for the longest time had two engineers they would give all the new projects to. They would rush through some prototype code as fast as they could then management would bring in a new team to take the project over. The code was always garbage and crammed into one place. I kept getting new projects and instead of starting from a nice clean slate we always had to build on that garbage. It sucked so bad.

load more comments (3 replies)
load more comments (6 replies)
load more comments (1 replies)
[–] mox@lemmy.sdf.org 169 points 1 week ago* (last edited 1 week ago) (2 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

[–] eating3645@lemmy.world 125 points 1 week ago (2 children)

Steps to Reproduce:

1.Go near this fucking shit editor.

2.Commit the deadly sin of touching the source control options.

🤣

[–] jmcs@discuss.tchncs.de 89 points 1 week ago (13 children)
  1. Ignore the scary warning VS Code shows you when you press the button.
[–] Hawke@lemmy.world 109 points 1 week ago (13 children)

I dunno, “discard changes” is usually not the same as “delete all files”

[–] bleistift2@sopuli.xyz 32 points 1 week ago (1 children)

Nowadays the warning even says that this cannot be undone. Maybe that wasn’t present in 1.15, though.

It was. If you go through the OP thread, one of the responses is a picture of the dialog window that this user clicked through saying, "these changes will be IRREVERSIBLE".

The OP was just playing with a new kind of fire (VSCodes Git/source control panel) that they didn't understand, and they got burned.

We all gotta get burnt at least once, but it normally turns us into better devs in the end. I would bet money that this person uses source control now, as long as they are still coding.

load more comments (12 replies)
load more comments (12 replies)
load more comments (1 replies)
load more comments (1 replies)
[–] AnAmericanPotato@programming.dev 142 points 1 week 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 69 points 1 week ago (5 children)

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

[–] Michal@programming.dev 30 points 1 week ago (4 children)

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

load more comments (4 replies)
load more comments (4 replies)
[–] cocobean@bookwormstory.social 42 points 1 week ago (4 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

load more comments (4 replies)
load more comments (6 replies)
[–] _____@lemm.ee 121 points 1 week ago (22 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 66 points 1 week ago (1 children)

im probably missing like one or two

commit. Lol

load more comments (1 replies)
load more comments (21 replies)
[–] joyjoy@lemm.ee 67 points 1 week ago (9 children)

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

[–] ChaoticNeutralCzech 28 points 1 week ago* (last edited 1 week ago) (7 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.

load more comments (7 replies)
load more comments (8 replies)
[–] Havald@lemmy.world 65 points 1 week ago (1 children)
[–] Beacon@fedia.io 22 points 1 week ago (8 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

[–] Maven@lemmy.zip 58 points 1 week ago* (last edited 1 week ago) (20 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@lemmy.world 88 points 1 week ago (3 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."

load more comments (3 replies)
load more comments (19 replies)
[–] ArbiterXero@lemmy.world 29 points 1 week ago (7 children)

The problem is that these are “source control basics” that everyone needs to learn the hard way once it seems.

Waiting 3 months in between commits however is a really bad rookie mistake because you were worried about making a commit that wasn’t perfect.

load more comments (7 replies)
load more comments (6 replies)
[–] RobotZap10000@feddit.nl 59 points 1 week ago (4 children)

5000 files

0 backups

Someone's got their priorities mixed up.

load more comments (4 replies)
[–] JackbyDev@programming.dev 51 points 1 week ago

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

[–] onlinepersona@programming.dev 49 points 1 week ago (6 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 36 points 1 week 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".

[–] madcaesar@lemmy.world 28 points 1 week ago (8 children)

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

load more comments (8 replies)
load more comments (5 replies)
[–] Korne127@lemmy.world 45 points 1 week ago (2 children)

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

load more comments (2 replies)
[–] AusatKeyboardPremi@lemmy.world 39 points 1 week ago* (last edited 1 week ago) (3 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 (3 replies)
[–] mvirts@lemmy.world 38 points 1 week 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.

[–] LengAwaits@lemmy.world 38 points 1 week ago (7 children)

Looks like someone forgot about the 3-2-1 rule. Teachable moment.

load more comments (7 replies)
[–] Phoenix3875@lemmy.world 35 points 1 week 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.

load more comments (3 replies)
[–] LANIK2000@lemmy.world 30 points 1 week ago (17 children)

Honestly no idea why someone would go around a completely unknown menu in a new unknown editor and randomly click things with caution completely out the window. Not having a copy or trying a blank project, not even reading any messages. I mean even if we don't know it's a nuke button, God knows what other edits it could do to your code without you knowing.

This goes beyond rookie mistake. This is something 12 year old me would do. Same with the issue page being 90% swear words.

load more comments (17 replies)
[–] jlow@beehaw.org 28 points 1 week ago (1 children)

Backups, backups, backups.

load more comments (1 replies)
[–] bitwolf@sh.itjust.works 28 points 1 week ago (16 children)

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

load more comments (16 replies)
[–] aliser@lemmy.world 28 points 1 week ago (10 children)

deleted a chunk of my work the other day by pressing Ctrl z in windows explorer. my project was without source control installed (cuz it was in Dev stage), and Ctrl shit z/Ctrl y hotkeys didn't work, so that chunk was just gone, persished forever... or so I though. I remembered vs code having a file history under some panel. found it, and here it was - at least some of the latest history of my file. lesson learned: even in Dev where nothing is yet working, finish your day of coding with a commit to a remote repo.

load more comments (10 replies)
[–] sabreW4K3@lazysoci.al 21 points 1 week ago (4 children)

Doing a git clean is a dick move.

load more comments (4 replies)
[–] Artyom@lemm.ee 21 points 1 week ago (3 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.

[–] Korne127@lemmy.world 40 points 1 week ago (5 children)

The person didn’t have any git repository; probably a new programmer that didn’t know how version control works and just clicked discard without understanding what that means in this situation.

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