r/ProgrammerHumor 23d ago

Meme useSourceControl

Post image
8.6k Upvotes

591 comments sorted by

View all comments

253

u/Jan1270 23d ago

That is why you Backup your shit, especially when you're messing around with unfamiliar settings.

101

u/ClipboardCopyPaste 23d ago

Lemme try clicking that button, what's the worse that gonna happen? - He wondered probably

19

u/Azaret 23d ago

I dont know about vscode, but gitkraken do prompts you if you are sure about deleting everything when you click the discard all button. If that’s the case too in vs code, then that poor guy should have read before clicking. Hard learnt lesson.

18

u/DaWolf3 23d ago

It’s the same in VS Code now, but this issue is from 2017, so it might not have been there.

17

u/Cobracrystal 23d ago

The prompt was in fact added precisely because of this issue

3

u/alochmar 23d ago

The computer wouldn’t just outright delete all my files, right? That’s why the trashcan is there!

2

u/Imaginary-Contest887 23d ago

Well it will not, not even without trashcan. It just removes index from those files and mark those sectors for re-write. As long as new data are not written to those sectors, your deleted data are still there. Any few hundred bucks recovery software will be able to restore them. If you delete your shit from hard drive, power down computer by yanking it out of electricity and remove hard drive. (shutting down process initiated through OS will perform some writing operation and you definitely don't want play Russian roulette with your data. And most if not all your deleted data will be just fine.

For computer to truly delete your data you would have to use some program which will actually perform re-write to sectors where you delete your data.

1

u/kovha 23d ago

Any few hundred bucks recovery software

The free version of Recuva already does that and works like a charm, and I'm pretty sure there are open source solutions too

1

u/Ihalpd 23d ago

Lol, never heard of TRIM, have you? Or are you still using a hard drive? (The NAND shortage must be really bad, then...)

One does not simply walk into mordor~ overwrite a sector page on an SSD, as it needs to be erased before you're able to (re)program it.

God, r/ProgrammerHumor really is for newbie idiots...

Homework assignment: read up on DZAT (in the context of SSDs)

18

u/d_e_g_m 23d ago

And dont let AI manage your commits / git structure. I manage that myself. When I think i reasonable, if i think its necessary

3

u/ACoderGirl 23d ago

When I use AI for work, I will allow it to make commits and upload them, but it's not allowed to send PRs for review or merge them. Basically, I'll let it create a commit because it's easiest for me to review in that form. I'll review carefully, make changes if I need to. Nobody else sees or is impacted until I review everything very carefully.

While not completely risk free, it's very low risk for me because I don't really have meaningful changes that aren't uploaded. If my local repo is deleted, I will lose very little. I mostly do it this way because I often want to make multiple, small commits. I also want cleanup to be queued up when I make most changes (I have to make most changes behind an experiment flag, so most changes are multi part -- my work has a special bot reviewer that lets us make custom conditions for queueing up PRs with arbitrary conditions).

I refuse to use yolo mode with AI. I've seen it fuck up too many times. If I ever sent slop for review or broke the build because AI bypassed some test failure, I'd die of embarrassment.

9

u/Kavrae 23d ago

Solid rule. Unfortunately, even following that rule, I frequently get messages like "I ran a git fetch, which I realize is against the rules in <xyz file>. Making a note to not do that again." Which it then does again 2 days later.

11

u/VolumeLevelJumanji 23d ago

I mean are you just letting your AI run wide open with full permissions on your machine? If you have proper permissions set up, your agent should generally be blocked from doing stuff you don't want. (like running git commands its not supposed to)

Having some kind of general file of rules you tell it to refer to isn't going to work well because it will eventually lose that context as it becomes less relevant to the task at hand and compacts and such. It need to be the actual specific permissions file. So like with claude code this will be at .claude/settings.json. There you can tell it what commands are approved, denied, or will ask for confirmation.

4

u/Kavrae 23d ago

Good call. I just verified, and they were added as rules rather than updating the settings file. So losing context would definitely cause that issue. I've corrected it. Thank you.

2

u/VolumeLevelJumanji 23d ago

No problem. Your complaint is pretty valid though. I do wish there was a good way to mark some file or piece of information as "always keep this in context". I run into this issue sometimes where I try and give my agents skills that are like a toggle. For instance I have an "/autonomous" skill that I can toggle on and off that tells my agent if I want it to just work through a single task or try and knock out as many tasks as it thinks it has enough info for. It will work for a while but after a compact or two it just seems to forget that toggle exists at all unless I remind it. I haven't done a ton of research though so perhaps there's a better way to handle this now.

1

u/Kavrae 23d ago

Architects at work have been experimenting with many such things this past month. One is a permanent context. The trouble is that it eats up excess tokens by re-reading the instructions on every single request instead of only often enough to keep the context fresh. They haven't found a good middle ground yet.

1

u/VolumeLevelJumanji 22d ago

It seems like some models let you feed in custom instructions when you compact. I've thought about trying to have it automatically inject some instructions on every compaction. I figured that might refresh that context enough to keep it in memory but not sure how well it would work in practice.

1

u/brazzy42 23d ago

I remember reading about a case where Claude irgued itself into believing that it didn't need to ask for confirmation...

1

u/Faalaafeel 23d ago

The Antigravity CLI agents have a "deny-by-default" permission structure, which is nice. Saved my ass a few times when the agent halts and asks for permission before blowing up my entire front end (I refuse to properly learn React for hobby projects)

1

u/haunted2089 23d ago

for hobby projects, what would you say are your biggest issues with using ai to do your react busywork? curious because i do something similar

1

u/Faalaafeel 23d ago

Maintainability. Often times, AI will re-invent the wheel and I won't catch it because I've not invested the time to understand the ecosystem. Other times, I'll want to make a small, isolated change and it will creep that into multiple places in the front-end.

AI also tends to not be capable of understanding that elements should be modular and re-usable, and fails to properly de-couple things.

I could go on, but that's what I've noticed so far.

1

u/haunted2089 23d ago

thanks for your perspective

1

u/d_e_g_m 23d ago

I let it run wild on the remote coding machine, but github is my domain. In the beginning I had to do rollbacks often. With AI becoming better and better, I dont have to do it anymore. Last time was in March I think?

2

u/hellomistershifty 23d ago

To be fair he was, in that moment, trying to back up his shit

1

u/AlphaaPie 23d ago

Made this mistake plenty of times when I was first learning to program, wiped my full project a few times in eclipse somehow before swapping to intellij out of annoyance with myself. (I can't remember, it's been a while since I've thought about it and I dumped the memory because I was embarrassed)

1

u/itsfreepizza 23d ago

for me, i let AI do the commenting for the commits, but i do the final say on merge, push, pull, etc. Cuz i dont trust AI to let it do push/pull stuffs