this post was submitted on 08 Oct 2023
521 points (88.8% liked)

Programmer Humor

25726 readers
1826 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] MsPenguinette@lemmy.world 38 points 2 years ago* (last edited 2 years ago) (4 children)

My serial killer trait is that I use vi instead of vim cause I'm too lazy to type the extra character. Tho if for some reason, vi tab completed to vim, I'd probably use vim

[–] donnachaidh@lemmy.dcmrobertson.com 62 points 2 years ago (1 children)

alias v=vim. There, just saved you two keystrokes.

[–] MsPenguinette@lemmy.world 16 points 2 years ago (1 children)

{vi} = 2 {vim} = 3 {v=vim} = 5

I'd need to run vi at least 5 times to have a net gain in saving keystrokes. I'm typically in effemerial systems created by the users of our env, so rarely am I going to gain those strokes back

But also, why am I trying to apply logic to this? I'll often cat a file before editing it. This shit is just illogical idiosyncrasies I've picked up over the years. I'm probably creating posthoc justifications for insane things I do cause it's hard to override muscle memory

[–] emptiestplace@lemmy.ml 8 points 2 years ago (1 children)
[–] MsPenguinette@lemmy.world 2 points 2 years ago (1 children)

Here's a link I found that might be good if you are interested in more:

https://cloudnativenow.com/topics/ephemeral-idempotent-and-immutable-infrastructure/

https://guymorton.medium.com/persistent-and-ephemeral-infrastructure-as-code-in-aws-42b33939dcf1

There are different levels of effemeriality. The simplest example I use daily would be an autoscaling group in AWS. Especially if you use Spot Instances to save money, thi gs may scale in and out whenever.

So if a development team creates a new autoscaling group and I need to get into an instance to test something, unless I add stuff to their IaC, I'm stuck with their configuration. I need to assume that every time I ssh into one of those instances, it's a brand new instance. But it'd be a big challenge for me to go to their repo and make a PR to alias a command whenever an instance in that resource is created

Stuff can be even more temporary if it's something like an ECS task which creates a container with a read only filesystem only when a task is needed to be done. But I don't want to get too deep in the weeds (or deeper than I already have)

terraform workspace will at least stick around for a while so you might be in and out of the same system multiple times.

[–] Chunk@lemmy.world 8 points 2 years ago (1 children)
[–] MsPenguinette@lemmy.world 7 points 2 years ago (1 children)
[–] Chunk@lemmy.world 4 points 2 years ago
[–] Spider89@lemmy.world 17 points 2 years ago (2 children)

I use nano.

Nano >> vi/vim, emacs

[–] mosiacmango@lemm.ee 10 points 2 years ago* (last edited 2 years ago) (1 children)

4 letters < 2 letters.

vi forever.

[–] Spider89@lemmy.world 3 points 2 years ago (2 children)
[–] Prunebutt@feddit.de 14 points 2 years ago (1 children)

Not if you need any work done.

[–] BeigeAgenda@lemmy.ca 5 points 2 years ago (1 children)

That's when you switch to a IDE.

[–] Prunebutt@feddit.de 3 points 2 years ago (1 children)
[–] BeigeAgenda@lemmy.ca 2 points 2 years ago* (last edited 2 years ago)

Yes, if you can remember the shortcuts...

M-x IDE

[–] BeigeAgenda@lemmy.ca 0 points 2 years ago

Nano is the best when you just need an editor, you can as well use an IDE instead of vi(m) or Emacs.

[–] brodoshmodo@lemmy.world 8 points 2 years ago

Ok but why use nano when micro literally exists

[–] LinuxSBC@lemm.ee 14 points 2 years ago (2 children)
[–] ekky43@lemmy.dbzer0.com 16 points 2 years ago* (last edited 2 years ago)

Aliases are just bloat! You can do just fine without them. Heck, why not remove the ASCII conversion and read everything in hex or binary?

It's all about SPEED and efficiency here!

[–] MsPenguinette@lemmy.world 2 points 2 years ago

I'm in DevOps so I'm in a lot of effemerial systems so in practice, I will run into systems where profile hasn't been set up. Tho I do like the idea of making sure all systems properly have that aliased cause it'd be serial killer vibes to spend hours of time to make sure that I can save a keystroke.

Tho it'd never make it through PR. Also, wild require explaining to my coworkers that I do this

[–] expr@programming.dev 11 points 2 years ago (2 children)

Most all distros alias vi to vim already, so it makes no difference.

[–] Chunk@lemmy.world 8 points 2 years ago

You use vi because you are lazy.

I used vi because I am too stupid to close it.

We are not the same.

[–] MsPenguinette@lemmy.world 1 points 2 years ago

I'll have to check tomarrow if RHEL and UBI do this.

Did some quick googling and looks like cent has that alias by default but doesn't do it when root. Which would explain why I do get inconsistent results with vi. I never thought about it in detail besides just knowing that there are some visual changes. Thanks for the info, I'll be noticing this now that I know!