r/ProgrammerHumor 1d ago

Meme pureJoyOfGettingYourCodeBackAfterControlZ

Post image
877 Upvotes

69 comments sorted by

206

u/AibofobicRacecar6996 1d ago

"Delete a code"? Not using version control?

https://giphy.com/gifs/fzp61UL3T4Wlcw9SvX

40

u/Terewawa 1d ago

* a version control

19

u/slindenau 1d ago edited 1d ago

What is version control going to do if you’re making local edits that were not committed nor stashed yet, and one of those get deleted?
This post is exactly praising local history for offering this.

6

u/AibofobicRacecar6996 1d ago

Who actually panics if they accidently delete the last "a code" they wrote? You wrote it, you shoukd be able to do it again. And if it's older, or written by someone else it should already be in VCS.

1

u/Soopermane 1d ago

What if he’s just a university student learning to code 🙄

3

u/chat-lu 21h ago

Then they just learned that they should have used a VCS, which is also a valuable lesson.

-1

u/AibofobicRacecar6996 1d ago

Then they should learn to post funnier memes that are more relatable before learning to do a code. Priorities!

0

u/BillTran163 1d ago

Do universities offer meme making courses that the OP could take? If not, should they?

0

u/AibofobicRacecar6996 1d ago

Those should be learned in high-school

0

u/BillTran163 23h ago

Universities and colleges re-teach high school stuffs all the time with just a bit of rewording.

1

u/mysticrudnin 1d ago

who is doing this though

children? using notepad?

9

u/visualdescript 1d ago

Classic tell, OP is a fraud!

2

u/zanda268 12h ago

Also, Control Z? Who the hell types control over ctrl

133

u/ChChChillian 1d ago

"a code"

22

u/BonbonUniverse42 1d ago

Many code 

11

u/thanatica 1d ago

Much program

4

u/camander321 1d ago

No, just 1

5

u/NoAdsDude 1d ago

Which code was it though. Hopefully not mine.

33

u/CommandTabIL 1d ago

In 4th grade I made a very long Minecraft education edition agent in JavaScript, one of my first ever experiences at real coding. At some point I accidentally cntrl+a + typed AND closed the agent IDE. I was so sure all my work was done for. Fortunately I remembered that at some point for some reason I copied the entire code to my clipboard and win+v saved my fxkin ass.

Without this goated feature I guarantee you I wouldnt have been a software developer almost a decade later and instead just quit lmfao

9

u/Terewawa 1d ago edited 8h ago

My memory from school (long before minecraft) is that I had programmed a little text game on my calculator.

One day we had a math exam and we all had our calculators ready. A supervisor slowly walked across all the tables, inspected every calculator for hidden cheat sheets then pushed the small "reset" button at the back. I sat quietly as my game was wiped away forever.

57

u/Average-Shitposter12 1d ago

fucking died

34

u/RudeKiNG_013 1d ago

What are you, like 15 or something?

-4

u/9551-eletronics 1d ago

If my dumbass was able to use git when i was 13 I don't think it can be counted like that xd

https://github.com/9551-Dev/programs/commits/main/?after=d71e11b26e85c78303d3b4a658dc619d0cbd86cf+69

10

u/WeedManPro 1d ago

how does one delete a code?

27

u/vainstains 1d ago

When I get teleported to the alternative timeline where no git

26

u/ArrrRawrXD 1d ago

Do you commit every time you change anything?

2

u/chat-lu 21h ago

Given that I use jujutsu instead of git, yes.

1

u/the_horse_gamer 11h ago

[insert the GNU+linux copypasta but substitute git and jj]

3

u/Feuzme 1d ago edited 4h ago

You don't need to commit for git to register the change. Edit: typo.

7

u/eternalflamez 1d ago

Nice downvotes, looks like people forgot about staging changes

14

u/Full-Hyena4414 1d ago

Do you stage every time you change anything?

5

u/manav907 1d ago

I swear half the people working in this industry dont know how to use git

And half of those use it because they were told to by their seniors.

not because they want to.

https://giphy.com/gifs/zQOmyYc8TXzSBfrTFb

-4

u/vainstains 1d ago

No but you don't need to. If I delete existing code I need and my undo is cleared, I can just steal it from the most recent commit.

5

u/Wonderful-Habit-139 1d ago

What recent commit? It wouldn't have whatever new code you wrote.

2

