this post was submitted on 03 Feb 2024
841 points (97.4% liked)

Programmer Humor

19548 readers
981 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
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 9 months ago

i just store everything in google drive and let chance take over

[–] [email protected] 0 points 9 months ago (3 children)

Why would you ever use an editor that could lose your work unless you save? Vim users will never understand that.

load more comments (3 replies)
[–] [email protected] 31 points 9 months ago* (last edited 9 months ago) (2 children)
load more comments (2 replies)
[–] [email protected] 2 points 9 months ago

I just do a full rebuild. Saves all files.

[–] [email protected] 10 points 9 months ago (1 children)

I've never had to think about that with Intellij IDEA. It just works!

load more comments (1 replies)
[–] [email protected] 3 points 9 months ago (5 children)

Ok here's a question I should have asked like way sooner.

In Ubuntu (and similar distros), is there a hotkey to immediately kill the process? Like CTRL-C but harsher.

[–] [email protected] 4 points 9 months ago

I use a process manager like btop for this.

load more comments (4 replies)
[–] [email protected] -3 points 9 months ago (2 children)

Ctrl-S? Are you writing code on Windows? 🤮

[–] [email protected] 14 points 9 months ago* (last edited 9 months ago) (1 children)

First of all, it’s fine to write code on Windows. In fact, many companies have windows-only development workflows.

Second of all, many Linux programs also use standard shortcuts like Ctrl+S. Linux is more than Vim.

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 11 points 9 months ago (2 children)
[–] [email protected] 30 points 9 months ago (2 children)
load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 6 points 9 months ago

Using JetBrains product, I never explicitly save while programming 😅

[–] [email protected] 10 points 9 months ago

Ctrl+s means "stop the presses" to VT100 terminal emulators and you have to press ctrl+q to resume. Key combinations from a different era.

[–] [email protected] 1 points 9 months ago

Except the autosave in BBEdit. I trust that with my life. It’s never lost ANYTHING in 30 years.

[–] [email protected] 7 points 9 months ago* (last edited 9 months ago) (1 children)
load more comments (1 replies)
[–] [email protected] 1 points 9 months ago

Excuse me i think you mean ctrl+c:w

[–] [email protected] 7 points 9 months ago

sync ; sync ; sync ; shutdown -h now

[–] [email protected] 25 points 9 months ago (1 children)

When you do this using Word online it be like “chill dude we autosave here, we got you” and I’m like “brother I do not trust you”.

load more comments (1 replies)
[–] [email protected] 5 points 9 months ago (1 children)

But then, if you’re forced to develop on microsoft 🤬, it’s late, you’re tired, you’re hand slides just a little to the right (win + d), aaaaand everything is gone, and you’re sitting there looking at you’re background wondering what the hell just happened 🙃.

[–] [email protected] 6 points 9 months ago (1 children)

Dude, win + d fucks, and it fucks hard. Just press it again if you can't handle

[–] [email protected] 1 points 9 months ago

Yeah but at 4am in the morning, it tends to take me a couple of seconds to realise what the hell just happened . It gets me every time.

[–] [email protected] 2 points 9 months ago

autosave is no good if you have live reload imo

[–] [email protected] 13 points 9 months ago (1 children)

CTRL + Shift + S is the real GOAT

[–] [email protected] 0 points 9 months ago (1 children)
[–] [email protected] 9 points 9 months ago* (last edited 9 months ago) (2 children)

It saves all files that are changed rather than just the current one you have open.

[–] [email protected] 4 points 9 months ago

TIL thanks!

load more comments (1 replies)
[–] [email protected] 6 points 9 months ago

Closing tabs and one of them asks if you want to save changes

[–] [email protected] 8 points 9 months ago

you CTRL+C CTRL+C CTRL+C CTRL+C CTRL+C

I CTRL+X CTRL+V we are not the same.

[–] [email protected] 10 points 9 months ago

I really should turn on auto save when vscode loses focus.

[–] [email protected] 6 points 9 months ago* (last edited 9 months ago)

Meanwhile I, a gentleman

nmap <CR> :w<CR>

Binding the Enter key to save the current buffer. 🧐

[–] [email protected] 3 points 9 months ago

The same can be applied for editors as well

[–] [email protected] 24 points 9 months ago (1 children)

We can optimize this further:

unsatisfied = true
while(unsatisfied) {
    key.dispatch(
        Keyboard::Ctrl,
        Keyboard::s
    )
}

..No, there is no instance where unsatisfied changes state

[–] [email protected] 4 points 9 months ago (2 children)

You should just be able to while(true)

[–] [email protected] 9 points 9 months ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 40 points 9 months ago (1 children)

Some of us have PTSD from losing work back in the day. Now it’s just habit.

[–] [email protected] 4 points 9 months ago (2 children)

It'd be great if there were side kind of feedback, like the cursor quickly flashing a "C" or something... anything to let you know the operation occurred; better yet, was successful.

[–] [email protected] 4 points 9 months ago

Check for an asterisk after the file name (in the tab/title bar), it means "unsaved changes".

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