this post was submitted on 08 Apr 2024
537 points (100.0% liked)

Programmer Humor

421 readers
1 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
[–] RecluseRamble@lemmy.dbzer0.com 127 points 7 months ago (1 children)

Maybe she just wasn't impressed by your noob skills and is having doubts herself?

[–] blindsight 29 points 7 months ago

My jaw literally dropped reading that.

I think it's time to go outside.

[–] Blackmist@feddit.uk 75 points 7 months ago

"See if you just learn these 87 simple keyboard shortcuts, you won't need to simply drag with the mouse and cut and paste at all!"

[–] Crow@lemmy.blahaj.zone 74 points 7 months ago (1 children)

"nothing fancy" that's the issue, just some jumping won't impress her; you gotta do the real crazy shit. Friggin "wife not impressed by my cooking? I make a hard boiled egg and she isn't impressed"

load more comments (1 replies)
[–] PiratePanPan@lemmy.dbzer0.com 34 points 7 months ago* (last edited 7 months ago)

> my wife

> vim user

fake

[–] pineapplelover@lemm.ee 34 points 7 months ago (25 children)

I refuse to see how vim and emacs is worth learning. I only use it because that's the only option when editing server files. Beyond this, I couldn't imagine coding in these environments from scratch.

[–] Hexarei@programming.dev 31 points 7 months ago (6 children)

The biggest benefit of (neo)vim is the motions.