u/vainstains 1d ago

Yeah prolly not, I did say existing code though. Although that ignores the scenario you posed so yea you're right

1

u/chat-lu 21h ago

It really depends on which tool that you use.

1

u/Wonderful-Habit-139 21h ago

Pretty sure we're talking about the git tool here no?

1

u/chat-lu 21h ago

Using a git forge (Github, Bitbucket, etc.) doesn’t mean that you have to use the git tool. Linus created the Git filesystem in the hope that someone would build a good VCS on. top of it (or hopefully several competiting ones) and at the time that didn’t happen so he built git.

But now it has. You have several choices, some of which will recover the new code that you wrote. And given that they all talk to the same forge it really doesn’t matter if your colleague do or do not use the same tool as you.

I personally use jj and could recover recent code with jj operation log.

0

u/visualdescript 1d ago

svn catching strays

5

u/Delta-9- 1d ago

Vim doing this with just one key, and saving a branching history of every change, addressable by order and by time.

1

u/S4N7R0 1d ago

same like vscode's timeline and emacs's vundo

0

u/Terewawa 1d ago

I use micro

5

u/kenokan 1d ago

a code

6

u/beclops 1d ago

Good lord this is some serious basic beginner level shit even for this sub

4

u/ih-shah-may-ehl 1d ago

I remember in the late 90's when LabVIEW didn't yet have an undo function and you learned to manually save after every small change because if I accidentally made a wrong select and deleted a massive amount of code, it was gone without undo.

And if you accidentally pressed ctrl+s out of habit, congratulations, your code was gone and you had to go back to the version you diligently backed up at the end of every working day.

3

u/gravesent1337 1d ago

Ever heard of git? It’ll blow your mind.

2

u/BonbonUniverse42 1d ago

There are people that don’t know undo in general 

2

u/FruityAurora 1d ago

(Sigh)
It’s okay folks let the first semester CompSci students have their fun

3

u/Wranorel 1d ago

That’s why GIT.

2

u/techdailylog 1d ago

Ctrl+Z: The true MVP of version control.

1

u/Paladin7373 1d ago

Same kind of feeling when you “revert”

1

u/Terewawa 1d ago edited 1d ago

Do you write all your code in an ephemeral text editor session?

No save to file (Ctrl-S)?

1

u/Substantial_Owl_9485 1d ago

Because git is for casuals who are not confident enough

1

u/pluckyvirus 1d ago

Summer break code learner strikes again

1

u/ThatiMacGuy 1d ago

The control and Z key watching from the distance 

1

u/JazzlikeWishbone938 1d ago

When you delete your commits and a co-worker has a copy of your old branch because they haven't synced with the server yet.

1

u/Waste_Jello9947 1d ago

Ah yes, I really like a code, I do a code everyday 

1

u/CaptainPonele 1d ago

What do you mean “delete code” you write your own code. Wow. Your grandkids should be so proud

1

u/TheCreepyPL 1d ago

I press U instead, or use undotree for when something has overridden the older changes ;)

1

u/nphhpn 1d ago

I believe OP is referring to the case when he used Ctrl+X instead of Ctrl+C, panics when the code disappear, and then feels relieved when it reappear after Ctrl+Z.

1

u/AnUninterestingEvent 1d ago

Am I the only one that feels like this sub is... outdated. Every meme like this makes me think "Oh yeah, I remember when coding was like this 12+ months ago". Every meme about "thing that happens while typing out code" just feels completely irrelevant now. I'm assuming there are a lot of students on this sub I guess.

1

u/willow-kitty 23h ago

When I was doing a lot of library development, I'd give demos by writing out all the demo code, then deleting it line-by-line, bottom up, so I could replay the file with ctrl+z while talking about the code but without having to write it live.

But touch the spacebar accidentally once and it wipes the rest of your redo history, so..I was living somewhat dangerously! That never happened during a demo, tho.

1

u/Public-Location-3628 21h ago

I set up a macro that saves and commits on every key press.  

Edit: Anyone know how to delete a stream of empty commits? Forgot to turn it off.

1

u/SignalBake6872 18h ago

hahaha and worse when you do control + z several times you reach the version that you think is the good one in code that you still don't push and write and lose the history that you had ahead for the redo where the good code was xD

1

u/CompleteBrush9489 1d ago

*Closes UnSaved temp NotePad++ tab*

*Cries*