this post was submitted on 03 Feb 2024
450 points (100.0% liked)

Programmer Humor

421 readers
50 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
[–] crony@lemmy.cronyakatsuki.xyz 46 points 9 months ago* (last edited 9 months ago) (5 children)

:w

:w

:w

:w

:w

i

esc

:w

:w

:w

:w

Average day in (neo)vim

[–] fylkenny@feddit.de 9 points 9 months ago (2 children)
[–] calzone_gigante@lemmy.eco.br 6 points 9 months ago

I use quake style terminals, and often start writing a file and completely forget about it and turn off the computer, and only remember what i left behind when i find the random recovery files around, so :w a lot is quite useful for me.

[–] dukatos@lemm.ee 2 points 9 months ago (1 children)
[–] noeontheend 2 points 9 months ago

My biggest (mostly) irrational internet pet peeve is the proliferation of people suggesting ":wq" when ":x" is strictly better.

[–] Commiunism@lemmy.wtf 3 points 9 months ago

:w before ZZ just to make sure

load more comments (3 replies)
[–] ornery_chemist@mander.xyz 21 points 9 months ago* (last edited 9 months ago) (1 children)
[–] intensely_human@lemm.ee 1 points 9 months ago

Basically a Jackie Chan fight scene, complete with somebody rolling a carriage at him and him kicking it back to pin them against the wall

[–] QuazarOmega@lemy.lol 17 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

[–] backhdlp@iusearchlinux.fyi 2 points 9 months ago (2 children)

You should just be able to while(true)

[–] Octopus1348@lemy.lol 7 points 9 months ago (1 children)
[–] Tja@programming.dev 2 points 9 months ago

That sounds like an excuse.

[–] halfway_neko@lemmy.dbzer0.com 4 points 9 months ago

Don't worry, most modern brains have a builtin jit compiler, so when a habit starts to form, the check will be optimised out. (It saves excess neurons from being generated.)

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”.

[–] 0x0@lemmy.dbzer0.com 9 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.

[–] palarith@aussie.zone 7 points 9 months ago* (last edited 9 months ago) (1 children)
[–] gazby@lemmy.dbzer0.com 4 points 9 months ago

sync

⬆️↩️

⬆️↩️

😂

[–] const_void@lemmy.ml 7 points 9 months ago (1 children)

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

[–] Vlyn@lemmy.zip 3 points 9 months ago

There's no Visual Studio for Linux, so yeah.. especially as a .NET dev.

Visual Studio Code isn't the same.

[–] summerof69@lemm.ee 6 points 9 months ago (1 children)

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

[–] lud@lemm.ee 2 points 9 months ago

I still click Ctrl S occasionally when using pycharm. It's the law.

[–] Underwaterbob@lemm.ee 6 points 9 months ago

I trust auto save in... Souls games.

[–] Johanno@feddit.de 6 points 9 months ago

This is me in eclipse.

Because I used to do the single save and it failed

[–] JoYo@lemmy.ml 5 points 9 months ago* (last edited 9 months ago)

MFRs are saving each keystroke they have access to.

[–] pythonoob@programming.dev 5 points 9 months ago

Dude I save almost every time I type anything. It's muscle memory at this point.

[–] BorgDrone@lemmy.one 5 points 9 months ago (1 children)

Tell me you use Windows without telling me you use Windows.

Meanwhile I just reboot my Mac without bothering to save anything and everything just restores as it was, even new documents that were never saved. It works so well I don’t even think about it anymore.

[–] firelizzard@programming.dev 6 points 9 months ago

Maybe these days. That definitely was not true when I was growing up, or even a decade ago.

[–] Adanisi@lemmy.zip 5 points 9 months ago* (last edited 9 months ago) (1 children)
[–] Tja@programming.dev 1 points 9 months ago

I hate editors that cut the current line if you do C-x with nothing selected. Always do C-x C-s, even in VSCode and KDevelop.

[–] Holzkohlen@feddit.de 4 points 9 months ago (1 children)

I just can't stand Kate showing me a little orange bar meaning I have not saved the changes yet. The bar must be green! I am a slave to the green bar. The white dot in vscode (I use an open source build) is a bit more tolerable, but whenever I notice it I HAVE to save the file.

[–] MonkeMischief@lemmy.today 2 points 9 months ago

Kate

Ah! Another fellow coder of culture!

It's such a good text editor.

[–] ILikeBoobies@lemmy.ca 4 points 9 months ago

Cost/benefit

Manually saving will save a lot more time than it not saving

[–] hemko@lemmy.dbzer0.com 4 points 9 months ago

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

[–] fu@libranet.de 4 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.

[–] janabuggs 3 points 9 months ago (1 children)
[–] MonkeMischief@lemmy.today 3 points 9 months ago

LOL good point about just not releasing Ctrl.

The chances are non-zero that somebody out there attempts to release and press ctrl+s at the exact same time over and over like they're hammering out Beethoven's 5th. XD

[–] M500@lemmy.ml 3 points 9 months ago

I’m the same way. I think it’s just a matter of being conditioned to manually save for the majority of my computing life.

[–] darklamer@lemmy.dbzer0.com 2 points 9 months ago (1 children)

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

[–] Beanie@programming.dev 3 points 9 months ago (1 children)

Actually vim has swap files which it saves to when you make any edit, whether you save the change or not, meaning you shouldn't lose any work even if you kill -9 vim on unsaved work.

[–] darklamer@lemmy.dbzer0.com 2 points 9 months ago (1 children)

Yes, exactly. Why would anyone ever use an editor that doesn't work like that, where unsaved work could disappear? I can't understand that.

[–] Beanie@programming.dev 2 points 9 months ago

Oh I get you. No idea tbh.

[–] pkill@programming.dev 2 points 9 months ago

autosave is no good if you have live reload imo

[–] Lmaydev@programming.dev 2 points 9 months ago

I just do a full rebuild. Saves all files.

[–] explodicle@local106.com 2 points 9 months ago (2 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.

[–] SorryQuick@lemmy.ca 4 points 9 months ago

If you’re using X11, you can use xkill: https://en.m.wikipedia.org/wiki/Xkill

You can bind it to a key in gnome/kde (not sure how they handle custom keybinds. Otherwise add a call to xbindkeys to your .bashrc or equivalent). It kills any window you want, responsive or not.

As for the terminal, I don’t think you can send SIGKILL, but ctrl + \ will result in a core dump if you’re using bash.

[–] Black616Angel@feddit.de 3 points 9 months ago (1 children)

My PC has a dedicated key to kill all processes.

[–] kionite231@lemmy.ca 2 points 9 months ago

sudo poweroff?

[–] resin85@lemmy.ca 1 points 9 months ago

Meanwhile, me over here with the self-doubt slamming ctrl-z

[–] cupcakezealot@lemmy.blahaj.zone 1 points 9 months ago

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

load more comments
view more: next ›