Honestly if you don't use vim motions in your ide of choice, you're missing out big time. Being able to do things like "Delete everything inside these parentheses". di( or "wrap this line and the two lines below in a pair of {}" ys2j{ , or "swap this parameter with the next one" cxia]a. with a single shortcut is game changing.

Even just being able to repeat an action a number of times is ridiculously useful. I use relative line numbers, so I can see how many lines away a target is and just go "I need to move down 17 lines" and hit 17j.

Absolutely insane how much quicker it is too do stuff with vim motions than ctrl-shift-arrows and the like.

[–] FizzyOrange@programming.dev 27 points 7 months ago (10 children)

Honestly those things just don't sound like common enough actions to be worth shaving 0.5 seconds off. How often do you know exactly how many lines to move a line by? And how often do you even need to move a line that far?

I still don't buy it.

[–] pearable@lemmy.ml 12 points 7 months ago (1 children)

Relative lines means each line except the one your cursor is on is relative to your current line. Like this:

5 5k jumps here

4

3

2

1

6 your cursor is here

1

2

3

4

5

6

7

8 8j jumps here

The main reason I like it is I don't like mouse ergonomics. Keeping my hands on the keyboard just feels better

[–] FizzyOrange@programming.dev 9 points 7 months ago (3 children)

Yes I understood that. My point is how often do you know you need to move a line exactly 17 lines? Do you count them? Clearly much slower than doing it interactively by holding down ctrl-shift-down for a bit.

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

I just look at the line number. If the code I want to edit is 17 lines up there's a 17 next to it. My ide window looks like my comment. Normally an ide would look like this

1

2

3

4

5

6

7

8

9

10

11

[–] mexicancartel@lemmy.dbzer0.com 6 points 7 months ago (2 children)

Thoose are line numbers in IDE. You don't count them, you see them

load more comments (2 replies)
load more comments (1 replies)
load more comments (9 replies)
load more comments (5 replies)
[–] ICastFist@programming.dev 16 points 7 months ago

I only use it because that’s the only option when editing server files.

suggestion 1: use nano. Unlike vi(m) and emacs, it's meant for humans, all the command shortcuts you can execute are listed at the bottom.

suggestion 2: browse the servers in question via your file explorer (sftp://user@server or just sftp://server) of choice or WinSCP if you're on windows, open whatever file with your local graphical text editor of choice.

[–] kuberoot@discuss.tchncs.de 10 points 7 months ago (4 children)

By the way, for editing server files consider nano. It's also widely available, has simpler shortcuts and displays them on the screen. It's obviously not powerful like vim, but a good match when you just need to edit a config file.

load more comments (4 replies)
[–] stoy@lemmy.zip 7 points 7 months ago (1 children)

Nano is perfectly fine for me.

But I know the basics of vim if I need to use it.

[–] Zo0@feddit.de 6 points 7 months ago (1 children)

I have a cheatsheet of all the necessary vim shortcuts!

:q!

load more comments (1 replies)
load more comments (21 replies)
[–] tiredofsametab@kbin.run 30 points 7 months ago (1 children)

As someone who's been a software developer for over a decade and in IT even longer, I still don't use vi/vim for anything other than when crontabs have it set as the editor.

[–] Hexarei@programming.dev 7 points 7 months ago (5 children)

Honestly if you don't use vim motions in your ide of choice, you're missing out big time. Being able to do things like "Delete everything inside these parentheses". di( or "wrap this line and the two lines below r in a pair of {}" ys2j{ , or "swap this parameter with the next one" cxia]a. with a single shortcut is game changing.

Even just being able to repeat an action a number of times is ridiculously useful. I use relative line numbers, so I can see how many lines away a target is and just go "I need to move down 17 lines" and hit 17j.

Absolutely insane how much quicker it is too do stuff with vim motions than ctrl-shift-arrows and the like

[–] tiredofsametab@kbin.run 8 points 7 months ago (1 children)

That's really neat, but I don't think I do that often enough to really make the performance hit of learning a whole new thing and memorizing keyboard shortcuts and commands worth it. I don't find myself refactoring code a ton, especially after moving to a more TDD-like model.

[–] Hexarei@programming.dev 6 points 7 months ago

It's less about refactoring and more about navigation of your code while editing. Ever wanted to delete a single word? daw deletes the word your cursor is currently in. How about "copy everything up to (but not including) the nearest "D" on the current line? yfD.

The whole point is that editing code in the middle of writing it, not just refactoring it, is immensely faster.

load more comments (4 replies)
[–] lseif@sopuli.xyz 29 points 7 months ago (1 children)

ive heard women are into emacs these days

[–] melpomenesclevage@lemm.ee 14 points 7 months ago (1 children)

We are, but, like... Just preferring something else doesn't make vim unimpressive. Silver medal's still pretty fucking prestigious, you know?

load more comments (1 replies)
[–] penquin@lemm.ee 26 points 7 months ago (3 children)

Stop showing off VIM to your wife would be a good start. I mean, I would do the same if she tried to show off her make tutorials to me.

[–] lobut@lemmy.ca 11 points 7 months ago (1 children)

Make? As in Makefiles or make-up?

load more comments (1 replies)
load more comments (2 replies)
[–] Random_German_Name@feddit.de 20 points 7 months ago (6 children)
[–] Midnitte 27 points 7 months ago

He tried, but he doesn't know how to exit.

load more comments (5 replies)
[–] XTL@sopuli.xyz 19 points 7 months ago (2 children)

Realising that your partner doesn't care about you after 10+ years can indeed be hard.

load more comments (2 replies)
[–] 0x01@lemmy.ml 17 points 7 months ago

Guy shoulda tried emacs instead, wife is probably an elitist

[–] Foofighter@discuss.tchncs.de 17 points 7 months ago
[–] learningduck@programming.dev 17 points 7 months ago

You have to adopt Emacs and show her that she can even play Tetris on it.

[–] BlushedPotatoPlayers@sopuli.xyz 16 points 7 months ago

Have you tried tiny macros with q and @? Syntax highlighting? Z-folds? Or turn vi into a hex editor with :%!xxd ?

If that doesn't work, try :divorce

[–] chris@lem.cochrun.xyz 16 points 7 months ago (2 children)

Emacs can do that obviously. And everything else.

[–] joshcodes@programming.dev 35 points 7 months ago

Relevant xkcd

[–] CameronDev@programming.dev 19 points 7 months ago (1 children)

C-d to initiate a divorce. So convenient.

[–] nathanjent@programming.dev 8 points 7 months ago (1 children)

However with Vim she won't know how to quit.

[–] CameronDev@programming.dev 9 points 7 months ago

Do you really want to be with someone who cant quit vim?

[–] pearable@lemmy.ml 15 points 7 months ago

Skill issue

[–] KillingTimeItself@lemmy.dbzer0.com 11 points 7 months ago

sit your wife down in front of vim, and make her use it.

It'll make more sense immediately.

If not, divorce.

[–] sik0fewl@lemmy.ca 10 points 7 months ago

You might've moved around too quickly. Stick to motion in the home row to start - hjkl. There are several ways to enter insert mode but DO NOT attempt it before she's familiar with the basic motions.

[–] PhlubbaDubba@lemm.ee 9 points 7 months ago

Show her you know how to exit vim and she'll instantly be naked and on the bed

[–] nayminlwin@lemmy.ml 8 points 7 months ago

My wife's impressed though, may be a little...

But she's also a programmer.

[–] ebits21@lemmy.ca 7 points 7 months ago
load more comments
view more: next ›